diff options
| author | Barnaby Walters <[email protected]> | 2024-02-17 00:30:16 +0100 |
|---|---|---|
| committer | Barnaby Walters <[email protected]> | 2024-02-17 00:30:16 +0100 |
| commit | 6d7458dac7e768425342910e04a75c85e667cb82 (patch) | |
| tree | 029c3303956762ff7b8d9e8c7ad5fdf131bc8597 /examples | |
| parent | a24087c36c60e97f8b0aaefe57111c3a2edd6e8a (diff) | |
Refinements
* Implemented boost mode dance (RM0440 p234-245, 6.5.1)
* Enabled boost mode in usb_serial example, tested on hardware
* Removed hard requirement of a valid 48MHz source (HSI48 is checked if
requested, PLL passed through as-is and assumed to be valid)
* Used calc_pclk to calculate APB frequencies
* Refactored 48MHz configuration code to remove unnecessary let and block
* Renamed ahb_freq to hclk for clarity and consistency
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32g4/src/bin/usb_serial.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/stm32g4/src/bin/usb_serial.rs b/examples/stm32g4/src/bin/usb_serial.rs index 353ac1799..989fef5b0 100644 --- a/examples/stm32g4/src/bin/usb_serial.rs +++ b/examples/stm32g4/src/bin/usb_serial.rs | |||
| @@ -44,6 +44,7 @@ async fn main(_spawner: Spawner) { | |||
| 44 | }); | 44 | }); |
| 45 | 45 | ||
| 46 | config.rcc.sys = Sysclk::PLL1_R; | 46 | config.rcc.sys = Sysclk::PLL1_R; |
| 47 | config.rcc.boost = true; // BOOST! | ||
| 47 | 48 | ||
| 48 | if USE_HSI48 { | 49 | if USE_HSI48 { |
| 49 | // Sets up the Clock Recovery System (CRS) to use the USB SOF to trim the HSI48 oscillator. | 50 | // Sets up the Clock Recovery System (CRS) to use the USB SOF to trim the HSI48 oscillator. |
