cancel
Showing results for 
Search instead for 
Did you mean: 

wake Up with uart interrupt from stop mode.

kosan
Associate II
Posted on February 21, 2017 at 08:22

hi,

i write code to wake up with uart interrupt for stm32f4 discovery board.

before sleep i use deinit uart function and configure rx pin as a gpio exti, in exti handler function i use deinit pin and init uart functions. Code works with 2 loss bytes on stm32f4 board. other bytes can succesfully receive. 

i tried the same code on nucleo stm32f103rb board. it failed. then i tried different way. first i sent dummy package to wake up mcu and next i sent real package, but it is not stable. sometimes succesfull sometimes incomplete or wrong.

so i wanna ask what is the better algorithm for me, or what i have to change in my code to work on stm32f103rb board?

thanks in advance.

#uart.stm32-uart #stop-mode #stm32-power-management #wfi
3 REPLIES 3
Oliver Beirne
Senior
Posted on February 21, 2017 at 12:56

Hello

I have moved your thread to the

https://community.st.com/community/stm32-community/stm32-forum?sr=search&searchId=d03de03b-d7e4-4471-9e6a-e245e0b81096&searchIndex=0

‌ where someone should be able to help you.

Thanks

Oli

S.Ma
Principal
Posted on February 21, 2017 at 13:54

On some STM32, for low bit rate, there are LPUART which are designed to wakeup byitself and catch the first received byte. Otherwise, before entering stop mode, stop the UART clock so no need to reload all registers: Reboot must be as prompt as possible. Maybe boot without PLL, use 16MHz (tolerances and bitrate may or may not be compatible here). In some STM32 peripheral may use other clock sources than SYSCLK. The goal is to start as soon as possible. If sending dummy byte is possible, use a fixed header byte to discard incoming dummies.

David.Cheng
Associate II

could you share your code