Copy clock setup from `stm32f0xx-hal` usb example
This commit is contained in:
parent
7871f832ee
commit
b93a8268a4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue