Work
Projects- 3D Printing Projects
- Amateur Radio
- Automotive Projects
- Electronics Projects
- Gaming Projects
- Homelab Projects
- Horticulture Projects
- Other Projects
- Project Projects
- Software Projects
- Tumblr (photography)
-
Work
ProjectsThis is an old revision of the document!
In order to use the native USB for programming on pins PA11 and PA12, the following settings must be done in STM32CubeProgrammer → Option bytes → User Configuration.
| Option byte name | Value | Description | Notes |
|---|---|---|---|
| NBOOT_SEL | 0 (Unchecked) | BOOT0 pin (legacy mode) | |
| nBOOT1 | 1 (Checked) | Boot from Flash if BOOT0 = 1, otherwise System Memory | This 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.
| State | Peripherals | Memory | Voltage Supplies (VDDx) | STM32RTC::LSI_CLOCK | STM32RTC::LSE_CLOCK | STM32RTC::HSE_CLOCK |
|---|---|---|---|---|---|---|
| LowPower.idle() | On | On | On | Supported | Supported | Supported |
| LowPower.sleep() | On | On | On | Supported | Supported | Supported |
| LowPower.deepSleep() | On | On | On | Supported | Supported | Supported |
| LowPower.shutdown() | Off | Off | Off | Supported |
: External hardware required
rtc.setClockSource(STM32RTC::LSE_CLOCK); rtc.begin();
__HAL_RCC_LSEDRIVE_CONFIG(__LSEDRV__); Select the lowest value that can provide robust LSE start-up5)__LSEDRV__ substitute with:RCC_LSEDRIVE_LOWRCC_LSEDRIVE_MEDIUMLOW (default if __HAL_RCC_LSEDRIVE_CONFIG is not called)RCC_LSEDRIVE_MEDIUMHIGHRCC_LSEDRIVE_HIGH