question about “WFI and interrupt”

4 posts / 0 new
Last post
jetliang
Offline
Last seen:2 years 6 months ago
加入:2014-12-02 06:50
question about “WFI and interrupt”

hello,dialog teams.
now i am studying dsps code.when device falls into extended sleep mode,device is halted with "wfi" and wait for interrupt event to wake up it.
my question is:'now,when device falls into extended sleep mode, interrupt is in enabled state?(because just before run 'wfi',"GLOBAL_INT_STOP()" has been executed.
如果禁用中断,如何de醒来vice from sleep mode?

Device:
MT_dialog
Offline
Last seen:2 weeks 3 days ago
Staff
加入:2015-06-08 11:34
Hi jetliang,

Hi jetliang,

Please check this threadhttp://support.dialog-semiconductor.com/questions-about-um-b-006-sleep-m...

Thanks MT_dialog

jetliang
Offline
Last seen:2 years 6 months ago
加入:2014-12-02 06:50
Hi MT_dialog,Thanks for your

Hi MT_dialog,Thanks for your help!
Now,my understanding is that:
When cpu runs to "WFI",cpu will be halted,and falls into sleep mode.though "GLOBAL_INT_STOP()" has been executed,but if there is any interrupt happens,it will wake up cpu,and cpu will run code from where it was halted,and execute "GLOBAL_INT_START()",and then to run relevant handler to completely wake up cpu.

is that right?

MT_dialog
Offline
Last seen:2 weeks 3 days ago
Staff
加入:2015-06-08 11:34
Hi jetliang,

Hi jetliang,

When the code reaches to WFI() the CPU halts. If an interrupt occurs the CPU will resume, enable the interrupts, execute LP and SLP Handlers and continue with serving any BLE events may occur.

Thanks MT_dialog