UART information is shifted by 1 byte when I connect my STM32G474RE directly to my PC and use a terminal program to send information to control things. It fixes itself after resetting the board.
For example, if I send 1000, it will be received as 0100 on the STM board. I send what I received in the Rxcallback function. My program doesn't work, so I know this is the case. This issue stops after I hit the RESET switch on my board. Now, my issue is that for my university project, the STM board is locked in a box. It can't be reset. So how do I fix this issue in software, if possible? Or will I have to do some soldering...
The CubeIDE also does the same thing when debugging, it restarts the board after the initial connection to it. Is it because I was debugging it beforehand? The UART is in async mode so it should not need any clock synchronization, but are there any stop/begin specific characters in stm32, I haven't heard of such a thing.