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
  • The nRF52840  chip on the DK and the Dongle is identical; it neither knows nor cares what board it is mounted on - therefore, the same code will run identically on the two.

    The difference is in the external hardware - so anything that relies upon the external hardware on the DK which is not on the dongle will not work.

    One key hardware element which is present on the DK but not the Dongle is the J-Link programming & debugging interface.

    So how have you programmed the dongle?

Reply
  • The nRF52840  chip on the DK and the Dongle is identical; it neither knows nor cares what board it is mounted on - therefore, the same code will run identically on the two.

    The difference is in the external hardware - so anything that relies upon the external hardware on the DK which is not on the dongle will not work.

    One key hardware element which is present on the DK but not the Dongle is the J-Link programming & debugging interface.

    So how have you programmed the dongle?

Children
Related