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

Not working when power restart (sdk12.3)

Dear all,

I used SDK 12.3 buttonless functoin with PCA10028(nRF51422), and I occur some problem.

I did some testing as below:

case 1. softdevice+bootloader

case 2. softdevice+application

case 3. softdevice+bootloader+application

All case works well when I use keil to compile.

If I use GNU to compile, case 1 and 2 work well.

In case 3, it will not work (no advertising, LED not flash) after power restart, but it can work after flash hex file without power restart.

Any suggestion ?

Thank you.

  • Hi,

    I was unable to reproduce this issue. I built the bootloader and buttonless template example from SDK 12.3.0 with GCC 6.3.1. Please try attached .hex files and see if you get the same result.

    E.g., 

    nrfjprog --program <softdevice>.hex --chiperase

    nrfjprog --program application.hex

    nrfjprog --program bootloader.hex

    nrfjprog --program settings.hex --sectorerase -r

    buttonless_app.hex

    settings.hex

    bootloader.hex

  • First of all, thank you for your support.

    After I flashed your hex file, PCA10028 LED3 start blink and no advertising can be found by nRF connect.

    When I flashed my hex file by following your step, issue happened as below:

    nrfjprog --program bootloader_settings.hex --sectorerase -r
    Parsing hex file.
    ERROR: The file specified is not a valid hex file, has data outside valid areas
    ERROR: or does not have data in valid areas.

    Here is my method of making settings hex file and flashing it:

    Use "nrfutil.exe settings generate --family NRF52 --application application.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 bootloader_settings.hex" to make settings hex file.

    And use "mergehex.exe -m settings.hex bootloader.hex  -o bootloader_with_settings.hex" to combine.

    Then I used nRFgo to flash s130_nrf51_2.0.1_softdevice.hex, bootloader_with_settings.hex and buttonless_app.hex.

    As the topic said it count not work after power restart.

    My GCC version is 4.9.

    Any suggestion ?

    Thank you.

  • Hi,

    I observed the LED was blinking and assumed it worked while it actually was going in a reset loop. Problem is that the linker script does not define the bootloaderSettings symbol. Should work if you use attached linker script. 

    You set the device family to NRF52 when you generated the bootloader settings page, and this is the reason you got "The file specified is not a valid hex file, has data outside valid areas" error. Try --family NRF51 

    Patched linker script:

    ble_app_buttonless_dfu_gcc_nrf51.ld

  • Hi, 

    I did see the different between your and my linker script.

    Issue had been solved.

    Thank you for your support.

Related