Exiting low-power modThe MCU ออกจาก Sleep and Stop modes low-power mode ขึ้นอยู่กับวิธีที่ the low-power mode เคยเข้าสู่:
• ถ้า the WFI instruction หรือ Return from ISR เคยถูกใช้ในการเข้าสู่ the low-power mode, peripheral interrupt ใดๆที่
ยอมรับโดย the NVIC สามารถปลุก the device.
• ถ้า the WFE instruction ถูกใช้ในการเข้าสู่ the low-power mode, the MCU จะออกจาก the low-power mode ทันทีที่ an
event เกิดขึ้น. The wakeup event สามารถถูกสร้างโดยอย่างใดอย่างหนึ่ง:
– NVIC IRQ interrupt:
เมื่อ SEVONPEND = 0 ใน the Cortex®-M7 System Control register: โดยการเปิดใช้งาน an interrupt ใน the
peripheral control register และใน the NVIC. เมื่อ the MCU กลับมาทำงานต่อจาก WFE, the peripheral interrupt
pending bit และ the NVIC peripheral IRQ channel pending bit (ใน the NVIC interrupt clear pending register)
ต้องถูกเคลียร์. เฉพาะ NVIC interrupts ที่มี sufficient priority เท่านั้นที่จะปลุกและอินเตอร์รัพท์ the MCU.
เมื่อ SEVONPEND = 1 ใน the Cortex®-M7 System Control register: โดยการเปิดใช้งาน an interrupt ใน the
peripheral control register และเป็นทางเลือกใน the NVIC. เมื่อ the MCU กลับมาทำงานต่อจาก WFE, the peripheral
interrupt pending bit และเมื่อที่เปิดใช้งาน the NVIC peripheral IRQ channel pending bit (ใน the NVIC interrupt
clear pending register) ต้องถูกเคลียร์. ทุก NVIC interrupts จะปลุก the MCU, แม้นตัวที่ปิดใช้งานด้วย.เฉพาะ NVIC
interrupts ที่เปิดใช้งานที่มี priority เพียงพอเท่านั้นที่จะปลุกและอินเตอร์รัพท์ the MCU.
– Event
นี้ทำได้โดยการกำหนดค่า a EXTI line ใน event mode. เมื่อ the CPU กลับมาทำงานต่อจาก WFE, ไม่มีความจำเป็นที่จะเคลียร์
the EXTI peripheral interrupt pending bit หรือ the NVIC IRQ channel pending bit เนื่องจาก the pending bits ที่
ตรงกันกับ the event line ไม่ได้ถูกเซ็ต. อาจมีความจำเป็นที่จะเคลียร์ the interrupt flag ใน the peripheral.
The MCU ออกจาก Standby low-power mode ผ่านทาง an external reset (NRST pin), an IWDG reset, a rising edge บนหนึ่งใน the enabled WKUPx pins หรือ a RTC event เกิดขึ้น (ดู Figure 284: RTC block diagram).
หลังจาก waking up จาก Standby mode, program execution สตาร์ทใหม่ในวิธีเดียวกันกับหังจาก a Reset (สุ่ม boot pin , โหลด option bytes, reset vector ถูกเฟทช์, etc.). เฉพาะ NVIC interrupts ที่เปิดใช้งานที่มี priority เพียงพอเท่านั้น ที่จะปลุกและอินเตอร์รัพท์ the MCU.


