The nRF52840 MDK USB Dongle (not to be confused with its sibling, the nRF52840-MDK) is an open-source, micro development kit dongle for IoT applications based on the Nordic Semiconductor nRF52840 SoC chip.
|Interface||Hardware Supported||TinyGo Support|
The nRF52840 MDK USB Dongle currently ships with the UF2 bootloader already installed. However, previously (pre mid-2020) it was also shipped with Open Bootloader. To use TinyGo with the nRF52840 MDK USB Dongle, please upgrade to the UF2 bootloader.
TinyGo uses the S140 v6 SoftDevice (proprietary firmware) for Bluetooth support and requires it to be installed before you can run TinyGo programs.
Some C++ examples in the nRF52840 MDK USB Dongle repository, like the C++ blinky example, do not use a SoftDevice and when flashed will be placed at the location where the SoftDevice is usually located, overwriting it in the process.
To install the S140 v6 SoftDevice, please follow the SoftDevice part of the “Running examples that use a SoftDevice” instructions on the nRF52840 MDK USB Dongle wiki.
Flash your TinyGo program to the board using this command:
tinygo flash -target=nrf52840-mdk-usb-dongle [PATH TO YOUR PROGRAM]
You can use the USB port of the nRF52840 MDK USB Dongle as a serial port.
UART0 refers to this connection.
The button (pin 18) on the nRF52840 MDK USB Dongle can be to be configured as a reset-button or GPIO pin through the
PSELRESET/ UICR registers. When it is configured as reset instead of as GPIO, you won’t be able to use the button in your code as pressing it will reset the nrf52840. To set the
PSELRESET/ UICR registers back to their default value (disabled), please flash the pselreset erase example using these instructions on the nRF52840 MDK USB Dongle wiki.
Bluetooth support is now available for nRF52840 boards. See https://github.com/tinygo-org/bluetooth for more information.