WIP: DIY nRF82540 NiceRF 868 4.2 Inch ePaper

Updating the PCA10059 with Adafruit NRF52 Bootloader

In order to flash Meshtastic we must replace the stock open bootloader with Adafruit NRF52 Bootloader that support UF2.

The module comes without pin headers soldered, so you need either add the SWDIO, SWDCLK, GND and VDD Out pins or 3d print a holder that uses pogo-pins

SWDCLK and SWDIO Pins (these are connected to either J-Link or ST-LINK2)

Connect the J-Link or STLink (Debugger to Dongle)

3.3V - VDD Out
GND - GND
SWDIO - SWDIO
SWDCLK - SWDCLK

Here is a ST-LINK/V2 (mini) Connection

image

3D Clip flash with Pogo Pins

nRF82540 Dongle (User Guide)

https://infocenter.nordicsemi.com/pdf/nRF52840_Dongle_User_Guide_v1.0.pdf

Download a copy of OpenOCD-ESP32 and extract it

Get a copy of the latest PCA100059 bootloader here

https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.6.3/pca10059_bootloader-0.6.3_s140_6.1.1.hex

Flash ,erase and program the bootloader

Open a terminal and run

Command-line for ST-LINK

sudo ./openocd -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c init -c "reset init" -c halt -c "nrf5 mass_erase" -c "program pca10059_bootloader-0.6.3_s140_6.1.1.hex verify" -c reset -c exit

Command-line for J-Link

sudo ./openocd -f ../share/openocd/scripts/interface/jlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c init -c "reset init" -c halt -c "nrf5 mass_erase" -c "program pca10059_bootloader-0.6.3_s140_6.1.1.hex verify" -c reset -c exit

Now you can connect the dongle to the USB port to access the UF2 storage volume or program it via the USB CDC port

1 Like