I have 3 Nordic nrf52840 USB dongles, several Particle Mesh Argons and have ordered an Arduino Nano 33 BLE Sense and have found the Adafruit Feather nRF52840 Express. All of these boards use the Nordic nRF 52840 SOC but the last three cannot be programmed using the "NRF Connect for Desktop".
I would like to be able to program these boards with one consistent method and the NRF Connect For Desktop would be the best approach. I get that it is not Nordic's responsibility to spend time to connect these products, but perhaps they could direct me to some possible solutions. Each of these boards have different strengths: The Nordic board is inexpensive, the Nano 33 BLE Sense has many sensors on board, the Particle Argon has built in Wifi, the Adafruit board allows CircuitPython.
If anyone can connect these boards, it would be the technicians at Nordic. Does anyone have any suggestions? I can generate a .hex file but how do I get it onto the boards. Is there any bootloaders that might work on all three? Can that bootloader be loaded using only the USB connection? I do not want to use a JTAG connection.
The advantage to Nordic is that a large BLE network could have many Nordic boards, but could also have some of these specialty boards when needed. Being able to switch between the different platforms would also be very useful.
From the schematics of the boards you mention, it looks like they all have the USB connector connected directly to the nRF52840 USB port. This means that you should be able to use the same bootloader that is running on the nRF52840 Dongle (USB Open bootloader). This should allow your to use nRF Connect Programmer app to program all boards. Most likely it is not possible to update from the existing bootloader to the Open Bootloader without using SWD interface, but this is something you need to check with the manufacturers of the boards. We do not have any knowledge of bootloaders developed/used by 3rd party vendors. You should also check that replacing the bootloader does not break any other functionality of the boards.
Thank you Jorgen for the informed reply.
I checked your link for the USB Open Bootloader and found lots of information about it, but could not actually find the download link for the " USB Open Bootloader" hex file. Is there a trick to finding it?
I would like to try to do things without a JTAG/SWD but will get one anyway, out of curiosity what setup do you guys at Nordic prefer for the nrf52840 boards. I have found several JTAG/SWD on Amazon, but never know if the cables are the right ones for the nrf52840 usb dongle, Particle Argon, Arduino Nano 33 BLE, Adafruit Feather nrf52840.
I am beginning to think it might be cheaper and smarter just to stick with the Nordic product.
The Open Bootloader is available in our SDK, but it needs to be built by you (Segger Embedded Studio and GCC are supported free toolchains). Alternatively, you can find a zip-file containing the stock bootloader of nRF52840 Dongle in the nRF52840 Dongle Programming Tutorial.
We primarily use our own DKs for programming external boards, including the nRF52840 Dongle. The DK come with a J-Link OB debugger, and a debug out port. If you solder a 2x5-pin SWD header to the back of the dongle, you can easily connect it to the DK with a 10-pin SWD cable.
If you decide to buy a separate J-Link Debugger, please make sure it is a genuine one and not a clone. The clones tend to cause more issues than they solve
Thanks again Jørgen, great to get such good information.
I have found this site for programming the Particle Xenon nrf52840 SOC https://medium.com/home-wireless/using-segger-studio-and-nordic-sdk-with-particle-xenon-91e34aeb632a it looks very useful.
I have also found out that the Arduino Nano 33 BLE can be programmed using the Nordic SDK by uploading the .bin directly to the board (Convert the .hex file to a .bin file), as long as your .LD file has this memory setting:
FLASH (rx) : ORIGIN = 0x10000, LENGTH = 0xf0000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
Then using the Arduino bootloader you can run the bossac.exe upload program using this style
<my_path_to_bossac> -d --port=<my_usb_port> -U -i -e -w <path_to_my_bin_file> -R
Which looks like this on my windows computer. Replace "[my user name]"
"C:\Users\[my user name]\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.9.1-arduino1/bossac.exe" -d --port=COM17 -U -i -e -w "C:\Users\[my user name]\Documents\Arduino\myStuff\blin3fast\blin3fast.ino.ARDUINO_NANO33BLE.bin" -R
Looks like the Adafruit Feather nrf52840 board is Arduino compatible, so the above method should also work for it.
Presently I am looking at pinout diagrams for the Xenon and Nano 33 BLE to see what the difference between them and the Nordic board is.
I do have a couple of questions:
Do you know of a good Pinout diagram for the Nordic nrf52840 USB dongle? Not finding anything as simplified as the other boards. I have found the schematic but that is fairly complex.
When I do have pinout diagrams I know that I can do this, mentioned at the bottom of the above linked website
#define PIN_SPI_MISO (46)#define PIN_SPI_MOSI (45)
Not really sure where to make these changes using the Nordic SDK.
Once again thank you for your information, it has been very useful.
I'm not exactly sure what kind of pinout diagram you are looking for. We do have the pins shown on the Hardware drawings in the nRF52840 Dongle user guide, and these correspond to the pin assignment documentation of the nRF52840 chip. If you want to see the connection between these two, I'm not aware of anything else than the HW schematics.
You can define the pins in the same way as you posted above, or you can use the NRF_GPIO_PIN_MAP(port, pin) macro from our SDK to map to correct port and pin (pins on port 1 are basically 32 + pin number). You need to pass the pin numbers to the peripheral this is going to use them when you initialize the peripheral.