From 1a9b4e48eff0d0b733f99e0bb24c9ef2394461ff Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 10 Aug 2025 16:08:44 +0800 Subject: [PATCH] leave bread crumb about the upgrade to HS usb --- libs/cramium-hal/src/usb/driver.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/cramium-hal/src/usb/driver.rs b/libs/cramium-hal/src/usb/driver.rs index 7cc2acbc2..660556967 100644 --- a/libs/cramium-hal/src/usb/driver.rs +++ b/libs/cramium-hal/src/usb/driver.rs @@ -294,6 +294,14 @@ pub struct Uicr { } const CRG_UDC_CFG0_MAXSPEED_FS: u32 = 1; +// surprisingly, just swapping this constant in "sort of works" +// some to-do around figuring out why the protocol breaks, could +// just be signal integrity because too many connectors, but very +// likely this is also an inability to handle the longer packet +// sizes mandated by the HS protocol. +// +// leave as a warning so we have this as a TODO. +const CRG_UDC_CFG0_MAXSPEED_HS: u32 = 3; pub const CRG_UDC_ERDPLO_EHB: u32 = 1 << 3; @@ -1169,6 +1177,7 @@ impl CorigineUsb { // wait for reset to finish } + // TODO: ugprade this to HS self.csr.wo(DEVCONFIG, 0x80 | CRG_UDC_CFG0_MAXSPEED_FS); self.csr.wo(