IMX7d RS485 configuration

Hello Toradex,

I am configuring the RS485 on my Colibri iMX7d using your recommendations: UART (Linux) | Toradex Developer Center

I am thereby studying these lines:

/* Enable receiver during sending, required for i.MX devices */

rs485conf.flags |= SER_RS485_RX_DURING_TX;

(or rs485-rx-during-tx; in the device tree)

Why would this property be mandatory for i.MX devices, regarding the comment above? I guess it actually depends on the PCB routing? (e.g. RX_EN and TX_EN both controlled or not) Is it because of the Toradex carrier boards ?

Thank you,
Best regards,
Louis

Hello @lobuc,

Thanks for using the Toradex community.

Could you please state, which carrier board and what version of it you are using?

The version of the module itself would also be helpful.

Best Regards
Kevin

Hello @kevin.tx,

Thanks for your answer.
We are already using a proprietary custom carrier board integrating the RS485. We were previously using an Iris, thus not using the RS485.
The module is a Colibri i.MX7D 1GB V1.1 A.
We are wondering whether the “rs485conf.flags |= SER_RS485_RX_DURING_TX;” configuration is truely i.MX dependant as mentionned is the corresponding comment above (UART (Linux) | Toradex Developer Center), or is more logically carrier board dependant.

Best regards,
Louis

Hi @lobuc,

Thanks for clarifying.

I have to tell you, that it is indeed iMX dependent. It is caused by a bug in the SoC. This is the reason behind the RX_DURING_TX configuration and you need to keep it in your configuration.

In the schematics of the Colibri Evaluation Board (found here) on the very last page, you can find our implementation of the RS485 interface. It is necessary to implement it in the same way to avoid future issues. This combined with the flag mentioned above the interface should work as intended.

If you have further questions, feel free to reach out again.

Best Regards
Kevin

Hi @kevin.tx,

Thanks for your quick answer.
That’s very interesting, we will definitely consider it.
Might you please give us more information about this bug in the SoC? What behaviour have you observed?

Best regards,
Louis

Hi @lobuc,

there is a community entry about this exact topic.

I recommend giving it a read.

High-Active RTS in RS485

If you have further questions, do not hesitate to reach out again.

BR
Kevin

Hi @kevin.tx,

Great, thank you very much for the link.
However, I am afraid I do not understand the relationship with “RS485_RX_DURING_TX”.

Best regards,
Louis

Hi @lobuc

There was a misunderstanding. The Link stated a bug in SoC which is not related to your question but important for the design of the carrier board.

The Flag ‘RS485_RX_DURING_TX’ is kernel dependant. On your custom carrier Board, you can try to remove the Flag. However all the other mentioned tags are necessary to make RS485 work correctly.

Best regards,
Jaski