STM32F7 5 Reset and clock control (RCC)

Started by tha, September 16, 2022, 01:43:08 PM

Previous topic - Next topic

tha


tha


tha

5.3.20 RCC backup domain control register (RCC_BDCR)

Address offset: 0x70
Reset value: 0x0000 0000, reset by Backup domain reset.
Access: 0 ≤ wait state ≤ 3, word, half-word and byte access
Wait states จะถูกแทรกในกรณีที่มีการเข้าถึงอย่างต่อเนื่องไปยัง register นี้.

The LSEON, LSEBYP, LSEDRV[1:0], RTCSEL and RTCEN bits ใน the RCC backup domain control register (RCC_BDCR) อยูใน the Backup domain. ผลที่ตามมา, หลังจาก Reset, บิตเหล่านี้จะถูกป้องกันการเขียนและ the DBP bit ใน the PWR power control register (PWR_CR1) ต้องถูกเซ็ตก่อนเหล่านี้สามารถถูกแก้ไข. ดูที่ Section 5.1.1: System reset บนหน้า 132 สำหรับข้อมูลเพิ่มเติม. บิตเหล่านี้จะถูกรีเซ็ตเฉพาะหลังจาก a Backup domain Reset (ดู Section 5.1.3: Backup domain reset). Any internal or external Reset จะไม่มีผลใดๆกับบิตเหล่านี้.



Bits 31:17 Reserved, must be kept at reset value.

Bit 16 BDRST: Backup domain software reset
     บิตนี้ถูกเซ็ตและเคลียร์โดย software.
     0: Reset ไม่ถูกทำให้ทำงาน
     1: รีเซ็ต the entire Backup domain
  Note: The BKPSRAM ไม่ได้รับผลกระทบโดยรีเซ็ตนี้, วิธีเดียวของการรีเซ็ต the BKPSRAM คือผ่านทาง the Flash interface เมื่อ a
              protection level เปลี่ยนจาก level 1 ไปเป็น level 0 ถูกร้องขอ.


Bit 15 RTCEN: RTC clock enable
     บิตนี้ถูกเซ็ตและเคลียร์โดย software.
     0: RTC clock ถูกปิดใช้งาน
     1: RTC clock ถูกเปิดใช้งาน

Bits 14:10 Reserved, must be kept at reset value.


tha

Bits 9:8 RTCSEL[1:0]: RTC clock source selection
     บิตเหล่านี้ถูกเซ็ตโดย software เพื่อเลือก the clock source สำหรับ the RTC. ทันทีที่ the RTC clock source ถูกเลือกแล้ว, มัน 
     ไม่สามารถถูกเปลี่ยนได้อีกต่อไปยกเว้น the Backup domain ถูกรีเซ็ต. The BDRST bit สามารถถูกใช้เพื่อรีเซ็ตพวกมัน.
     00: No clock
     01: LSE oscillator clock ถูกใช้เป็น the RTC clock
     10: LSI oscillator clock ถูกใช้เป็น the RTC clock
     11: HSE oscillator clock ถูกหารด้วย a programmable prescaler (เลือกผ่านทาง the RTCPRE[4:0] bits ใน the RCC
           clock configuration register (RCC_CFGR)) ถูกใช้เป็น the RTC clock

Bits 7:5 Reserved, must be kept at reset value.

Bits 4:3 LSEDRV[1:0]: LSE oscillator drive capability
     เซ็ตโดย software เพื่อทำให้เหมาะ the LSE oscillator's drive capability.
     00: Low driving capability
     01: Medium high driving capability
     10: Medium low driving capability
     11: High driving capability

Bit 2 LSEBYP: External low-speed oscillator bypass
     บิตนี้ถูกเซ็ตและเคลียร์โดย software เพื่อข้ามผ่าน the oscillator. บิตนี้สามารถถูกเขียนเฉพาะเมื่อ the LSE clock ถูกปิดใช้งาน.
     0: LSE oscillator ไม่ถูกข้ามผ่าน
     1: LSE oscillator ถูกข้ามผ่าน

Bit 1 LSERDY: External low-speed oscillator ready
     บิตนี้ถูกเซ็ตและเคลียร์โดย hardware เพื่อแสดงให้เห็นเมื่อ the external 32 kHz oscillator เสถียร. หลังจาก the LSEON bit ถูก
     เคลียร์, LSERDY จะลงไป low หลังจาก 6 external low-speed oscillator clock cycles.
     0: LSE clock not ready
     1: LSE clock ready

