Page 1 of 1

CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 2:04 pm
by MrBool
I know that CM4 is not yet available but wants to be prepared for his arrival ;)

The processor of RPi4 has 4 serial ports. There are four new overlays for serial ports - uart2 to uart5.
Do any of them support RS485 mode?

Re: CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 2:08 pm
by cleverca22
MrBool wrote:
Sun Jul 19, 2020 2:04 pm
I know that CM4 is not yet available but wants to be prepared for his arrival ;)

The processor of RPi4 has 4 serial ports. There are four new overlays for serial ports - uart2 to uart5.
Do any of them support RS485 mode?
i believe it will be the identical silicon to the existing rpi4b, so it can only do whatever the rpi4b is already capable of

the only real difference will be direct access to more pins, including the pci-e lanes

Re: CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 4:01 pm
by DougieLawson
MrBool wrote:
Sun Jul 19, 2020 2:04 pm
I know that CM4 is not yet available but wants to be prepared for his arrival ;)

The processor of RPi4 has 4 serial ports. There are four new overlays for serial ports - uart2 to uart5.
Do any of them support RS485 mode?
What part of "confidential until announced" are you struggling with? The RPF (after the official screen debacle) discovered that keeping their designs confidential until a product is available (from the usual suppliers) makes for an easier life, gets better product reviews and less speculation by the uninformed as to what's happening in their confidential development roadmap.

Re: CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 4:25 pm
by MrBool
DougieLawson wrote:
Sun Jul 19, 2020 4:01 pm
What part of "confidential until announced" are you struggling with? The RPF (after the official screen debacle) discovered that keeping their designs confidential until a product is available (from the usual suppliers) makes for an easier life, gets better product reviews and less speculation by the uninformed as to what's happening in their confidential development roadmap.
I don't ask for CM4 details. I assume that CM4 will have the same processor as RPI4. So my question concerns the processor RPI4. I ask in another form. Does the processor used in RPi4 have support for RS485 mode for a serial port?

Re: CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 5:11 pm
by DougieLawson
You can't do RS485 without external hardware.

Re: CM4 serial ports RS485 mode

Posted: Sun Jul 19, 2020 9:21 pm
by Cyborg_delta1
DougieLawson wrote:
Sun Jul 19, 2020 4:01 pm
MrBool wrote:
Sun Jul 19, 2020 2:04 pm
I know that CM4 is not yet available but wants to be prepared for his arrival ;)

The processor of RPi4 has 4 serial ports. There are four new overlays for serial ports - uart2 to uart5.
Do any of them support RS485 mode?
What part of "confidential until announced" are you struggling with? The RPF (after the official screen debacle) discovered that keeping their designs confidential until a product is available (from the usual suppliers) makes for an easier life, gets better product reviews and less speculation by the uninformed as to what's happening in their confidential development roadmap.
Wow dude calm down he did not ask for schematics or designs of CM4 he was asking if Pi4 supported RS485

Re: CM4 serial ports RS485 mode

Posted: Mon Jul 20, 2020 5:38 am
by aBUGSworstnightmare
As rhe Pi4 (and any other Pi too) needs external hardware for RS-485 why should that be different on the CM4?

Re: CM4 serial ports RS485 mode

Posted: Mon Jul 20, 2020 5:52 am
by fruitoftheloom
MrBool wrote:
Sun Jul 19, 2020 2:04 pm
I know that CM4 is not yet available but wants to be prepared for his arrival ;)

The processor of RPi4 has 4 serial ports. There are four new overlays for serial ports - uart2 to uart5.
Do any of them support RS485 mode?

You will need additional hardware, this for a differing scenario but basics the same using a MAX485:

https://circuitdigest.com/microcontroll ... spberry-pi

Re: CM4 serial ports RS485 mode

Posted: Mon Jul 20, 2020 6:23 pm
by MrBool
I know that I need external hardware - Rs485 transceiver. I asked because some procesors have UART with RS485 mode options. I used it a few years ago on my SBC with ARM9. RS485 transceiver needs flow control signal, not only RXD and TXD like in Rs232. Usually signal RTS is used for it if UART has mode RS485. UART activate this signal before transit data and deactive after end of transmision. Rpi4 has more UARTs and I thought that maybe RS485 mode is available now.

Re: CM4 serial ports RS485 mode

Posted: Mon Jul 20, 2020 7:40 pm
by trejan
There is no specific RS485 support with DE/RE but all of the Pi UARTs have optional CTS/RTS lines which can be enabled. UART1 is the mini UART is only software CTS/RTS and has problems with the clock being linked to the core clock so it isn't a good idea to use that one. UART0 has the problem that it is normally used for Bluetooth and the DT overlay doesn't have the option to enable CTS/RTS. You'll need to alter the GPIO alternate mode registers to enable CTS/RTS on ALT3 for GPIO16/17 or GPIO30/31.

For the new Pi 4 UARTs 2 to 5 there is an optional ctsrts argument for the DT overlay so no manual register twiddling is needed. Be aware of the GPIO pin assignments for these new UARTs and their CTS/RTS lines as they may conflict.