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

nRF52840 USB hardfault

Hello,

I am evaluating the USB audio example from SDK v14 with an nRF52840-Preview-DK (PCA10056, V0.9.2, 2017.25).

SW9 is set to VDD power, SW6 is set to DEFAULT. The board is connected over both USB connectors to the same computer. The JLink CDC port works well, and I have flashed the precompiled usbd_audio_pca10056.hex file.

The connection over the native USB port fails most of the time: Windows 7 (x64) then does not recognize the USB device. A few times the connection is OK, and windows installs the driver for the USB audio device and I can set the default playback and recording devices in windows as required for the example.

In the latter case, most of the time only LED1 lights up. In one of -say- 50 trials, I get the first three DK LEDs on, which -as far as I understand- is a good sign. In that case, if I try to play back audio on the USB device, it quickly hard faults (as seen below).

I tried different USB cables, different computers and different (2.0 and 3.0) USB ports, and also recompiling from source. Results are the same.

Is this a Nordic hardware issue? Is there a workaround?

Here's the UART output:

<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:1288
<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:128A
<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:128A
<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:12AA
<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:2EB7F550
<info> app: Hello USB!
<info> app: USB power detected
<info> app: USB ready
<error> hardfault: Hardfault PC:128A

Here's the RTT log:

J-Link RTT Viewer V6.16a: Logging started.
LOG:  Global terminal added.
LOG:  Device "NRF52840_XXAA" selected.
LOG:  Found SW-DP with ID 0x2BA01477
LOG:  Found SW-DP with ID 0x2BA01477
LOG:  Scanning APs, stopping at first AHB-AP found.
LOG:  AP[0] IDR: 0x24770011 (AHB-AP)
LOG:  AHB-AP ROM: 0xE00FF000 (Base addr. of first ROM table)
LOG:  CPUID reg: 0x410FC241. Implementer code: 0x41 (ARM)
LOG:  Found Cortex-M4 r0p1, Little endian.
LOG:  FPUnit: 6 code (BP) slots and 2 literal slots
LOG:  CoreSight components:
LOG:  ROMTbl[0] @ E00FF000
LOG:  ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS
LOG:  ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
LOG:  ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
LOG:  ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
LOG:  ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
LOG:  ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
LOG:  RTT Viewer connected.

Help and comments are appreciated.  

Tamas

  • Hello, We have a similar issue. We have successfully used the PDK in mass storage device mode. It works well when connecting to the computer and we are usign it since a few months ago. Now we have built some prototypes based on the nRF52840 engineering samples. When we try to connect those prototypes to a windows or linux PC, the device is not recognized. We are using the same firmware on both the PDK and our prototypes and the schematic of our prototype is based on the PDK schematic. Could it be something related to the engineering samples ?

  • Update:

    I got a replacement from Nordic (for which I want to thank!), and it is working fine. So, it was a hardware fault.

    Tamas


    Hello,

    in the meantime, the 2nd PDK arrived here. Eager to see the USB working, I flashed it with the precompiled usbd_hid_generic_pca10056.hex from SDK 13.1, but it keeps failing.

    I made a pretty exhausting test (with two different USB cables, to be sure) as you may see in the attached spreadsheet: nRF52840_USB_Test.xls.

    In short: no matter which cable, which Windows version, which Motherboard with whatever USB Controller (1.1 / 2.0 / 3.0), the USB device recognition fails. As far as I see, because both the VID and PID provided to the OS are zero.

    I also tried all USB examples, all fail in the same way with this 2nd board.

    There seem to be some difference between the precompiled .hex files of SDK 13.1 and SDK 14.0 (with 13.1 two LEDs light up, with 14.0 only one), but both fail.

    Any help would be appreciated.

    Thanks, Tamas

  • Hi Lionel,

    I recommend creating a support ticket at MyPage. When creating the ticket, please upload your gerber files and schematics.

Related