1] After wakeup from sleep mode , in handler i am not able to read isr bit means after wakeup , after press button did it go in the handler or not ? if yes , then how ? i am not able to go in handler in sdk example as well
Hi @Lghtdhff_456 ,
I have a question, do you clean the interrupt ISR flag in your handler? If your hanlder is clean the related flag, then you can't find it.
Normally, when the interrupt happens, it will make the chip wakeup, then enter the ISR, and ISR will clean the flag.
If you are not sure, I think you can test it in the run mode, just test your wakeup source interrupt directly, you can debug check the related ISR, and the flag when the interrupt happens.
Wish it helps you!
Best Regards,
Kerry
What I did , I read isr flag before going to sleep in main () , after wakeup that respective flag is high means I am able to detect in main () but after wakeup it is not going in handler actually as you said I also thought the same but while testing I realised it is not going in handler .
In your ISR handler, do you have the code which clear the flag or not?
What I am thinking is, before your checking it, the flag maybe cleared, so if you want to test it, I think you can comment the flag clear code.
Best Regards,
Kerry
No I don't have the code which clear flag . actually while testing I realised it not goes in handler after wakeup after commenting out that clear flag instructions.
How do you test the wakeup interrupt? In debugger mode or use printf to test it?
As you know, when enter the low power mode, the debugger will be lost. If you use the uart printf, you also need to configure the related uart clock at first.
Best Regards,
Kerry
No I don't have the code which clear flag . actually while testing I realised it not goes in handler after wakeup