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

DFU Bootloader not working

Hi everyone,

I'm using the nrf52832 Dev Kit PCA10040

SDK version: 15.3.0

OS: Fedora

I try to use DFU following this tutorial but I don't get the DFUTarg on the nRF Connect application.

1. I created my own public and private key.

2. I downloaded uECC library and compiled it correclty.

3. I replaced the dfu_public_key.c SDK by mine.

4. I compiled with Makefile from <SDK>/examples/dfu/secure_bootloader/pca10040_ble/armgcc with the command line :
'make erase && make flash_softdevice && make flash'

Everything is compiled but I can't see the DFUTarg on the app.  LED_3 is OFF even when pressing BUTTON_4 and reset simultaneously for force DFU mode.

 

I've probably misunderstood something...

Any ideas of what I'm doing wrong?

Regards,

Louis

  • Hi,

    Remove the --sectorerase option from 'flash: default' in the makefile.

    I had this problem before with the same chip and it seems to be something that is cause by the UICR flash areas being erased in the 15.x SDKs.

    Something to make you life a bit easier than this 'make erase && make flash_softdevice && make flash'
    Add this to your make file at the bottom.

    program:
    	nrfjprog -f nrf52 --eraseall
    	nrfjprog -f nrf52 --reset
    	@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 --sectorerase
    	nrfjprog -f nrf52 --reset
    	@echo Flashing: $(OUTPUT_DIRECTORY)/nrf52832_xxaa_s132.hex
    	nrfjprog -f nrf52 --program $(OUTPUT_DIRECTORY)/nrf52832_xxaa_s132.hex
    	nrfjprog -f nrf52 --reset

    So you can just run 'make program'

    Regards
    BinderT

Related