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

Secure DFU won't connect NRF51 S130 SDK 12.3.0

Hello. I am testing the Secure DFU for NRF51 with softdevice S130 provided in the SDK Version 12.3.0 following the steps in this guide. https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h44sjziaea6x739chl3s2bk6zz9163

I was able to build the bootloader and flashed it to the chip. In the nRF connect application I can see the DFU advertising with the name DFUtarg, but when I try to connect to the device the connection is never established. First it says connecting then discovering, but it never goes past discovering. After a few seconds it seems to timeout and the app shows disconnected.

I also loaded the app blinky example to the device, the bootloader does jump to the application and I can establish a connection with NRF Connect and read and write the characteristics. When I enter de DFU mode pressing the button 4, DFUtarg shows up in the app, but the same problem occurs that it won't connect.

Led 3 on the dev board turns on, as I read that it should when the chip is in DFU mode, but I also noticed that Led 1 also turns on slightly after. I couldn't find anywhere in the documentation or the source code why Led 1 turns on.

I have also tried deleting the bluetooth cache and the nrf Connect cache from the phone and tested with a different phone, but the problem persists. 

Any help to solve this problem would be greatly appreciated.

Parents
  • Hello,

    Please try to see if you get the same result if you program the pre-compiled bootloader hex file in \nRF5_SDK_12.3.0_d7731ad\examples\dfu\bootloader_secure\pca10028_debug\hex\. I am not really sure what the problem could be. Have you made any changes to the bootloader code apart from adding new keys?

    Led 3 on the dev board turns on, as I read that it should when the chip is in DFU mode, but I also noticed that Led 1 also turns on slightly after. I couldn't find anywhere in the documentation or the source code why Led 1 turns on.

     LED_1 is on when advertising and turned off while connected. The LED is referenced as "ADVERTISING_LED_PIN_NO" in the project.

  • I finally got it to work using a different compiler version.

    First I was compiling with armgcc version 9.3.1 (2020-q2-update). After rebuilding and it still didn't work I downloaded the same version(4.9.3) that is in the makefile.windows file, rebuilt micro-ecc, the bootloader, and the blinky firmware using that version and it worked. I was able to connect and upload the blinky firmware through NRF Connect.

    I also did a little bit of debugging with the bootloader compiled with version 9.3.1 and noticed that when I try to connect the WDT interrupt activates.

  • Good to hear that you were able to solve this, and thanks for reporting back. If I remember correctly, the link time optimization option (-flto) messed up something with the vector table if built with other GCC versions (This SDK is verified with 4.9.3). I think it will work with 9.3.1 if you remove '-flto' in the Makefile.

Reply Children
No Data
Related