Bootloader programming for nRF52840 Dongle

hello

I had developed code based on the example ble_beacon_app and tested on nRF52840DK.  That worked fine.   I need to make the same work on the nRF52840 dongle.   I followed the instructions of nRF52840 Dongle user guide and nRF52840 Dongle Programming Tutorial.  

I also tested the blinky_LED sample for PCA10059 and it works fine on the dongle.   But, I cannot make my code work on the dongle.

I changed the preprocessor defines to PCA10059 and followed the guidelines for adapting the BLE example ( with softdevice).   Please see the memory map and attached doc.   The green area is my app.  Blue is the softdevice and orange is the MBR.

Clarifications Needed:

  • The hex file still shows as pca10056_s140.hex. Should it not change to pca10059?
  • Bootloader is able to program.
  • But, it appears that code does not work.  

Any ideas how to overcome this issue?   Thank you.

dongle_prob.pdf

  • Hi Shiva, 

    Have you tried to test with the ble_app_hrs made for PCA10059 (\examples\ble_peripheral\ble_app_hrs\pca10059\s140) 

    It looks like your beacon example is quite small in size compare to the hrs. Please double check. This  is the memory layout of the hrm: 

    I tested here with a fresh nRF52840 dongle and it worked fine. I attached the hex here that you can test. 

    Since the nRF52840 dongle was not made to be a development platform. There is a potential issue that if the flash of the fds is used by previous firmware, it's not possible to clear the flash from the bootloader/programmer. And it can crash the application if the fds/fstorage is not expecting anything in the flash area allocated for it. 

    If you want to use the nRF52840 dongle as a development platform , I would strongly suggest to solder the 10 pins header into P1 port and then you can use a DK to program it as a normal DK/custom board.

    ble_app_hrs_pca10059_s140.hex 

  • Hi Hung

    Thanks for the prompt reply.   I will test it and let you know.

  • Hi Hung

    I used the examples \ble_peripheral\ble_app_beacon  to test a simple code generating 2 tones on an I/O port using the nRF52840DK.  Its a small project.   But, this did not work on the dongle even though I followed the instructions.  

    When I tried using  the  example examples\ble_peripheral\ble_app_hrs\pca10059\s140)..there was compilation error related to a API.     Comparison of project structure  is attached.   There are a lot files in the ..hrs\pca10059.   Could you provide some insight which files to remove?

    Thanksdongle_prob2.pdf

  • Hi Shiva, 

    Have you tried to flash the hex file I provided. 

    The ble_app_hrs project should be able to compile out of the box. Please show the error you get. Do you have the same error if you compile it for the nRF52 DK instead of dongle? 

    Could you try to test on a fresh installed SDK ? 

  • Hi Hung

    I did not flash the hex file you provided.  I presume its the hex generated from  ble_app_hrs  .  I could compile and this example and load it into the dongle without any error.   I could compile  my own code and program the dongle without any error messages.  The only problem was the functionality - I expected the PWM waveform on port P0.17 of the dongle.  But, no waveform is seen after I took the device out of the bootloader mode.

    Why should I install the SDK again?   The current SDK works fine.

    Thanks

Related