2025-03-10 5:58 AM - edited 2025-03-10 7:08 AM
While experimenting[*] with the USART_WakeUpFromStop1 example on my NUCLEO-L496ZG I noticed that repeatedly entering STOP1 mode leads to dropped character if running with a baudrate > 4800 bps. I'm using STOP1 mode in a different project and I hoped to find a way to correctly communicating on 115200.
Any pointers on how to achieve this?
[*] I had to some minor modifications to STs example
* Rewrote the reception callback to store the received bytes in an array and printout in main() instead of echoing them in the handler
void USART_CharReception_Callback(void)
{
/* Read Received character. RXNE flag is cleared by reading of RDR register */
ubReceivedChar = LL_USART_ReceiveData8(USART1);
rx_buff[rx_buff_i++] = ubReceivedChar;
/* Check if received value is corresponding to specific one : S or s */
if ((ubReceivedChar == 'S') || (ubReceivedChar == 's'))
{
...
* Removed everything not related to STOP mode from the main loop
while (ubFinalCharReceived == 0)
{
PrepareUSARTToStopMode();
EnterStop1Mode();
}