From 6b04f0e73c3abd111f743a5190da8c719319ddbc Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 9 May 2022 21:10:34 +0800 Subject: [PATCH] fix missing pullup bit, required for core to operate correctly even though it's not hooked up externally, it affects the internal logic somehow? --- services/usb-test/src/hw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/usb-test/src/hw.rs b/services/usb-test/src/hw.rs index 5e3c5864d..beea7ccac 100644 --- a/services/usb-test/src/hw.rs +++ b/services/usb-test/src/hw.rs @@ -134,7 +134,7 @@ impl SpinalUdcRegs { } pub fn set_config(&self, cfg: UdcConfig) { unsafe { - self.regs.load(Ordering::SeqCst).add(CONFIG_OFFSET / size_of::()).write_volatile(cfg.0) + self.regs.load(Ordering::SeqCst).add(CONFIG_OFFSET / size_of::()).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