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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,214 次查看
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 项奖励
回复
6 回复数

1,183 次查看
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 项奖励
回复

1,178 次查看
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 项奖励
回复

1,162 次查看
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 项奖励
回复

1,148 次查看
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 项奖励
回复

1,139 次查看
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 项奖励
回复

1,149 次查看
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 项奖励
回复