Bit 0 LSEON: External low-speed oscillator enable
     บิตนี้ถูกเซ็ตและเคลียร์โดย software.
     0: LSE clock OFF
     1: LSE clock ON

tha

5.3.21 RCC clock control & status register (RCC_CSR)

Address offset: 0x74
Reset value: 0x0E00 0000, รีเซ็ตโดย system reset, ยกเว้น reset flags โดย power reset เท่านั้น.
Access: 0 ≤ wait state ≤ 3, word, half-word and byte access
Wait states จะถูกแทรกในกรณีที่มีการเข้าถึงอย่างต่อเนื่องถึง register นี้.



Bit 31 LPWRRSTF: Low-power reset flag
     บิตนี้ถูกเซ็ตโดย hardware เมื่อ a Low-power management reset เกิดขึ้น. เคลียร์โดยการเขียนไปยัง the RMVF bit.
     0: ไม่มี Low-power management reset เกิดขึ้น
     1: Low-power management reset เกิดขึ้น
     สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ Low-power management reset, ดูที่ Low-power management reset.

Bit 30 WWDGRSTF: Window watchdog reset flag
     This bit is set by hardware when a window watchdog reset occurs. Cleared by writing to the RMVF bit.
     0: No window watchdog reset occurred
     1: Window watchdog reset occurred

Bit 29 IWDGRSTF: Independent watchdog reset flag
     This bit is set by hardware when an independent watchdog reset from VDD domain occurs. Cleared by writing
     to the RMVF bit.
     0: No watchdog reset occurred
     1: Watchdog reset occurred

Bit 28 SFTRSTF: Software reset flag
     This bit is set by hardware when a software reset occurs. Cleared by writing to the RMVF bit.
     0: No software reset occurred
     1: Software reset occurred

Bit 27 PORRSTF: POR/PDR reset flag
     This bit is set by hardware when a POR/PDR reset occurs. Cleared by writing to the RMVF bit.
     0: No POR/PDR reset occurred
     1: POR/PDR reset occurred

Bit 26 PINRSTF: PIN reset flag
     This bit is set by hardware when a reset from the NRST pin occurs. Cleared by writing to the RMVF bit.
     0: No reset from NRST pin occurred
     1: Reset from NRST pin occurred

Bit 25 BORRSTF: BOR reset flag
     Cleared by software by writing the RMVF bit. This bit is set by hardware when a POR/PDR or BOR reset
     occurs.
     0: No POR/PDR or BOR reset occurred
     1: POR/PDR or BOR reset occurred

Bit 24 RMVF: Remove reset flag
     This bit is set by software to clear the reset flags.
     0: No effect
     1: Clear the reset flags

Bits 23:2 Reserved, must be kept at reset value.

Bit 1 LSIRDY: Internal low-speed oscillator ready
     บิตนี้ถูกเซ็ตและเคลียร์โดย hardware เพื่อแสดงให้เห็นเมื่อ the internal RC 40 kHz oscillator เสถียร. หลังจาก the LSION bit
     ถูกเคลียร์, LSIRDY จะไป low หลังจาก 3 LSI clock cycles.
     0: LSI RC oscillator not ready
     1: LSI RC oscillator ready

Bit 0 LSION: Internal low-speed oscillator enable
     This bit is set and cleared by software.
     0: LSI RC oscillator OFF
     1: LSI RC oscillator ON

tha

5.3.22 RCC spread spectrum clock generation register (RCC_SSCGR)

Address offset: 0x80
Reset value: 0x0000 0000
Access: no wait state, word, half-word and byte access.
The spread spectrum clock generation มีให้ใช้งานเฉพาะสำหรับ the main PLL.
The RCC_SSCGR register ต้องถูกเขียนอย่างใดอย่างหนึ่งก่อน the main PLL ถูกเปิดใช้งานหรือหลังจาก the main PLL ถูกปิดใช้งาน.
Note: สำหรับรายละเอียดเต็มเกี่ยวกับ PLL spread spectrum clock generation (SSCG) characteristics, ดูที่
           the "Electrical characteristics" section ใน your device datasheet.




Bit 31 SSCGEN: Spread spectrum modulation enable
     บิตนี้ถูกเซ็ตและเคลียร์โดย software.
     0: Spread spectrum modulation DISABLE. (เขียนหลังจากการเคลียร์ CR[24]=PLLON bit)
     1: Spread spectrum modulation ENABLE. (เขียนหลังจากการเซ็ต CR[24]=PLLON bit)

