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

NRF52840 Dongle USB Power only works with debugger connected

Hi, I have a holyiot NRF52840 dongle (schematic below). I am able to program it via the swd interface and have BLE examples running (as long as power is attached to VDD), but as soon as I try a USB example, the dongle is only detected as a USB device under the following circumstances after programming:

  1. Dongle is plugged into USB port
  2. Programmer is plugged into USB port with at least the SWCLK pin connected to the nrf52840 dongle. (I have tested with GND, and SWDIO also connected and it has the same effect)
  3. Try to start debugger (obviously it won't connect as only the clock line is attached)
  4. Dongle will now be detected by the OS.
  5. Debugger can be removed and dongle will work until being removed.

It seems that a  signal on the clock line is all that is needed to bring the dongle to life.

I can also get the dongle to detect if I attach 3.3V to VDD and GND first, and then plug the dongle in. After this, the external power can be removed and everything works fine.

I've done some probing of the pins. At step 1, when the dongle is plugged in, the VDD voltage is 0.47 V. After completing all of the steps, the VDD voltage is is 1.8 V and everything works as expected. With the GND, SWDIO and SWCLK pins of the debugger connected to the dongle in this state, I can probe the registers and see that it is in high voltage mode.

I should note that when I bought the dongle, it was preloaded with the USB CDC ACM example and it worked perfectly as it should. If this is a hardware fault caused by me (seems that way), I've uploaded the schematic below in the hopes that there might be a way to patch it.

I know that this dongle is technically not supported, but any help on getting it to work via USB power without the process above would be greatly appreciated.

HOLYIOT-17120-NRF52840 (0.8mm)-SCH.pdf

Parents
  • My best guess is that somewhere in your application you're trying to put the system into SystemOFF at a point where you'd rather want to use SystemON Idle, and the SDK is set up to use Emulated System OFF mode whenever the debugger is attached.

    I'd double-check how your application puts the device into sleep, as it fits perfectly with the symptoms. 

  • Thank you for your response. I'm just using the standard pca10056/pca10059 examples in SDK 15.3.0 trying to get something to work, so I'm not sure why it wouldn't be working.

    Reading the USB CDC ACM documentation,  it seems like the debugger is required, so I tested everything again with the ble_app_hrs examle for pca10059. Again, the dongle does not power up until I provide power to VDD or toggle the debug lines with a 3.3V signal. After doing this, the dongle starts advertising and I'm able to unplug the programmer and it keeps working off USB power. Perhaps the board from the schematic above is different enough that I need to define a custom board.h file, but I'm not sure how I'd go about that for this dongle. Could the way DCCH is connected to VDDH/VBUS have something to do with this problem?

Reply
  • Thank you for your response. I'm just using the standard pca10056/pca10059 examples in SDK 15.3.0 trying to get something to work, so I'm not sure why it wouldn't be working.

    Reading the USB CDC ACM documentation,  it seems like the debugger is required, so I tested everything again with the ble_app_hrs examle for pca10059. Again, the dongle does not power up until I provide power to VDD or toggle the debug lines with a 3.3V signal. After doing this, the dongle starts advertising and I'm able to unplug the programmer and it keeps working off USB power. Perhaps the board from the schematic above is different enough that I need to define a custom board.h file, but I'm not sure how I'd go about that for this dongle. Could the way DCCH is connected to VDDH/VBUS have something to do with this problem?

Children
  • bersaden said:
    I'm just using the standard pca10056/pca10059 examples in SDK 15.3.0

    I need to know exactly what example you're running and for what target.  

    The module schematic seems to be correct. 

     

    bersaden said:
    Again, the dongle does not power up until I provide power to VDD or toggle the debug lines with a 3.3V signal.

     What is the voltage of VDD before and after you do this?

  • I have compiled and tested the usbd, usbd_cdc_acm, usbd_hid_generic, usb_msc, usbd_hid_composite, usbd_ble_uart, ble_app_hrs, and blinky examples for both PCA10056 and PCA10059, with identical behaviour observed. In the case of blinky, I made sure to set the correct LED pin.

    The voltage of VDD after plugging into USB is 0.45V and nothing happens. After I use the debugger as described, VDD is 1.8V, or whatever I've defined for REGOUT0 (have also tested with 3.3V and it works) and the device comes to life and enumerates over USB, starts blinking, or starts advertising over BLE.

    After removing the debugger, VDD stays at 1.8V (or REGOUT0 value) and the device continues to operate on USB power.

    I have found an identical issue reported here with the official pca10059 dongle, so I'm inclined to believe that something has broken in the regulator stages of the SOC.

  • Is SB1 open and SB2 shorted? 

    What is the voltage on the VBUS pin and VDDH in the failing scenario? 

    What voltage have you configured REG0 to output? 

Related