2013-01-02 06:55 AM
Hi,
is there any possibility to change the polarity TX and RX of USART5? I.e. normally idle state is high, startbit is low. We need (due to bad specs of a foreign device) the opposite polarity (software only solution). I could not find anything in the reference manual, but maybe I missed something? TIA Dirk2013-01-02 07:02 AM
No you'll need to add external inverters.
Remember the USARTs output ~3V CMOS levels, and not compatible with RS232 levels. The typical RS232 level converters have inverters in them, see MAX2322013-01-03 01:51 AM
Thank you, clive1.
The hardware is fixed (and no RS232 level converter involved), so an external inverter is no option. I will have to emulate an USART by software. Fortunately, the baud rate is quite low. Regards Dirk2013-01-03 07:49 AM
To confirm & amplify Clive1's earlier response - the bit ''flips'' you need (via simple inverter) may be placed at ''either'' of your two boards. (assuming you are communicating - via UART - w/2nd board)
So - if your STM32 pcb is ''fixed'' - perhaps the 2nd board can accommodate some ''tacked on'' inverter. Should there be a cable or wire-harness between boards - we've seen clients insert such inverters/level shifters - with some elegance - ''in the cable line.'' Should yours be a single board project - agree that you're then stuck...2013-01-03 09:01 AM
''Should there be a cable or wire-harness between boards''
Maybe even a board-to-board connector? ''insert such inverters/level shifters - with some elegance - 'in the cable line'.''
Possibly ''within'' the connector?
2013-01-03 09:36 AM
A.W. Neil, ''Possibly ''within'' the connector?''
elegance ++ (simply ideal - but may be hard, ''after the fact'') beats the heck out of my suggestion...