By setting both CLKDIV1 and CLKDIV4 at the same time we avoid
running the flash at twice the intended clock rate for a couple
of cycles which has been observed to make it read bad data.
fn configure_clkdiv() {
let mut clkdiv1 = Reg32::new(SIM_CLKDIV1);
- clkdiv1.write(1 << SIM_CLKDIV1_OUTDIV4_SHIFT);
- clkdiv1.modify(|v| v | (1 << SIM_CLKDIV1_OUTDIV1_SHIFT));
+ clkdiv1.write((1 << SIM_CLKDIV1_OUTDIV4_SHIFT)
+ | (1 << SIM_CLKDIV1_OUTDIV1_SHIFT));
}
fn switch_to_fbe() {