Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to Debug nRF52840 USB CDC ACM example.

Using SDK 14.2.0 and PCA10056 Dev kit: when I load the example (usbd_cdc_acm) and flash it, it works well, can communicate in both directions (windows 10 and debian linux).
When I start the debugger and then attach the USB while running it gets to waiting for USB READY (line 1706 of nrf_drv_usbd.c) and waits there forever.
Is this behaviour known and how would I go about debugging USB CDC?

My guess is that there is a timing error or race condition in the driver.
I found this in my own project and came back to the example to verify it (fresh extraction of the SDK zip in fresh project).

I am using Eclipse with GCC and GDB with the Segger GDB server

Parents
  • Hi,

     

    It sounds like you are using engineering revision B or C of the silicon.

    One of the unfortunate issues with SDK v14.2 is that it does not include workarounds for revision B and C of the nRF52840 engineering samples, so you will have to add them manually.

    I suspect that you are running into this errata:

    USB cannot be enabled

     

    You can add the above errata workaround to the components/drivers_nrf/hal/nrf_usbd.h::nrf_usbd_enable()

     

    Could you try this and see if that works?

     

    Best regards,

    Håkon

     

Reply
  • Hi,

     

    It sounds like you are using engineering revision B or C of the silicon.

    One of the unfortunate issues with SDK v14.2 is that it does not include workarounds for revision B and C of the nRF52840 engineering samples, so you will have to add them manually.

    I suspect that you are running into this errata:

    USB cannot be enabled

     

    You can add the above errata workaround to the components/drivers_nrf/hal/nrf_usbd.h::nrf_usbd_enable()

     

    Could you try this and see if that works?

     

    Best regards,

    Håkon

     

Children
Related