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

After I have compiled a simple "Hello World" type of program into a hex file for the nRF52840. How do I upload it to the nRF52840 dongle over the USB connection from a PC running Windows?

Exactly what steps do I follow?

Parents
  • I think I may see part of the problem: the dongle contains no dedicated USB chip.  So, unless the "Hello World" sketch that I upload to the dongle contains some USB initialization code in it, the dongle basically loses all USB connectivity at that point.  Correct?  At least that might explain why nRF Connect can no longer find the dongle after I uploaded my Hello World sketch to it.

    If that is true, what is some very simple USB initialization code that I can include with my "Hello World" sketch so that this doesn't happen in the future?

  • The dongle contains a bootloader, which is what makes it possible to update the FW via the nRF Connect Programmer app. Before we try any more drastic measures, could you try unplugging the dongle, plugging it back in & then pressing the reset button? The dongle LED should then blink red, indicating that the dongle is in bootloader mode.

  • Yes, it blinks red after I press the reset button.

Reply Children
  • Great! Can you try uploading the softdevice & the application (e.g. ble_app_blinky) using the nrf connect for desktop programmer app. The dongle needs to blink red for nrf connect to connect to the dongle. You could also try running the ble app & upload the firmware when it asks you to. This will enable you to use the dongle as a bluetooth device sniffer.

  • Uh, where is the ble_app_blinky?  I tried going to the dongle page to find it, but right now I instead get "The requested URL /topic/com.nordic.infocenter.nrf52/dita/nrf52/development/nrf52840_dongle/getting_started.html was not found on this server."

    So, instead of that, I tried writing to it a hex file I wrote that works on the nrf52840-dk, which acts as a simple radio beacon (using Nordic's proprietary mode for the radio).  Well, that almost worked, but in the end it apparently failed.  Here is the log:

    And the radio beacon isn't sending either.

    i.e. Close, but no cigar.  What to do now?

  • You will need to download the nordic sdk found here. You can download the latest one. Then, go to examples/ble_peripheral/ble_app_blinky. Take a look at the documentation here for more info.

  • Thanks.  I just now tried that, and it fails in the same way.  Here's the log:

    Also, it's not blinking either.  :(

    However, there is a green LED on the dongle, and it is fully lit and staying that way.  Does that mean something?  So, on a positive note, at least something has changed compared to how it was before.

    What to do now?

  • OK, I just now tried downloading my nRF52840 hex file to a brand new, fresh out of the wrapper dongle, and I get the same result:

    So, clearly, this is not a case of a defective dongle.  Rather, it looks to me like Nordic's experimental USB programmer app is fatally flawed.  

    Can you confirm?