5.3.4 Stop modeThe Stop mode ถูกตั้งเป็นฐานบน the Cortex?-M3 deepsleep mode ร่วมกันกับ peripheral clock gating. The voltage regulator สามารถถูกกำหนดค่าใน normal หรือ low-power mode อย่างใดอย่างหนึ่ง. ใน Stop mode, clocks ทั้งหมดใน the 1.8 V domain ถูกหยุด, the PLL, the HSI และ the HSE RC oscillators ถูกปิดการใช้งาน. SRAM and register contents ถูกรักษาไว้.
ใน the Stop mode, I/O pins ทั้งหมดจะคงสถานะเดียวกันกับใน the Run mode.
Entering Stop modeอ้างอิงถึง Table 14 สำหรับรายละเอียดทำอย่างไรถึงจะเข้าสู่ the Stop mode.
เพื่อลด power consumption เพิ่มขึ้นอีกใน Stop mode, the internal voltage regulator สามารถถูกใส่ลงใน low-power mode. ถูกกำหนดค่าโดย the LPDS bit ของ the Power control register (PWR_CR).
ถ้า Flash memory programming กำลังดำเนินการอยู่, the Stop mode entry ถูกล่าช้าออกไปจนกระทั่ง the memory access ถูกทำให้สำเร็จลง.
ถ้าการเข้าถึง the APB domain กำลังดำเนินการอยู่, The Stop mode entry ถูกล่าช้าออกไปจนกระทั่ง the APB access ถูกทำให้สำเร็จลง.
ใน Stop mode, คุณลักษณะดังต่อไปนี้สามารถถูกเลือกโดยการโปรแกรม individual control bits:
• Independent watchdog (IWDG): the IWDG ถูก started โดยการเขียนไปยัง Key register ของมันหรือโดย hardware
option. เมื่อ started แล้วมันไม่สามารถถูก stopped ยกเว้นโดย a Reset ดู Section 19.3: IWDG functional description
• Real-time clock (RTC): นี้ถูกกำหนดค่าโดย the RTCEN bit ใน the Backup domain control register (RCC_BDCR)
• Internal RC oscillator (LSI RC): นี้ถูกกำหนดค่าโดย the LSION bit ใน the Control/status register (RCC_CSR).
• External 32.768 kHz oscillator (LSE OSC): นี้ถูกกำหนดค่าโดย the LSEON bit ใน the Backup domain control register (RCC_BDCR).
The ADC หรือ DAC สามารถกิน power ในระหว่าง the Stop mode ได้อีกด้วย, เว้นแต่มันถูกปิดการใช้งานก่อนการเข้าสู่มัน(Stop mode). เพื่อปิดการใช้งาน ADC และ DAC, the ADON bit ใน the ADC_CR2 register และ the ENx bit ใน the DAC_CR register ต้องถูกเขียนให้เป็น 0 ทั้งคู่.
Note: ถ้า the application ต้องการปิดการใช้งาน the external clock ก่อนการเข้าสู่ Stop mode, the HSEON bit ต้องถูกปิดการใช้งานเป็นอันดับแรกและ the system clock สวิทช์ไปยัง HSI. มิฉะนั้น, ถ้า the HSEON bit ยังคงเปิดการใช้งานอยู่และ the external clock (external oscillator) ถูกถอดออกเมื่อเข้าสู่ Stop mode, the clock security system (CSS) feature ต้องถูกเปิดการใช้งานเพื่อตรวจจับ external oscillator failure ใดๆและหลีกเลี่ยง a malfunction behavior เมื่อเข้าสู่ stop mode.
Exiting Stop modeอ้างอิงถึง Table 14 สำหรับรายละเอียดทำอย่างไรถึงจะออกจาก the Stop mode.
เมื่อออกจาก Stop mode โดยการกำเนิด an interrupt หรือ a wakeup event, the HSI RC oscillator ถูกเลือกเป็น system clock.
เมื่อ the voltage regulator ทำงานใน low-power mode, an additional startup delay ถูกทำให้เกิดขึ้นเมื่อ waking up จาก Stop mode. โดยทำให้ the internal regulator ON ในระหว่าง Stop mode, the consumption จะสูงขึ้นแม้ว่า the startup time ถูกลดลง

WFI (Wait for Interrupt) หรือ WFE (Wait for Event) ขณะที่:
– เซ็ต SLEEPDEEP bit ใน Cortex®-M3 System Control register
– เคลียร์ PDDS bit ใน Power Control register (PWR_CR)
– เลือก the voltage regulator mode โดยการกำหนดค่า LPDS bit ใน PWR_CR
Note: เพื่อเข้าสู่ Stop mode, all EXTI Line pending bits (in Pending register (EXTI_PR)), all peripheral interrupt pending bits, and RTC Alarm flag ต้องถูก reset. มิฉะนั้น, the Stop mode entry procedure ถูกเพิกเฉยและ program execution ดำเนินต่อไป.
ถ้า WFI เคยถูกใช้สำหรับการเข้าสู่:
EXTI Line ใดๆกำหนดค่าใน Interrupt mode (the corresponding EXTI Interrupt vector ต้องถูก enabled ใน the NVIC). อ้างอิงถึง Section 10.1.2: Interrupt and exception vectors.
ถ้า WFE เคยถูกใช้สำหรับการเข้าสู่:
EXTI Line ใดๆกำหนดค่าใน event mode. อ้างอิงถึง Section 10.2.3: Wakeup event management
HSI RC wakeup time + regulator wakeup time จาก Low-power mode
ปล. ข้างล่างตารางนี้แปลในตารางนะครับ