Skip to content

Commit

Permalink
Fixup RS485 after pinmux changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GregAC committed Nov 7, 2024
1 parent 0a1378c commit fe5bb5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rtl/system/sonata_system.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ module sonata_system
// Enable the RS-485 receiver any time the RS-485 RX input is connect to the UART via pinmux.
// Whether or not we are transmitting does not need to be factored in here as that is dealt with
// via rs485_ctrl.
assign rs485_rx_enable_o = u_pinmux.uart_rx_2_sel[4];
assign rs485_rx_enable_o = u_pinmux.uart_rx_2_sel[3];

// Transmission enabled when UART is muxed to RS-485 TX output and UART is actively transmitting.
assign rs485_tx_enable_o = u_pinmux.rs485_tx_sel[1] &
Expand Down
2 changes: 1 addition & 1 deletion sw/cheri/checks/rs485_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using namespace CHERI;
SonataPinmux Pinmux = SonataPinmux(pinmux);

Pinmux.output_pin_select(SonataPinmux::OutputPin::rs485_tx, 1);
Pinmux.block_input_select(SonataPinmux::BlockInput::uart_2_rx, 4);
Pinmux.block_input_select(SonataPinmux::BlockInput::uart_2_rx, 3);

Capability<volatile OpenTitanUart> uart = root.cast<volatile OpenTitanUart>();
uart.address() = UART_ADDRESS;
Expand Down
2 changes: 1 addition & 1 deletion sw/cheri/checks/rs485_spam_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace CHERI;
SonataPinmux Pinmux = SonataPinmux(pinmux);

Pinmux.output_pin_select(SonataPinmux::OutputPin::rs485_tx, 1);
Pinmux.block_input_select(SonataPinmux::BlockInput::uart_2_rx, 4);
Pinmux.block_input_select(SonataPinmux::BlockInput::uart_2_rx, 3);

Capability<volatile OpenTitanUart> uart = root.cast<volatile OpenTitanUart>();
uart.address() = UART_ADDRESS;
Expand Down

0 comments on commit fe5bb5e

Please sign in to comment.