cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F207 Uart polarity

zabel
Associate III
Posted on January 02, 2013 at 15:55

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

  Dirk

5 REPLIES 5
Posted on January 02, 2013 at 16:02

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 MAX232
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zabel
Associate III
Posted on January 03, 2013 at 10:51

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

  Dirk

jj2
Associate II
Posted on January 03, 2013 at 16:49

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...

Posted on January 03, 2013 at 18:01

''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?

jj2
Associate II
Posted on January 03, 2013 at 18:36

A.W. Neil, ''Possibly ''within'' the connector?''

elegance ++  (simply ideal - but may be hard, ''after the fact'')  beats the heck out of my suggestion...