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

Implementing buttonless_dfu to hrs_freertos

Hi,

I am developing the 'buttonless dfu' to the 'hrs freertos' using the SDK v15.3.0.

However, after I compiled the modified code and loaded to the target broad, I got the below error.

    <info> app: nrf_sdh_ble_enable() err:0 ram_start:0x20002258
    <error> app: Fatal error

Is there any example for this application?

Thanks

Parents
  • Hi Amanda,

    Thanks for your help.

    Yes. I am using SEGGER Embedded Studio in my development.

    After enabled the DEBUG mode, I got more information about this issue as below.

        <info> app: nrf_sdh_ble_enable() err:0 ram_start:0x20002210
        <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at /home/15v3_0/sdk/examples/ble_peripheral/ble_app_hrs_freertos_dfu/main.c:648
    PC at: 0x0002DF83
        <error> app: End of error report

    And, the error was reported after calling sd_ble_uuid_vs_add().

  • Hi Amanda,

    Finally, I found out the solution by setting NRF_SDH_BLE_VS_UUID_COUNT to 1.

    However, after I built and programmed the 'sdk/examples/dfu/secure_bootloader' to the development board, I got the below error returned by fds_init() in the appliction FW.

    <info> app: nrf_sdh_ble_enable() err:0 ram_start:0x20002220
    <error> peer_manager_pds: Could not initialize flash storage. fds_init() returned 0xB.
    <error> peer_manager: pm_init failed because pds_init() returned NRF_ERROR_STORAGE_FULL.
    <error> app: ERROR 3 [NRF_ERROR_INTERNAL] at /home/15v3_0/sdk/examples/ble_peripheral/ble_app_hrs_freertos_dfu/main.c:940
    PC at: 0x0002E1A3
    <error> app: End of error report

    Is it related to the project configuration file .emProject?

  • Hi Terry, 

    fds_init() return 0x0B meaning FDS_ERR_NO_PAGES.

    Which board are you using? Are you using pca10040e on nRF52832 DK?

    -Amanda H.

  • Hi Terry,

    The error message seems that the flash area for flash storage has been erased. Please check the number of FDS_VIRTUAL_PAGES (in your application) reserved for the FDS storage match with NRF_DFU_APP_DATA_AREA_SIZE inside the bootloader. By default, they are 3 pages. (12kB).  

    -Amanda H.

  • Hi Amanda,

    I checked that FDS_VIRTUAL_PAGES is 3 while NRF_DFU_APP_DATA_AREA_SIZE is 12288.

    I tried just building the examples of 'sdk/examples/dfu/secure_bootloader' and 'sdk/examples/ble_peripheral/ble_app_buttonless_dfu'.

    After loaded the bootloader image through 'SEGGER Embedded Studio -> Debug', the bootloder could run.

    Then, I loader the application image through 'SEGGER Embedded Studio -> Debug', the problem occurred.

    That means I got the same problem even, I just built and loaded the example codes.

    Do you know what is the problem?

  • Hi Terry, 

    Terry said:
    I tried just building the examples of 'sdk/examples/dfu/secure_bootloader' and 'sdk/examples/ble_peripheral/ble_app_buttonless_dfu'.

    Did you mean testing with the unmodified secure_bootloader and ble_app_buttonless_dfu examples here? 

    To perform the Buttonless DFU Template Application, you have to prepare the image which combines sd + bootloader + buttonless + setting page 

    In the BLE Secure DFU Bootloader/Testing, it indicates how to get the bootloader HEX file with the bootloader settings. I would also suggest you take a look at the getting started with nordics secure dfu bootloader to know how to prepare the uploaded image. 

    Would you get still the error after you flash the application with the bootloader and the bootloader setting image?  

    If you generate the bootloader setting page, could you post the script?

    -Amanda H. 

Reply Children
No Data
Related