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

Adapting the blinky example from the nRF52840 DK to the nRF52840 dongle

I tried to follow this guide:

https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/nrf52840-dongle-programming-tutorial?CommentId=fd959c7d-2374-443a-8af7-b4d4f0d35228

To prove the concept of adapting SDK examples from the nRF52840 DK to the nRF52840 dongle.

I am using SEGGER EmStudio 4.12 and I tried either using a nRF52840 DK with a Tag.Connect.com cable assembly connected to the Debug out of this board or the nRFConnect Programmer to program the nRF52840 Dongle.

So, if I understood correctly, we can open the blinky project example of the SDK for the nRF52840 DK located at

SDK_dir/examples/peripheral/blinky/pca10056/mbr/ses/blinky_pca10056_mbr.emProject

Modify some definitions on this project and then program the nRF52840 Dongle, and have the same result as if we opened the project for the Dongle, located at

SDK_dir/examples/peripheral/blinky/pca10059/mbr/ses/blinky_pca10059_mbr.emProject

So these are the fields I modified of the blinky_pca10056_mbr.emProject

c_preprocessor_definitions="BOARD_PCA10059;BSP_DEFINES_ONLY;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;NRF52840_XXAA;"

linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x1000;FLASH_SIZE=0xdf000;RAM_START=0x20000008;RAM_SIZE=0x3fff8"

The only fields I had to modify were BOARD_PCA10056 to BOARD_PCA10059 and FLASH_SIZE=0xff000 to FLASH_SIZE=0xdf000.

Then I tried to build and run the program on the Dongle but the board just freezes and doesn't do anything. Segger says download successful and nRFConnect says DFU for Application completed successfully!

If I use the blinky project example designed for the dongle it works and I can change the frequency of the LED switching.

What am I missing? Thanks

Parents Reply
  • I only used the debugger to program the Dongle, I may learn about it in the meantime.

    I did a full erase yesterday by accident and had to use a JLink-Pro to reflash the Dongle, since the full erase resets the REGOUT0 register, which makes the logic level and VDD 1.8V.

    The Blinky example doesn't need a SoftDevice as far as I can tell from the link above (here for convenience). The BLE examples need it, yes, but I am not using them for now.

Children
Related