2023-12-11 09:51 PM
Hi all,
I have a STM32F730I8K6 that handles USB comms (internal PHY, high-speed mode, 480 Mbps). The firmware is the 100% stock firmware generated by STM32CubeIDE, with only the USB peripheral enabled.
Connected to an Intel Mac, USB comms are reliable: performing GET_STATUS device requests in a tight loop works reliably.
Connected to an ARM (Apple silicon) Mac, USB comms are flaky: performing GET_STATUS device requests in a tight loop fails sporadically (kIOReturnNotResponding).
When the failure happens, the STM firmware is getting a USB_OTG_DIEPINT_TOC interrupt, which is described by the Reference Manual as:
"Indicates that the core has detected a timeout condition on the USB for the last IN token on this endpoint."
I'm not sure what to do with that information though. After several days experimenting, the only thing that's made a difference is forcing the device to enumerate as a full-speed device, using the OTG_DCFG.DSPD register; USB comms are reliable when doing that.
Does anyone have any suggestions on things to try to debug? (I've ordered a USB protocol analyzer, and also ordered a STM32F723E-DISCO board to see if it works with an ARM Mac.)
Thanks!