STM32F7 5 Reset and clock control (RCC)

  • 62 Replies
  • 1473 Views
*

Offline tha

  • *****
  • 4957
    • View Profile
STM32F7 5 Reset and clock control (RCC)
« on: September 16, 2022, 01:43:08 pm »
5 Reset and clock control (RCC)

5.1 Reset

มี 3 ชนิดของ reset, ที่กำหนดเป็น system reset, power reset และ backup domain reset.

5.1.1 System reset

A system reset จะเซ็ต registers ทั้งหมดไปเป็น reset values ของพวกมัน ยกเว้น the reset flags ใน the clock controller CSR register และ the registers ใน the Backup domain (ดู Figure 12).

A system reset ถูกสร้างขึ้นเมื่อหนึ่งในเหตการณ์ต่อไปนี้ เกิดขึ้น :
1. A low level บน the NRST pin (external reset)
2. Window watchdog การสิ้นสุดของเงื่อนใขการนับ (WWDG reset)
3. Independent watchdog การสิ้นสุดของเงื่อนใขการนับ (IWDG reset)
4. A software reset (SW reset) (ดู Software reset)
5. Low-power management reset (ดู Low-power management reset)

Software reset

The reset source สามารถถูกวินิจฉัยโดยการเช็ค the reset flags ใน the RCC clock control & status register (RCC_CSR).

The SYSRESETREQ bit ใน Cortex®-M7 Application Interrupt and Reset Control Register ต้องถูกเซ็ตเพื่อบังคับ a software reset บน the device. อ้างอิงถึง the Cortex®-M7 technical reference manual สำหรับรายละเอียดที่มากขึ้น.

Low-power management reset

มี 2 ทางที่จะสร้าง a low-power management reset:
1.    Reset ที่สร้างขึ้นเมื่อเข้าสู่ Standby mode:
       reset ชนิดนี้ถูกเปิดการใช้งานโดยการรีเซ็ต nRST_STDBY bit ใน User Option Bytes. ในกรณีนี้, เมื่อไรก็ตาม a Standby
       mode entry sequence ถูกปฏิบัติสำเร็จลง, the device ถูกรีเซ็ตแทนการเข้าสู่ Standby mode.
2.    Reset เมื่อเข้าสู่ Stop mode:
       reset ชนิดนี้ถูกเปิดการใช้งานโดยการรีเซ็ต nRST_STOP bit ใน User Option Bytes. ในกรณีนี้, เมื่อไรก็ตาม a Stop mode
       entry sequence ถูกปฏิบัติสำเร็จลง, the device ถูก reset แทนการเข้าสู่ Stop mode.

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #1 on: September 17, 2022, 07:07:26 am »
5.1.2 Power reset

A power reset ถูกสร้างขึ้นเมื่อหนึ่งใน the following events เกิดขึ้น :
1. Power-on/power-down reset (POR/PDR reset) หรือ brownout (BOR) reset
2. เมื่อออกจาก Standby mode

A power reset เซ็ต registers ทั้งหมดไปเป็น reset values ของพวกมันยกเว้น the Backup domain (ดู Figure 12)

sources เหล่านี้ทำงานบน the NRST pin และมันจะถูกเก็บ low เสมอในระหว่าง the delay phase. The RESET service routine vector ถูกคงที่ที่ address 0x0000_0004 ใน the memory map.

The system reset signal ที่จัดให้กับ the device จะถูกเอาพุทที่ the NRST pin. The pulse generator รับประกัน a minimum reset pulse ช่วงเวลา 20 μs สำหรับแต่ละ  internal reset source. ในกรณีของ an external reset, the reset pulse ถูกสร้างขึ้นในขณะที่ the NRST pin ถูกยืนยัน low.



The Backup domain มี two specific resets ที่มีผลเฉพาะกับ the Backup domain (see Figure 12).

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #2 on: September 17, 2022, 08:18:23 am »
5.1.3 Backup domain reset

The backup domain reset เซ็ตทุก RTC registers และ the RCC_BDCR register ไปเป็น reset values ของพวกมัน. The BKPSRAM จะไม่ได้รับผลกระทบโดยการรีเซ็ตนี้. วิธีเดียวที่จะรีเซ็ต the BKPSRAM คือผ่านทาง the Flash interface โดยการร้องขอ a protection level เปลี่ยนจาก 1 เป็น 0.

A backup domain reset ถูกสร้างเมื่อหนึ่งของ the following events เกิดขึ้น :
1. Software reset, ทริกโดยการเซ็ต the BDRST bit ใน the Backup domain control register (RCC_BDCR).
2. VDD หรือ VBAT power on, ถ้าทั้งสองแหล่งจ่ายถูก powered off มาก่อนหน้านี้.

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #3 on: September 17, 2022, 08:29:02 am »
5.2 Clocks

Three different clock sources สามารถถูกใช้เพื่อขับ the system clock (SYSCLK):
•    HSI oscillator clock
•    HSE oscillator clock
•    Main PLL (PLL) clock

