Hey everyone,
I'm having some issues with the STM32 HAL_UART_Receive function. I've posted on the ST forums, but I figure you folks on here are pretty knowledgeable about this sorta thing as well. I'll link my post on the ST forum (It has code snippets and screenshots of the debugging steps I've taken) and I'll just summarize the issue here.
Link to ST forums:
https://community.st.com/s/question/0D53W00001JAeWZSA1/haluartreceive-polling-mode-only-picks-up-first-character-from-uartI'm trying to read from a GPS module via UART.
Expected Behavior:
* Read GPS data via USUART1 into a buffer until the buffer is full or timeout occurs
* Print a new line to the serial terminal on USUART2
* Print the data contained within the Buffer to USUART2
Behavior that occurs:
* Reads only the first character into the buffer (which maybe it reads one transfer at a time then returns, but this doesn't explain why subsequent reads fail)
* New line prints just fine
* Buffer data only contains the first char, and will only print once (because besides that the buffer is zeroed out)
Debugging Steps:
* Connect GPS directly to PC (Works fine, confirmed 9600 baud, no parity, 1 stop bit)
* Connect Logic Analyzer to GPS Tx Pin (Works fine, logic analyzer catches the correct GPS Message format)
* Debugger on STM32 (Can see that the UART reads into the buffer correctly once, fails for any subsequent read)
Any help on this would be much appreciated.
Thank you!