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

nRF52840 dongle "drag & drop" programming

Hello again Nordic Pro's,

This is a quick question that I have not been able to find the answer for before buying nRF52840 dongles to replace our nRF51 dongles.  We need several for our project and the pricing for the 52 is much better on the open market.

It is actually a multi-part question: 

Does the nRF52840 include the same "drag and drop" programming feature as the 51, and if so, is it directly supported for example apps under the delivered SDK v15.2, specifically, the ble_app_uart_c project using the keil IDE?

Thank you all in advance,

Robin @ TL

Parents
  • Nope.  However you can use nRFConnect desktop to flash it.

  • There is support for usb dfu with may help you.
    A interface project can be found here.
    But no out of the box solution to your question like Mojo said.

  • It is an ARM JTAG/SWD standard coresight connector, not a jlink connector.  You don't need a jlink for that.  Any standard ARM compatible jtag can be used with it.

  • Ok folks

    This is getting confusing.  Why would there not be an easy way to program this over the USB port via an IDE.  I can do that with the nRF51 dongle. Is that the reason it is only $10?

  • Hello Robin,

    The reason why it is a bit more complicated on the nRF52840 dongle is that it doesn't have the on board segger programmer as the nRF51 dongle has. Hence, the drag'n'drop is not possible on the nRF52840 dongle.

     

    Robin said:

    Can it be programmed via the Keil IDE interface?

    Or a Segger Flasher?

     No. This is because it doesn't have the programmer, which is the HW that usually programs the device via drag'n'drop or Keil (Or Segger Embedded Studio).

    The way you would flash a new application to the nRF52840 dongle is by using the nRF Connect for Desktop -> Programmer tool. This uses a bootloader that is preprogrammed on the dongle, creates a DFU image and updates the application via the USB bootloader. Since this is a "custom" protocol, drag'n'drop or programming via IDEs (Keil) doesn't work.

    Another thing that is worth mentioning is that since there is no programming chip/debugger, it is not possible to step through the code on the nRF52840 dongle.

    To confuse you a bit more, and as some of the replies here suggests, you can do all of this if you have an external J-Link debugger, and you solder on a 10 pin J-Link connector on the P1 pads on the bottom of the chips. In addition to some other changes you need to do, which is described here, you can drag'n'drop, and program via IDEs. However, if you select the dongle because of the price, I believe that a dongle + debugger wouldn't be any cheaper than buying a DK in the first place. The DK is also more user friendly.

    Best regards,

    Edvin

  • Hello Edvin,

    Seems we may have wasted some money on several of these.  I just read another piece that claims that the USB pins are not used as UART pins.  We were intending to program the as UART central devices. 

    Do you know of this is possible by redefining those pins?

    Also, given I do get to a point I can program them, can I program with a  merged hex that includes app and softdevice?  There seems to be some indication that this may not be possible either.

Reply
  • Hello Edvin,

    Seems we may have wasted some money on several of these.  I just read another piece that claims that the USB pins are not used as UART pins.  We were intending to program the as UART central devices. 

    Do you know of this is possible by redefining those pins?

    Also, given I do get to a point I can program them, can I program with a  merged hex that includes app and softdevice?  There seems to be some indication that this may not be possible either.

Children
  • No, USB is not part but you can have the CDC firmware that emulate a com port when plugged into the PC.  The is an example code in the SDK for that.  Look for USB CDC example

  • As  says, it is not possible to change the USB pins to UART. 

    On the older dongle, which has an On Board Segger (OB Segger) programming chip, the UART is actually translated to USB in this chip. That is the reason why you can read it on your computer. Computer's normally doesn't speak UART. 

    In addition, the USB pins are hardcoded/wired. It is not possible to reuse these as other GPIOs. 

     

    Robin said:
    Also, given I do get to a point I can program them, can I program with a  merged hex that includes app and softdevice?  There seems to be some indication that this may not be possible either.

     Yes. You can program the dongle with .hex files. Also with a merged softdevice + application .hex file, but you can't do it via drag'n'drop. You need to use the nRF Connect for Desktop application, and use the Programmer feature within this.

    If you need to use the dongle, and you imagined using the ble_app_uart, then the example found in:

    SDK15.3.0\examples\peripheral\usbd_ble_uart

    is the closest you get. It uses the BLE service: Nordic UART Service (NUS), just like the ble_app_uart example, but uses the USB instead of the UART to print the data. There is a description of this example here. This is a peripheral. We don't have a central, but if you can change the ble_app_uart_c example from using uart to using the USB, just like it is done in the usbd_ble_uart example, then it is possible.

    Please note that since there is no debugger, it is a bit tricky to develop applications on the dongle. We recommend using an nRF52840 DK to do the development, and then run the application on the dongle when it is done.

    BR,
    Edvin

Related