main: work around spi stall erratum and debug

This commit is contained in:
Robert Jördens 2019-04-17 14:04:05 +00:00
parent 00a758ed12
commit 8ff8a4ce31
1 changed files with 6 additions and 0 deletions

View File

@ -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 {