File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ fn main() -> ! {
33
33
let _ = ccdr. clocks . hsi48_ck ( ) . expect ( "HSI48 must run" ) ;
34
34
ccdr. peripheral . kernel_usb_clk_mux ( UsbClkSel :: HSI48 ) ;
35
35
36
+ // If your hardware uses the internal USB voltage regulator in ON mode, you
37
+ // should uncomment this block.
38
+ // unsafe {
39
+ // let pwr = &*stm32::PWR::ptr();
40
+ // pwr.cr3.modify(|_, w| w.usbregen().set_bit());
41
+ // while pwr.cr3.read().usb33rdy().bit_is_clear() {}
42
+ // }
43
+
36
44
// IO
37
45
let gpioa = dp. GPIOA . split ( ccdr. peripheral . GPIOA ) ;
38
46
let gpiob = dp. GPIOB . split ( ccdr. peripheral . GPIOB ) ;
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ fn main() -> ! {
32
32
let _ = ccdr. clocks . hsi48_ck ( ) . expect ( "HSI48 must run" ) ;
33
33
ccdr. peripheral . kernel_usb_clk_mux ( UsbClkSel :: HSI48 ) ;
34
34
35
+ // If your hardware uses the internal USB voltage regulator in ON mode, you
36
+ // should uncomment this block.
37
+ // unsafe {
38
+ // let pwr = &*stm32::PWR::ptr();
39
+ // pwr.cr3.modify(|_, w| w.usbregen().set_bit());
40
+ // while pwr.cr3.read().usb33rdy().bit_is_clear() {}
41
+ // }
42
+
35
43
// IO
36
44
#[ cfg( any( feature = "rm0433" , feature = "rm0399" ) ) ]
37
45
let ( pin_dm, pin_dp) = {
You can’t perform that action at this time.
0 commit comments