embassy/examples
Will Glynn 38e7709a24 stm32: u5: implement >55 MHz clock speeds
This commit allows STM32U5 devices to operate at 160 MHz.

On STM32U5, MSIS can run at 48 MHz and HSE can reach 50 MHz. Faster
clocks require using PLL1's R output, though PLL1 can serve other
functions besides using the R output for the system clock. This commit
extracts a public `PllConfig` struct, primarily to place associated
constructors on that type, but also with an eye towards enabling the P
and Q outputs in a later commit.

STM32U5 PLLs have various frequency requirements on each stage: after
the `m` prescaler, after the `n` multiplier, and after the `r` divider.
This commit implements the associated checks as assertions.

This commit fixes clock calculation and PLL register configuration
errors in PLL initialization.

STM32U5 has a PWR peripheral which can be configured to push Vcore into
different voltage ranges. System clocks exceeding 55 MHz require range
2, and system clocks exceeding 110 MHz require range 1. This commit
adds `voltage_range` to `Config` and configures PWR as directed.

The voltage range implies different performance limits on various clock
signals, including inside a PLL. This commit implements voltage range
<-> frequency range checks as assertions, and extracts the
otherwise-repeated MSIS, HSI16, and HSE initialization into private
methods on `Config`.

STM32U5 frequencies above 55 MHz require using the PWR EPOD booster.
The EPOD booster requires configuring a second `m` term for PLL1,
`mboost`, such that it falls in a particular range. (Recall that >50
MHz cannot be reached without PLL1, so there is no scenario where EPOD
is needed but PLL1 is not.) This commit configures and enables the EPOD
booster automatically as required.
2023-10-05 22:13:27 -05:00
..
.cargo move embassy-net-w5500 to subdir. 2023-05-31 00:54:20 +02:00
boot feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
nrf5340 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
nrf52840 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
nrf52840-rtic feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
nrf-rtos-trace feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
rp update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
std update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32c0 feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
stm32f0 stm32/adc: cleanup f1, f3, v1, and v2 2023-09-27 20:58:46 -05:00
stm32f1 stm32/adc: cleanup f1, f3, v1, and v2 2023-09-27 20:58:46 -05:00
stm32f2 stm32/rcc: convert bus prescalers to pac enums 2023-09-16 17:41:11 -05:00
stm32f3 stm32/usart: return error instead of panicking on bad baudrate. 2023-09-26 00:19:27 +02:00
stm32f4 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32f7 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32f334 stm32: update metapac and fix opamp ch 2023-10-04 16:15:08 -05:00
stm32g0 feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
stm32g4 feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
stm32h5 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32h7 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32l0 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32l1 feat: bump embassy-sync version to 0.3.0 2023-09-14 18:26:00 +02:00
stm32l4 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32l5 update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
stm32u5 stm32: u5: implement >55 MHz clock speeds 2023-10-05 22:13:27 -05:00
stm32wb Merge pull request #1916 from wkf/main 2023-09-16 20:43:02 +00:00
stm32wba stm32: add stm32wba support. 2023-09-16 04:04:45 +02:00
stm32wl stm32/rtc: enable lse in examples. 2023-09-30 00:18:30 +02:00
wasm bump wasm-pack version 2023-09-30 05:42:59 +00:00