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

Setting nRFChip in DFU Mode.

Hi,

I am following the tutorial https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader

In C1. Prepare the application hex file. Build your application and find the .hex file inside _build folder. Usually it's named nrf52832_xxaa.hex if you compile a SDK's example. Flash the application hex and verify it works normally without the bootloader (flash softdevice if needed).I entered command make flash after generating nrf52832_xxaa.hex,but I am Unable to see LED1 and LED3 are lit.I think that means Bootloader is not getting Flashed.Below is the log info.

Do we manually need to set nRFChip in DFU mode?If so,Please let me know the way to set device in DFU mode.

Thanks & Regards,

Swathi P.

Parents
  • Hi,

    Maybe the Softdevice hasn't been programmed? Please try to run the Softdevice flash target to make sure it's programmed:  "make flash_softdevice && make flash"

    Best regards,

    Vidar

Reply
  • Hi,

    Maybe the Softdevice hasn't been programmed? Please try to run the Softdevice flash target to make sure it's programmed:  "make flash_softdevice && make flash"

    Best regards,

    Vidar

Children
  • Hi,

    Thanks for the response.I tried flashing softdevice with mentioned cmmands.But there was no result.

    Thanks & Regards,

    Swathi P

  • Hi,

    Thanks for confirming. So I see you're using SDK v15.3.0 which means you're likely encountering the issue explained by Bjørn here: https://devzone.nordicsemi.com/f/nordic-q-a/56437/mbr-jumps-to-application-not-bootloader

    A slight modification of the flash target to prevent the MBR from getting erased:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    # Flash the program
    flash: default
    @echo Flashing: s132_nrf52_6.1.1_softdevice.hex
    nrfjprog -f nrf52 --program $(SDK_ROOT)/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --chiperase
    @echo Flashing: $(OUTPUT_DIRECTORY)/nrf52832_xxaa_s132.hex
    nrfjprog -f nrf52 --program $(OUTPUT_DIRECTORY)/nrf52832_xxaa_s132.hex
    nrfjprog -f nrf52 --reset
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    First I have Build the program using make,then I have given commands mentioned above,after that gave command make flash.

    But still there is no result.Is this the right way?If not,please let me know the right way. 

    Below is the log.

    Thanks & Regards,

    Swathi P

  • Hi,

    But it should work if you modify the "flash" target in your Makefile as I showed in my previous reply.

  • Do I need to change it in makefile.windows?