UART RX idle logic 0

Hello,

We are working on a project that uses a UART->RS485 bridge, but the data coming from the bridge IC is idling low. In other words, the UART data we are receiving is "upside-down". At all times, the line is low until data starts to appear on the line, where the data raises the logic level to high repeatedly. This is a problem because the stock nRF52840 UART drivers expect UART to come in idling high. Is there any way we can flip the UART in software or do we have to add an inverter in hardware?

Thanks,

Nathan

Parents
  • Might not help, but if all the near-end Rx idle and active bits are upside down a simple trick is to swap the differential RS485 lines over. If using a RS422 hardware chip to create RS485 by pairing Tx and Rx lines this is trivial, just swap the +- receive line pins and leave the +- transmit line pins alone. If using a RS485 hardware chip (or no interface chip) the downside of this trick is that the near-end Tx is also inverted. Depending on the application such a near-end Tx inversion may or may not be a problem, and sometimes the inversion on the far-end Rx (which is now inverted) is easier to handle. Worst case the near-end Tx can be performed by PWM (I posted an example recently), and the near-end Rx by the UART with the swapped lines.

Reply
  • Might not help, but if all the near-end Rx idle and active bits are upside down a simple trick is to swap the differential RS485 lines over. If using a RS422 hardware chip to create RS485 by pairing Tx and Rx lines this is trivial, just swap the +- receive line pins and leave the +- transmit line pins alone. If using a RS485 hardware chip (or no interface chip) the downside of this trick is that the near-end Tx is also inverted. Depending on the application such a near-end Tx inversion may or may not be a problem, and sometimes the inversion on the far-end Rx (which is now inverted) is easier to handle. Worst case the near-end Tx can be performed by PWM (I posted an example recently), and the near-end Rx by the UART with the swapped lines.

Children
No Data
Related