Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
RS485/RS232 Configuration Issues on Colibri iMX6S
Based on your configuration and the available documentation, I can help you troubleshoot the UART1 RS485/RS232 issues on your Colibri iMX6S module.
Device Tree Configuration Issues
Your current device tree configuration has a syntax error that needs correction (1). The property should be:
&uart1 {
linux,rs485-enabled-at-boot-time;
dma-names = "rx","tx";
status = "okay";
};
Note the correction: linux,rs485-enabled-at-boot-time (not linux,rs485-enable-at-boot-time).
Additional RS485 Properties Required
For proper RS485 operation, you need additional device tree properties (2):
&uart1 {
status = "okay";
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
// Remove rs485-rx-during-tx to suppress echo
};
The rs485-rts-active-low property controls the RTS signal polarity, which is crucial for proper direction control in RS485 mode (2).
RTS Control for RS485 Direction
For RS485 operation on iMX6-based modules like your Colibri iMX6S, the RTS signal is used for direction control (3). The documentation shows that for i.MX6 modules, you can configure RS485 through registry entries (3):
[HKLM\Driver\BuiltIn\COMX]
"RTSToggleAlwaysOn" = "dword:1"
"RTSPol" = "dword:1"
"RTSPin" = "dword:1b" ; module SODIMM/MXM3 pin number
However, this is for Windows CE. For Linux, the device tree approach should handle RTS control automatically when properly configured.
Troubleshooting Steps
-
Verify RTS Signal Connection: Ensure SODIMM pin 27 (your RS485 direction control) is properly connected to the RS485 transceiver’s direction enable pin.
-
Check RTS Polarity: The
rs485-rts-active-lowproperty may need adjustment based on your transceiver circuit design (2). -
Remove Echo Configuration: Avoid using
rs485-rx-during-txin your device tree as this can cause echo issues (2). -
Test RTS Toggle: You can verify if the RTS signal is being toggled during transmission by monitoring the pin with an oscilloscope or logic analyzer (2).
Recommended Device Tree Configuration
&uart1 {
status = "okay";
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low; // Adjust polarity as needed for your hardware
dma-names = "rx","tx";
};
Additional Considerations
- The RX issues you’re experiencing in both RS232 and RS485 modes suggest a potential hardware connection or configuration problem rather than just a software issue.
- Verify that your custom carrier board’s UART1 connections match the expected Colibri pinout.
- Check if any other device tree overlays might be conflicting with your UART1 configuration.
The fact that TX works in RS485 mode but RX doesn’t work in either mode points to a potential issue with the receive path configuration or hardware connections.
**
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.