STM32F1 PWR

Started by tha, October 29, 2020, 08:55:20 AM

Previous topic - Next topic

tha

5 Power control (PWR)
Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
High-density devices are STM32F101xx and STM32F103xx microcontrollers where the
Flash memory density ranges between 256 and 512 Kbytes.
XL-density devices are STM32F101xx and STM32F103xx microcontrollers where the
Flash memory density ranges between 768 Kbytes and 1 Mbyte.
Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
This section applies to the whole STM32F101xx family, unless otherwise specified.

5.1 Power supplies
The device ต้องการ a 2.0-to-3.6 V operating voltage supply (VDD). An embedded regulator ถูกใช้เพื่อจ่าย the internal 1.8 V digital power.
The real-time clock (RTC) และ backup registers สามารถถูกให้พลังงานจาก the VBAT voltage เมื่อ the main VDD supply ถูก powered off.


1. VDDA and VSSA ต้องถูกต่อไปยัง VDD and VSS, ตามลำดับ.

tha

5.1.1 Independent A/D and D/A converter supply and reference voltage
เพื่อปรับปรุง conversion accuracy, the ADC and the DAC มี an independent power supply ซึ่งสามารถถูก separately filtered and shielded จาก noise บน the PCB.
• The ADC and DAC voltage supply input มีให้ใช้บน a separate VDDA pin.
• An isolated supply ground connection ถูกจัดให้มีบน pin VSSA.
เมื่อมีให้ใช้งาน (สอดคล้องกับ package), VREF- ต้องถูกต่อถึง VSSA.

On 100-pin and 144-pin packages
เพื่อให้แน่ใจว่ามีความแม่นยำที่ดีขึ้นสำหรับ low-voltage inputs and outputs, ผู้ใช้สามารถต่อ a separate external reference voltage on VREF+. VREF+ เป็น the highest voltage, ที่แสดงโดย the full scale value, สำหรับ an analog input (ADC) หรือ output (DAC) signal. The voltage บน VREF+ สามารถมีย่านจาก 2.4 V ถึง VDDA.

On 64-pin packages and packages ที่มี pins น้อยกว่า
The VREF+ and VREF- pins ไม่มีให้ใช้งาน, พวกมันถูกต่อภายในเข้ากับ the ADC voltage supply (VDDA) and ground (VSSA).

ปล. ท่านใดมีงานให้ทำ ก็ติดต่อมาได้นะครับ

tha

5.1.2 Battery backup domain
เพื่อรักษาข้อมูลของ the Backup registers และจ่ายไฟ the RTC function เมื่อ VDD ถูก turned off, VBAT pin สามารถถูกต่อถึง an optional standby voltage ที่จ่ายไฟโดย a battery หรือโดยแหล่งจ่ายไฟอื่นๆ.

The VBAT pin จ่ายพลังงานให้ the RTC unit, the LSE oscillator และ the PC13 ถึง PC15 IOs, ยอมให้ the RTC ทำงานถึงแม้เมื่อ the main digital supply (VDD) ถูก turned off. การสวิทช์ไปยัง the VBAT supply ถูกควบคุมโดย the Power Down Reset ที่ฝังใน the Reset block.

Warning: ในระหว่าง tRSTTEMPO (เป็นการชั่วคราวที่ VDD startup) หรือหลังจาก a PDR ถูกตรวจจับ, the power switch ระหว่าง
              VBAT และ VDD ยังคงต่อถึง VBAT.
              ในระหว่าง the startup phase, ถ้า VDD ถูกก่อตัวขึ้นในน้อยกว่า tRSTTEMPO (อ้างอิงถึง the datasheet สำหรับค่าของ
              tRSTTEMPO) และ VDD > VBAT + 0.6 V, กระแสอาจถูกฉีดเข้าไปใน VBAT ผ่านทาง an internal diode ที่ต่อระหว่าง
              VDD และ the power switch (VBAT).
              ถ้า the power supply/battery ที่ต่อถึง the VBAT pin ไม่สามารถรองรับกระแสไฟที่ฉีดเข้าไปนี้, ขอแนะนำอย่างยิ่งให้เชื่อม
              ต่อ an external low-drop diode ระหว่าง power supply และ the VBAT pin.