The devices มี the following two secondary clock sources:
•    32 kHz low speed internal RC (LSI RC), ซึ่งขับ the independent watchdog และเป็นทางเลือกให้ the RTC ใช้สำหรับ
      Auto- wakeup จาก Stop/Standby mode.
•    32.768 kHz low speed external crystal (LSE crystal), ซึ่งเป็นทางเลือกใช้ขับ the RTC clock (RTCCLK)

แต่ละ clock source สามารถถูก switched on หรือ off อย่างอิสระเมื่อมันไม่ได้ถูกใช้, เพื่อเพิ่มประสิทธิภาพ power consumption.



*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #4 on: September 17, 2022, 09:04:26 am »
The clock controller มอบความยืดหยุ่นในระดับสูงให้กับแอปพลิเคชันในการเลือก the external crystal หรือ the oscillator เพื่อรัน the core และ peripherals ที่ the highest frequency

ทุก peripheral clocks มาจาก their bus clock (HCLK,PLCK1, PCLK2) ยกเว้นสำหรับ:
•   The 48MHz clock, ที่ใช้สำหรับ USB OTG FS, SDMMC and RNG. clock นี้มาจากหนึ่งใน the following sources:
     –   main PLL VCO (PLLQ Clock)
     –   PLLSAI VCO (PLLSAI clock)
•   The U(S)ARTs clocks ซึ่งมาจากหนึ่งใน the following sources:
     –   System clock (SYSCLK)
     –   HSI clock
     –   LSE clock
     –   APB1 หรือ APB2 clock (PCLK1 or PCLK2 ขึ้นอยูกับว่า APB ใดถูกแมปถึง the U(S)ART)
•   The I2Cs clocks ซึ่งมาจากหนึ่งใน the following sources:
     –   System clock (SYSCLK)
     –   HSI clock
     –   APB1 clock (PCLK1)

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #5 on: September 17, 2022, 09:32:09 am »
•   I2S clock
     เพื่อให้ได้ high-quality audio performance, the I2S clock สามารถมาจากอย่างใดอย่างหนึ่ง a specific PLL (PLLI2S) หรือ
     จาก an external clock mapped บน the I2S_CKIN pin. สำหรับข้อมูลที่มากขึ้นเกี่ยวกับ I2S clock frequency และ
     precision, ดูที่ Section 32.7.5: Clock generator.
•   The SAI1 and SAI2 clocks ซึ่งมาจากหนึ่งใน the following sources:
     –   PLLSAI VCO (PLLSAIQ)
     –   PLLI2S VCO ( PLLI2SQ)
     –   External clock ที่แมปบน the I2S_CKIN pin.
•   LTDC clock
     The LTDC clock ถูกสร้างจาก a specific PLL (PLLSAI).
•   The low-power timer (LPTIM1) clock ซึ่งมาจากหนึ่งใน the following sources:
     –   LSI clock
     –   LSE clock
     –   HSI clock
     –   APB1 clock (PCLK1)
     –   External clock ที่แมปบน LPTIM1_IN1

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #6 on: September 17, 2022, 09:34:28 am »
•   I2S clock
     เพื่อให้ได้ high-quality audio performance, the I2S clock สามารถมาจากอย่างใดอย่างหนึ่ง a specific PLL (PLLI2S) หรือ
     จาก an external clock mapped บน the I2S_CKIN pin. สำหรับข้อมูลที่มากขึ้นเกี่ยวกับ I2S clock frequency และ
     precision, ดูที่ Section 32.7.5: Clock generator.
•   The SAI1 and SAI2 clocks ซึ่งมาจากหนึ่งใน the following sources:
     –   PLLSAI VCO (PLLSAIQ)
     –   PLLI2S VCO ( PLLI2SQ)
     –   External clock ที่แมปบน the I2S_CKIN pin.
•   LTDC clock
     The LTDC clock ถูกสร้างจาก a specific PLL (PLLSAI).
•   The low-power timer (LPTIM1) clock ซึ่งมาจากหนึ่งใน the following sources:
     –   LSI clock
     –   LSE clock
     –   HSI clock
     –   APB1 clock (PCLK1)
     –   External clock ที่แมปบน LPTIM1_IN1

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F7 5 Reset and clock control (RCC)
« Reply #7 on: September 17, 2022, 09:43:32 am »
•   The USB OTG HS (60 MHz) clock ซึ่งถูกจัดให้มีจาก the external PHY
•   The Ethernet MAC clocks (TX, RX and RMII) ซึ่งถูกจัดให้มีจาก the external PHY. สำหรับข้อมูลที่มากขึ้นเกี่ยวกับ the
     Ethernet configuration, ดูที่ Section 38.4.4: MII/RMII selection ใน the Ethernet peripheral description. เมื่อ the
     Ethernet ถูกใช้, the AHB clock frequency ต้องอย่างน้อย 25 MHz.
•   SPDIFRX clock: ซึ่งถูกสร้างจาก PLLI2SP VCO.
•   The HDMI-CEC clock ซึ่งมาจากหนึ่งใน the following sources:
     –   LSE clock
     –   HSI clock ที่หารด้วย 488