DFU not advertising

Hi,

I am trying to get DFU working on my PCA10040 board using SDK 14.2 and armgcc toolchain.

I have followed the instructions to set up DFU here:

devzone.nordicsemi.com/.../

The only changes I have made to the bootloader example are to include the generated public_key.c file in the Makefile - trying to compile the example without this throws an error about the example key not being allowable in production.

The bootloader compiles fine and I've flashed it onto the board along with the softdevice. LED 3 lights which I understand should indicate DFU mode (although LED 1 does not light).

The problem is that the board isn't advertising. If I instead flash the pre-compiled hex file from the example directory then advertising works fine, noting that both LED 1 and LED 3 are lit.

The process is pretty simple so I can't obviously see where I would have gone wrong. Any suggestions would be gratefully received!

This is the generated public_key.c file: public_key.c

And this is the compiled hex file: nrf52832_xxaa_s132.hex

  • You may need to try the bootloader_debug version and check the RTT log to see what could be wrong here. You can also change the optimization to level 0 and then step into the code and see where it crashes. I assume you can compile and run other example (e.g ble_app_hrs) with no problem ?

  • I managed to get the code into the bebugger and it seemed to be crashing at the point where initialisation of the dfu was happening. It would get part way through and then suddenly jump off somewhere random in memory.

    Given I had tried everything else I decided to regenerate the private and public keys and try again. This worked first time. Possibly there was some issue with the first key that was generated?

  • I don' think the key would cause any problem here. If you still have the first keys, maybe you can try again ?

  • I am experiencing the exact same problem but have not been able to resolve this.

    SDK 14.2 clean install. Build at /pca10040/armgcc

    Only updated Makefile with public_key.c location

    All compile and flash ok... LED3 light up LED1 not, no advertising.

    -------

    Next tests -

    1. Generate different keys and try again. (not sure why this would work)

    2. Revert back to GNU ARM tools v6 and test again

    RESOLVED UPDATE: after above tests

    1. Generating new keys did not work for me.

    2. After reverting back to \GNU Tools ARM\6 2017q1-update from c:\GNU Tools ARM\7 2018-q2-update\ and recompiling it seems to have worked. Reminder to update (SDK)\components\toolchain\arm\Makefile.windows