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

Parents
  • Hi Sigurd,

    I have double checked: I use v9.6.0 nRF5x Command Line Tools and no USB hub. Interestingly, the board's USB behaves better with SDK 13 (and 13.1). The board is almost always correctly identified when plugged into a USB 3.0 port and usbd_hid_generic_pca10056.hex works almost flawlessly. There are still some glitches like shown on this video at seconds 3 to 4, where the cursor movement stops even though the button is pushed. Furthermore, on USB 2.0 there are still problems with device recognition.

    Shall I try to convince my employer to buy another pDK for USB testing? If the 2nd pDK also fails to deliver stable USB connection, I don't think we will go for the nRF52840, though.

    Tamas

Reply
  • Hi Sigurd,

    I have double checked: I use v9.6.0 nRF5x Command Line Tools and no USB hub. Interestingly, the board's USB behaves better with SDK 13 (and 13.1). The board is almost always correctly identified when plugged into a USB 3.0 port and usbd_hid_generic_pca10056.hex works almost flawlessly. There are still some glitches like shown on this video at seconds 3 to 4, where the cursor movement stops even though the button is pushed. Furthermore, on USB 2.0 there are still problems with device recognition.

    Shall I try to convince my employer to buy another pDK for USB testing? If the 2nd pDK also fails to deliver stable USB connection, I don't think we will go for the nRF52840, though.

    Tamas

Children
No Data
Related