So the past week I have been working on getting UART messages sent from a STM32F407 and reading it on my laptop through a ugreen RS232 to USB cable using termite.
I have used STMCube to generate code and add to it by reading the relevant instructions at the top of the "stm32f4xx_hal_uart.c" file (and watching plenty of videos and reading online).
I have checked the transmitted message on an oscilloscope and it matches its ASCII representation.
For example I send 'Q' which is 0101 0001, I receive 'W' which is 0101 0111. The reading on the scope shows:
Termite output for the same signal as displayed on the oscilloscope.
I have confirmed baud rates/parity/HWcontrol are matching on termite and in my code.
To receive correct character I have tried lowering and increasing baud rates.
I've tried different character sets to try to find a pattern which causes wrong characters to be displayed.
Additionally I have tried different terminal such as on Putty or Teraterm.
1
symbol with the yellow background on the left of the trace - that's the 0V level) and then pulses below 0V. That wouldn't be true for a logic signal straight from an STM32 and, indeed, it isn't true. Looking in the bottom left corner, you have set channel 1 to AC coupling (that's the~
symbol you see there). The signal is really idling high and pulsing to around 0V. Use DC coupling for a sane view of that signal. \$\endgroup\$