This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USBD EVENTCAUSE=Ready no longer firing

Hi,

I just switched over from the nrf52840PDK to the nrf52840DK and I'm running into an issue where the DK board is not firing the NRF_USBD->EVENTCAUSE = Ready event.

I'm trying to enumerate the nrf52840 as USB CDC_ACM Device and the enumeration sequence goes through on the PDK (lists under lsusb and ttyACM0) but not on the DK. (I'm running the exact same code on both chips.)

After looking at the registers and following through where it's failing in the device initialization and enumeration sequence I'm finding that after setting NRF_USBD->Enable to enabled is that the Ready event isn't firing. I can look at the addresses and see that 0x40027500 = 1 for the ENABLE register and 0x40027300 = 00000000010000000000000000000000 which shows that the USBEVENT interrupt is allowed, but 0x40027158 remains 0 and never fires and 0x40027400 also remains zero'd out.

I'm still receiving the USBPWRRDY event from the Power Interrupt Handler but I can't process any USB events.

Was there a change from the nrf52840PDK to the nrf52840DK that I'm unaware of that changes the event/initialization requirements to start up the USBD events?

  • Small Update:

    So I tested the SDK15 and SDK14 cdc_acm examples and they are running into the same issues on the NRF52840DK.

    I flashed the Development Kit using 'make flash' and via SEGGER I'm able to see that it's getting stuck waiting for the EVENTCAUSE=ready event.

    However, if I flash the NRF52840DK with the HEX file 'usbd_cdc_acm_pca10056.hex' it works just fine. I've re-downloaded the SDK to confirm there wasn't an issue with code potentially being modified and ran a 'make flash' again and I'm still running into the same problem.

    The examples work as expected on the PDK still.

  • Update;

    I've found in the Errata list that the issue I'm running into is Errata 187.

    I applied the workaround in my code and I'm now receiving USBD events again.

    If I run into more issues with the enumeration sequence on the DK I'll come back and provide another update.

Related