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

PCA10059 enters in bootloader mode automaticlly after reconnecting it to usb port

Hi,

I am developing an app based on PCA10059 dongle. my program work fine on this dongle, but i have a problem with it. after programming PCA10059 dongle with my firmware, it work fine but sometimes after disconnecting it from usb port and reconnecting it, PCA10059 enters in bootloader mode automatically and LD2 pulses red(and NRFConnect app recognize dongle for programming) and i need to re-program it. and also this problem dose not happen with sample firmware that nordic provide. there is anything that may i done to cause this problem??

Parents
  • Hi, 

    Since you see flashing red lights, the bootloader is clearly running. If you have a bootloader, you need to either update the application via DFU or generate and program a valid bootloader settings page together with the application. The reason is that the bootloader will calculate and compare the CRC of the application with the CRC in bootloader settings. If it differs, it will enter DFU mode instead of starting the application.

    This leaves you with a few options:

    • Perform a chip erase, deleting the bootloader and MBR. This way you can program an application starting at address 0, and there is no bootloader in the system. Note that this means that you need to program the bootloader via SWD if you want to use USB DFU at a later time. Also remember to flash the firmware that sets the REG0 voltage correctly, as described in the nRF52840 Dongle Programming Tutorial.
    • Generate and program a valid bootloader settings page.
    • Modify the bootloader to not check application CRC. You can do this by adapting the dfu_enter_check() function in the bootloader.

    -Amanda H.

  • Thanks for your response, 

    I am using default DFU that nordic provide with PCA10056 dev board. so i think CRC and setting page related variables will be generated by default DFU.

    i am wondering that how saved CRC or programmed firmware can be corrupted(this problem happen only sometimes)!! in my firmware i am using fds to store some data in flash with 125 page. can this cause the problem and fds corrupt other pages??

    Thanks for your attention

  • Hi, 

    No, using FDS should not lead to the bootloader settings page being corrupted. The FDS module will reserve flash pages below the bootloader while the bootloader settings page is above the bootloader( i.e. higher flash address than the BL itself)

    I suggest referring the BLE Blinky Application (ble_app_blinky\pca10059) to modify.

    -Amanda H.

Reply Children
Related