ถ้าไม่มี external battery ถูกใช้ใน the application, ขอแนะนำให้ต่อ VBAT ภายนอกถึง VDD ด้วย a 100 nF external ceramic decoupling capacitor (สำหรับรายละเอียดที่มากกว่าอ้างอิงถึง AN2586).

เมื่อ the backup domain ถูกจ่ายไฟโดย VDD (analog switch ต่อถึง VDD), หน้าที่ดังต่อไปนี้มีให้ใช้งาน :
• PC14 และ PC15 สามารถถูกใช้เป็น GPIO หรือ LSE pins อย่างใดอย่างหนึ่ง
• PC13 สามารถถูกใช้เป็น GPIO, TAMPER pin, RTC Calibration Clock, RTC Alarm หรือ second output (อ้างอิงถึง Section 6: Backup registers (BKP))

Note: เนื่องจากความจริงแล้ว the switch นี้รับกระแสจำนวนจำกัดเพียง (3 mA), การใช้งานของ GPIOs PC13 ถึง PC15 ใน output
         mode ถูกจำกัด : ความเร็วต้องถูกจำกัดไว้ที่ 2 MHz ด้วยโหลดสูงสุดของ 30 pF และ IOs เหล่านี้ต้องไม่ถูกใช้เป็นแหล่งจ่ายกระแส
         (ตัวอย่างเช่น เพื่อขับ a LED)

เมื่อ the backup domain ถูกจ่ายไฟโดย VBAT (analog switch ต่อถึง VBAT เพราะว่า VDD ไม่มี), หน้าที่ดังต่อไปนี้มีให้ใช้งาน :
• PC14 และ PC15 สามารถถูกใช้เป็น LSE pins เท่านั้น
• PC13 สามารถถูกใช้เป็น TAMPER pin, RTC Alarm หรือ Second output (อ้างอิงถึง Section 6.4.2: RTC clock calibration register (BKP_RTCCR)).


tha

5.1.3 Voltage regulator
The voltage regulator ถูกเปิดการใช้งานเสมอหลังจาก Reset. มันทำงานใน three different modes ขึ้นอยู่กับ the application modes.
• ใน Run mode, the regulator จ่าย full power ไปยัง the 1.8 V domain (core, memories and digital peripherals).
• ใน Stop mode the regulator จ่าย low-power ไปยัง the 1.8 V domain, เก็ยรักษาข้อมูลของ registers และ SRAM
• ใน Standby Mode, the regulator ถูก powered off. ข้อมูลของ the registers and SRAM จะสูญหายยกเว้นสำหรับ the Standby circuitry และ the Backup Domain.

tha

5.2 Power supply supervisor

5.2.1 Power on reset (POR)/power down reset (PDR)
The device มี an integrated POR/PDR circuitry ที่ยอมให้การทำงานอย่างเหมาะสมเริ่มจาก/ลงถึง 2 V.
The device ยังคงอยู่ใน Reset mode เมื่อ VDD/VDDA อยู่ต่ำกว่าขอบเขตที่ระบุไว้, VPOR/PDR, ปราศจากความต้องการ an external reset circuit. สำหรับรายละเอียดเพิ่มเติมเกี่ยวกับ the
power on/power down reset threshold, อ้างอิงถึง the electrical characteristics ของ the datasheet.



ปล. อากาศเย็นก็ไปได้เรื่อยๆ นะสี่เดือนนะ ไปจอดป้ายหน้าร้อนโน้นแหละ สาเหตุที่ประเทศไทยไม่เจริญทางด้านวัตถุเทคโนโลยี่
      ร้อนมันอ่านหนังสือไม่ได้ คิดอะไรยากๆไม่ได้

tha

