Copy clock setup from `stm32f0xx-hal` usb example

This commit is contained in:
Luca 2022-02-25 16:35:56 +01:00
parent 7871f832ee
commit b93a8268a4
1 changed files with 8 additions and 1 deletions

View File

@ -58,7 +58,14 @@ impl Action {
fn main() -> ! {
let mut p = Peripherals::take().unwrap();
let mut rcc = p.RCC.configure().freeze(&mut p.FLASH);
let mut rcc = p
.RCC
.configure()
.hsi48()
.enable_crs(p.CRS)
.sysclk(48.mhz())
.pclk(24.mhz())
.freeze(&mut p.FLASH);
let gpioa = p.GPIOA.split(&mut rcc);
let gpiob = p.GPIOB.split(&mut rcc);