2023-02-10 06:01 AM
Is it possible to wake up from sleep when the UART receives one byte when I use cicular DMA?
Or else I must catch every received byte using interrupt instead so it can wake up by interrupt.
I'm using an STM32G030.
2023-02-23 08:03 AM
Hello @Community member
First, you may refer to STM32G0x0 advanced Arm®-based 32-bit MCUs - Reference manual. You can find the WUFIE bit field of USART_CR3. This flag can be used to determine the source of the wake-up event.
You can then check the WUF flag to determine if the device was woken up by the desired wake-up source. If the flag is set, you can clear it and resume normal operation.
When the DMA transfer is complete, it will trigger the USART interrupt, which can wake up the device from sleep mode.
Hope this helps!
Firas
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.