I am working on application which require low power and serial USART communication. Using HAL CubeMx library We are able to STOP mcu clock and wake up on external interrupt correctly. Now for wake up on UART data, we have configured UART Rx pin to external interrupt pin. Application logic as follows
1) Enable external interrupt pin( which is physically shot with UART Rx pin)
2) Pause UART data (Abort Tx and Rx interrupt of UART)
3) STOP mcu clock
4) configure Clock
5) disable external Interrupt
6) Resume UART interrupt and put mcu to Rx mode using HAL_UART_Receive_IT api.
7) put timer for delay of 1 sec for keep Wake up mcu so that UART data receive.
Through testing we came to know that noise error comes after wake up. so we put error handle conditions for receive data.
Now problem is that we are getting garbage data some times not every time and first byte loss every time. Garbage data comes through space char most of time for example "Good Morning" comes "****Morning". Byte loss is acceptable but garbage data comes some time that is giving problem.
Please help us to solve issue.
Thanks in advance.