Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4930

Interfacing (DSI, CSI, I2C, etc.) • CM4 UART RTS - Unexpected Behaviour

$
0
0
Hi all,

I'm trying to use a CM4 to communicate over Modbus RTU via RS-485 on two hardware UARTs, UART3 and UART4.
This is via a a pair of MAX3078 transceiver ICs.

I'm using Debian 12 (bookworm) on a Pi OS Lite install.
I've enabled the UARTs including hardware flow control in /boot/firmware/config.txt as follows:
enable_uart=1
dtoverlay=uart3,ctsrts
dtoverlay=uart4,ctsrts

The DE/RE pins on the MAX3078 are connected to the RTS control line of the respective UART - these are an active-high output enable and active-low input enable, so when RTS is asserted the transceiver is put into transmit mode, else it's put into receive mode.
The CTS lines on the CM4 for UART3 and UART4 are tied to ground, as the CM4 is the bus client on both busses.

I'm using modbus-cli for testing communications with a Modbus server device.
https://github.com/favalex/modbus-cli

Data seems to be being correctly transmitted from the CM4, however the RTS behaviour is not as I'd expect.
The RTS line idles low as expected, then goes high when data is about to be send, but is driven low again before data is sent - see image below.
This means that the transceiver does not transmit this onto the bus.
I would have expected the RTS signal to remain high whilst data is being transmitted.

Can anyone please advise as to what I might have got wrong?

Many thanks,

Adam

Statistics: Posted by AdamWTracerco — Mon Jan 20, 2025 4:39 pm — Replies 1 — Views 38



Viewing all articles
Browse latest Browse all 4930

Trending Articles