Bit 30 SPREADSEL: Spread Select
     บิตนี้ถูกเซ็ตและเคลียร์โดย software.
     เขียนก่อนที่จะเซ็ต CR[24]=PLLON bit.
     0: Center spread
     1: Down spread

Bits 29:28 Reserved, must be kept at reset value.

Bits 27:13 INCSTEP: Incrementation step
     บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software. เขียนก่อนการเซ็ต CR[24]=PLLON bit.
     Configuration input สำหรับ modulation profile amplitude.

Bits 12:0 MODPER: Modulation period
      บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software. เขียนก่อนการเซ็ต CR[24]=PLLON bit.
     Configuration input สำหรับ modulation profile period.

tha

5.3.23 RCC PLLI2S configuration register (RCC_PLLI2SCFGR)

Address offset: 0x84
Reset value: 0x2400 3000
Access: no wait state, word, half-word and byte access.
รีจีสเตอร์นี้ถูกใช้เพื่อกำหนดค่า the PLLI2S clock outputs สอดคล้องกันกับ the formulas:
     f(VCO clock) = f(PLLI2S clock input) × (PLLI2SN / PLLM)
     f(PLLI2S_P) = f(VCO clock) / PLLI2SP
     f(PLLI2S_Q) = f(VCO clock) / PLLI2SQ
     f(PLLI2S_R) = f(VCO clock) / PLLI2SR



Bit 31 Reserved, must be kept at reset value.

Bits 30:28 PLLI2SR[2:0]: PLLI2S division factor for I2S clocks
     บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software เพื่อควบคุม the I2S clock frequency. บิตเหล่านี้ควรถูกเขียนเฉพาะถ้า the PLLI2S ถูก
     ปิดใช้งาน. The factor ต้องถูกเลือกให้สอดคล้องกันกับ the prescaler values ภายใน the I2S peripherals, เพื่อให้ถึง 0.3%
     error เมื่อใช้ standard crystals และ 0% error ด้วย audio crystals. สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ I2S clock frequency และ
     precision, ดูที่ Section 32.7.4: Start-up description in the I2S chapter.

     Caution: The I2Ss ต้องการ a frequency ที่ต่ำกว่าหรือเท่ากับ 192 MHz เพื่อทำงานอย่างถูกต้อง.
     I2S clock frequency = VCO frequency / PLLR ด้วย 2 ≤ PLLR ≤ 7
     000: PLLR = 0, wrong configuration
     001: PLLR = 1, wrong configuration
     010: PLLR = 2
     ...
     111: PLLR = 7

tha

Bits 27:24 PLLI2SQ[3:0]: PLLI2S division factor for SAIs clock
     บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software เพื่อควบคุม the SAIs clock frequency.
     พวกมันควรถูกเขียนเมื่อ the PLLI2S is disabled.
     SAI clock frequency = VCO frequency / PLLI2SQ ด้วย 2 <= PLLI2SIQ <= 15
     0000: PLLI2SQ = 0, wrong configuration
     0001: PLLI2SQ = 1, wrong configuration
     0010: PLLI2SQ = 2
     0011: PLLI2SQ = 3
     0100: PLLI2SQ = 4
     0101: PLLI2SQ = 5
     ...
     1111: PLLI2SQ = 15

Bits 23:18 Reserved, must be kept at reset value.

Bits 17:16 PLLI2SP[1:0]: PLLI2S division factor for SPDIFRX clock
     บิตเหล่านี้ถูกเซ็ตและเคลียร์โดย software เพื่อควบคุม the SPDIFRX clock. บิตเหล่านี้ควรถูกเขียนเฉพาะถ้า the PLLI2S ถูก
     ปิดใช้งาน.
     The factor ต้องถูกเลือกให้สอดคล้องกันกับ the prescaler values ภายใน the SPDIF เพื่อให้ถึง an audio clock ให้ใกล้กับ 44
     kHz หรือ 48 kHz สอดคล้องกับ the SPDIF mode
     SPDIF clock frequency = VCO frequency / PLLI2SP ด้วย PLLI2S P = 2, 4, 6, or 8
     00: PLLI2SP = 2
     01: PLLI2SP = 4
     10: PLLI2SP = 6
     11: PLLI2SP = 8