Mxrt1170 || Low power mode || Setpoint 15 || not able to get wakeup cause in handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mxrt1170 || Low power mode || Setpoint 15 || not able to get wakeup cause in handler

1,379 Views
Lghtdhff_456
Contributor II

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

0 Kudos
Reply
6 Replies

1,348 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,343 Views
Lghtdhff_456
Contributor II

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 .  

0 Kudos
Reply

1,327 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Lghtdhff_456 

  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

0 Kudos
Reply

1,313 Views
Lghtdhff_456
Contributor II

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.

0 Kudos
Reply

1,304 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Lghtdhff_456 

   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

0 Kudos
Reply

1,314 Views
Lghtdhff_456
Contributor II

No I don't have the code which clear flag . actually while testing I realised it not goes in handler after wakeup 

0 Kudos
Reply