main: work around spi stall erratum and debug
This commit is contained in:
parent
00a758ed12
commit
8ff8a4ce31
|
@ -571,6 +571,12 @@ fn main() -> ! {
|
|||
&spi5.cr1 as *const _ as usize);
|
||||
|
||||
rcc.apb1lenr.modify(|_, w| w.tim2en().set_bit());
|
||||
|
||||
// work around the SPI stall erratum
|
||||
//let dbgmcu = dp.DBGMCU;
|
||||
//dbgmcu.apb1lfz1.modify(|_, w| w.stop_tim2().set_bit()); // stop tim2 in debug
|
||||
unsafe { ptr::write_volatile(0x5c00_103c as *mut usize, 0x0000_0001) };
|
||||
|
||||
tim2_setup(&dp.TIM2);
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in New Issue