Site Tools


projects:electronics:stm32:stm32u0_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
projects:electronics:stm32:stm32u0_notes [2025/03/29 07:11] – Choosing an LSE Crystal Andrew Yongprojects:electronics:stm32:stm32u0_notes [2025/03/30 09:33] (current) – [Choosing an LSE Crystal] redundant "substitute" typo Andrew Yong
Line 45: Line 45:
 | NRST_MODE | 1 or 3 | 1: Reset input only\\ 3. Bidirectional reset: The NRST pin is configured in reset input/output (legacy) mode | 3 is the factory setting | | NRST_MODE | 1 or 3 | 1: Reset input only\\ 3. Bidirectional reset: The NRST pin is configured in reset input/output (legacy) mode | 3 is the factory setting |
  
-:!: Note: Native USB does not enumerate if HCLK is lower than the default 16 MHz, e.g. by adjusting the AHB prescaler.+:!: Note: Native USB does not enumerate if HCLK is lower than the default 16 MHz, e.g. by adjusting the AHB prescaler. It will still work in bootloader mode for DFU, it only affects runtime usage of USB e.g. HID, CDC serial.
 ===== STM32duino LowPower & RTC ===== ===== STM32duino LowPower & RTC =====
  
Line 65: Line 65:
  
   - **Hardware**   - **Hardware**
-    - Choose a **crystal oscillator**(([[https://www.st.com/resource/en/application_note/an2867-guidelines-for-oscillator-design-on-stm8afals-and-stm32-mcusmpus-stmicroelectronics.pdf|AN2867 Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs]], §5.2: STM32-compatible low-speed resonators, Table 7: Recommended crystal / MEMS resonators for the LSE oscillator in STM32 products))+    - Choose a **32.768 kHz crystal oscillator**(([[https://www.st.com/resource/en/application_note/an2867-guidelines-for-oscillator-design-on-stm8afals-and-stm32-mcusmpus-stmicroelectronics.pdf|AN2867 Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs]], §5.2: STM32-compatible low-speed resonators, Table 7: Recommended crystal / MEMS resonators for the LSE oscillator in STM32 products)) 
 +      * JLCPCB basic part: [[https://jlcpcb.com/partdetail/SeikoEpson-Q13FC13500004/C32346|Seiko Epson FC-135 32.768 KHz 12.5 pF ±20 ppm]]
     - Choose the **load capacitance**     - Choose the **load capacitance**
       * C1 = C2 = 2 * (C<sub>L</sub> - C<sub>stray</sub>)       * C1 = C2 = 2 * (C<sub>L</sub> - C<sub>stray</sub>)
       * "Stray capacitance C<sub>stray</sub> comes from the pins of the chip and parasitics from the board. It is often approximated as 5pF."(([[https://microchip.my.site.com/s/article/Calculating-crystal-load-capacitor|Calculating crystal load capacitor]]))       * "Stray capacitance C<sub>stray</sub> comes from the pins of the chip and parasitics from the board. It is often approximated as 5pF."(([[https://microchip.my.site.com/s/article/Calculating-crystal-load-capacitor|Calculating crystal load capacitor]]))
   - **Software**   - **Software**
-    - Configure **LSE drive level**: ''%%__HAL_RCC_LSEDRIVE_CONFIG%%(//%%__LSEDRV__%%//)''; Select the lowest value that can provide robust LSE start-up((RM0503, §5.2.6: LSE clock))\\ Substitute ''//%%__LSEDRV__%%//'' substitute with:+    - Configure **LSE drive level**: ''%%__HAL_RCC_LSEDRIVE_CONFIG%%(//%%__LSEDRV__%%//)''; Select the lowest value that can provide robust LSE start-up((RM0503, §5.2.6: LSE clock))\\ Substitute ''//%%__LSEDRV__%%//'' with:
       - ''RCC_LSEDRIVE_LOW''       - ''RCC_LSEDRIVE_LOW''
       - ''RCC_LSEDRIVE_MEDIUMLOW'' (default if ''%%__HAL_RCC_LSEDRIVE_CONFIG%%'' is not called)       - ''RCC_LSEDRIVE_MEDIUMLOW'' (default if ''%%__HAL_RCC_LSEDRIVE_CONFIG%%'' is not called)
       - ''RCC_LSEDRIVE_MEDIUMHIGH''       - ''RCC_LSEDRIVE_MEDIUMHIGH''
       - ''RCC_LSEDRIVE_HIGH''       - ''RCC_LSEDRIVE_HIGH''
projects/electronics/stm32/stm32u0_notes.1743232280.txt.gz · Last modified: 2025/03/29 07:11 by Andrew Yong