fix missing pullup bit, required for core to operate correctly

even though it's not hooked up externally, it affects the internal
logic somehow?
This commit is contained in:
bunnie 2022-05-09 21:10:34 +08:00
parent 047b9e539d
commit 6b04f0e73c

View file

@ -134,7 +134,7 @@ impl SpinalUdcRegs {
}
pub fn set_config(&self, cfg: UdcConfig) {
unsafe {
self.regs.load(Ordering::SeqCst).add(CONFIG_OFFSET / size_of::<u32>()).write_volatile(cfg.0)
self.regs.load(Ordering::SeqCst).add(CONFIG_OFFSET / size_of::<u32>()).write_volatile(cfg.0 | 1) // 0x1 => enable pullup
}
}
/// the ram starting at 0 has a size of 1 << ramsize. Only the lower 4 bits are valid, but the field takes up a u32