5.2.2 Programmable voltage detector (PVD)
The PVD สามารถถูกใช้เพื่อตรวจจับ the VDD/VDDA power supply โดยเปรียบเทียบมันกับขอบเขตที่เลือกโดย the PLS[2:0] bits ใน the Power control register (PWR_CR).
The PVD ถูกเปิดการใช้งานโดยการเซ็ต the PVDE bit.

A PVDO flag มีให้ใช้งาน, ใน the Power control/status register (PWR_CSR), เพื่อแสดงถ้า VDD/VDDA สูงกว่าหรือต่ำกว่า the PVD threshold. เหตุการณ์นี้(event)ถูกต่อภายในถึง the EXTI line16 และสามารถทำให้เกิด an interrupt ถ้าเปิดการใช้งานผ่านทาง the EXTI registers. The PVD output interrupt สามารถถูกทำให้เกิดขึ้นเมื่อ VDD/VDDA ลดลงต่ำกว่า the PVD threshold และ/หรือเมื่อ VDD/VDDA เพิ่มขึ้นเหนือ the PVD threshold ขึ้นอยู่กับ EXTI line16 rising/falling edge configuration. ดังตัวอย่าง the service routine ควรกระทำ emergency shutdown tasks



tha

5.3 Low-power modes
ตามค่าเริ่มต้น, the microcontroller อยู่ใน Run mode หลังจาก a system หรือ a power Reset. Several lowpower modes มีให้ใช้เพื่อประหยัดพลังงานเมื่อ the CPU ไม่จำเป็นต้องให้ทำงานต่อไป, ตัวอย่างเช่นเมื่อมีการรอสำหรับ an external event. มันขึ้นอยู่กับผู้ใช้ที่จะเลือกโหมดที่จะให้การประสานที่ดีที่สุดระหว่าง low-power consumption, short startup time และ available wakeup sources

The STM32F10xxx devices มีคุณลักษณะ three low-power modes:
• Sleep mode (CPU สัญญานนาฬิกาปิด, peripherals ทั้งหมดรวมทั้ง Cortex®-M3 core peripherals เช่น NVIC, SysTick และ
   อื่น ๆ จะยังคงทำงานอยู่)
• Stop mode ( clocks ทั้งหมดถูกหยุด)
• Standby mode (1.8V domain powered-off)

นอกจากนี้, the power consumption ใน Run mode สามารถถูกลดได้โดยอย่างใดอย่างหนึ่งของวิธีดังต่อไปนี้ :
• ทำให้ช้าลง the system clocks
• เปิดเก็ต the clocks ที่ไปยัง the APB and AHB peripherals เมื่อมันไม่ได้ถูกใช้.


tha

5.3.1 Slowing down system clocks
ใน Run mode ความเร็วของ the system clocks (SYSCLK, HCLK, PCLK1, PCLK2) สามารถถูกลดลงโดยการโปรแกรม the prescaler registers. prescalers สามารถถูกใช้เพื่อให้ peripherals ช้าลงก่อนการเข้าสู่ Sleep mode.
สำหรับราบละเอียดทีมากขึ้นอ้างอิงถึง Section 7.3.2: Clock configuration register (RCC_CFGR).

5.3.2 Peripheral clock gating(ทางผ่าน, ประตู)
ใน Run mode, the HCLK and PCLKx สำหรับแต่ละเฉพาะ peripherals and memories สามารถถูกหยุดที่เวลาไหนก็ได้เพื่อลด power consumption.

เพื่อลด power consumption มากขึ้นอีกใน Sleep mode the peripheral clocks สามารถถูกปิดการใช้งานก่อนการปฏิบัติคำสั่ง the WFI or WFE instructions.

Peripheral clock gating(ทางผ่าน, ประตู) ถูกควบคุมโดย the AHB peripheral clock enable register (RCC_AHBENR), APB1 peripheral clock enable register (RCC_APB1ENR) and APB2 peripheral clock enable register (RCC_APB2ENR).