2019-05-30 03:35 PM
2019-05-30 04:29 PM
Look at the pin using oscilloscope or logic analyzer. The problem will probably be the sequence of how you initialize the pin - first, it goes high, maybe due to expternal pullup or receiver pullung it up, then probably setting it to AF in GPIO while UART is still off or uninitialized it goes low for a while, until UART gets initialized and it goes high again.
I made this up as I don't know what exactly is your sequence, but the point is that there is some high-to-low-and-back-to-high sequence on the pin, with long enough low pulse, making the receiving end see it as a startbit.
Single-stepping through the initialization code while observing the pin should reveal you the source of that negative pulse.
JW
2019-05-31 01:28 AM
When you get it fixed, you probably get 0x00. :D
That's how the U(S)ART works.
You can avoid it by enabling the pin after the 0x00 sending is done.