Interrupt management while waking up from sleep mode.

3 posts / 0 new
Last post
Matthieu ANTOINE
Offline
Last seen:4 years 2 months ago
Expert
加入:2014-01-14 14:51
Interrupt management while waking up from sleep mode.

Hi,

I have a quick technical question about interrupt management.

I use the WAKEUP TIMER driver to set up some interrupts (button, SPI, etc.). Is it mandatory to call the function "wkupct_enable_irq(...)" in "periph_init()" to restore interrupt configuration after each wake-up from sleep mode (either deep or extended)?

My question comes from the fact that, according to UM-B-004 (note 1), "Upon system wakeup from either extended or deep sleep mode, the device initialization and configuration functions have to be called again. The dedicated location to implement these calls is the periph_init() function in periph_setup.c.". So I am wondering if interrupts should be processed like that also.

谢谢in advance.

Matthieu

TN_Dialog
Offline
Last seen:1 day 10 hours ago
工作人员
加入:2013-12-05 15:49
Hi Matthieu,

Hi Matthieu,

The wkupct_enable_irq is not required to be called after each wakeup from BLE event, e.g. adv, connection events. The register settings are retained during sleep mode.
But wkupct_enable_irq needs to be reset after the interrupt is triggerred from a GPIO.

问候
TN_Dialog

Matthieu ANTOINE
Offline
Last seen:4 years 2 months ago
Expert
加入:2014-01-14 14:51
Thank you very much for your

Thank you very much for your answer!