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

Multiple DFU execution of ble_app_uart

Hello.
I am using the custom board (buttonless) of nRF 52840 to verify the services of DFU and NUS. After firmware rewriting with DFU, I confirmed that BLE communication with the central side board can be done via NUS service.
However, when trying to perform the DFU again, the device name (Norodic_UART) is displayed by nRFConnect, but when connected, DFU can not be done like the following image.
How can I make DFU more than once?
ble_app_button_less has confirmed that it can do DFU more than once.

Central: nRF 52832 (ble_app_uart_c + S132)
Peripheral: nRF 52840 (ble_app_uart + secure_bootloader + S140)
Nordic SDK 15.0.0

  • Hi,

    The buttonless DFU example is a template example, it was written in a way that you can start with that example and add the functionality of your application to it. You will therefore need to combine/merge the buttonless example with the NUS example. You can either integrate the buttonless service to your application(NUS) or add your application(NUS) to the buttonless template. In this case, I think it might be easiest to start with the buttonless example, and then add the NUS service to the buttonless example. 

  • Thank you for your reply.
    Merged ble_app_uart into ble_app_buttonless_dfu and checked its operation.
    After doing DFU via nRFConnect for Desktop, I scanned again, but Nordic_UART was not displayed in the device name list.
    Is it necessary to set the linker script?

    nRF 52840 (Custom Board)
    SDK 15.0.0
    S140
    gcc-arm-none-eabi-7-2018-q2-update-win32

    ble_app_uart_gcc_nrf 52. l:
    ------------------------------------------------

    /* Linker script to configure memory regions. */

    SEARCH_DIR(.)
    GROUP(-lgcc -lc -lnosys)

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xca000
      RAM (rwx) :  ORIGIN = 0x20002220, LENGTH = 0x3dde0
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
    }

    SECTIONS
    {
      .uicr_bootloader_start_address :
      {
        PROVIDE(__start_uicr_bootloader_start_address = .);
        KEEP(*(SORT(.uicr_bootloader_start_address*)))
        PROVIDE(__stop_uicr_bootloader_start_address = .);
      } > uicr_bootloader_start_address
    }

    SECTIONS
    {
      . = ALIGN(4);
      .mem_section_dummy_ram :
      {
      }
      .log_dynamic_data :
      {
        PROVIDE(__start_log_dynamic_data = .);
        KEEP(*(SORT(.log_dynamic_data*)))
        PROVIDE(__stop_log_dynamic_data = .);
      } > RAM
      .fs_data :
      {
        PROVIDE(__start_fs_data = .);
        KEEP(*(.fs_data))
        PROVIDE(__stop_fs_data = .);
      } > RAM

    } INSERT AFTER .data;

    SECTIONS
    {
      .mem_section_dummy_rom :
      {
      }
      .sdh_ble_observers :
      {
        PROVIDE(__start_sdh_ble_observers = .);
        KEEP(*(SORT(.sdh_ble_observers*)))
        PROVIDE(__stop_sdh_ble_observers = .);
      } > FLASH
      .sdh_soc_observers :
      {
        PROVIDE(__start_sdh_soc_observers = .);
        KEEP(*(SORT(.sdh_soc_observers*)))
        PROVIDE(__stop_sdh_soc_observers = .);
      } > FLASH
      .pwr_mgmt_data :
      {
        PROVIDE(__start_pwr_mgmt_data = .);
        KEEP(*(SORT(.pwr_mgmt_data*)))
        PROVIDE(__stop_pwr_mgmt_data = .);
      } > FLASH
      .log_const_data :
      {
        PROVIDE(__start_log_const_data = .);
        KEEP(*(SORT(.log_const_data*)))
        PROVIDE(__stop_log_const_data = .);
      } > FLASH
        .nrf_balloc :
      {
        PROVIDE(__start_nrf_balloc = .);
        KEEP(*(.nrf_balloc))
        PROVIDE(__stop_nrf_balloc = .);
      } > FLASH
        .svc_data :
      {
        PROVIDE(__start_svc_data = .);
        KEEP(*(.svc_data))
        PROVIDE(__stop_svc_data = .);
      } > FLASH
      .sdh_state_observers :
      {
        PROVIDE(__start_sdh_state_observers = .);
        KEEP(*(SORT(.sdh_state_observers*)))
        PROVIDE(__stop_sdh_state_observers = .);
      } > FLASH
      .sdh_stack_observers :
      {
        PROVIDE(__start_sdh_stack_observers = .);
        KEEP(*(SORT(.sdh_stack_observers*)))
        PROVIDE(__stop_sdh_stack_observers = .);
      } > FLASH
      .sdh_req_observers :
      {
        PROVIDE(__start_sdh_req_observers = .);
        KEEP(*(SORT(.sdh_req_observers*)))
        PROVIDE(__stop_sdh_req_observers = .);
      } > FLASH

    } INSERT AFTER .text

    INCLUDE "nrf_common.ld"

    ------------------------------------------------

  • Is it necessary to set the linker script?

    Yes, after adding NUS to the project, you would need to allocate more RAM to the SoftDevice.

    You would also need to set NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h to 2.

  • Thanks for the reply.

    >Yes, after adding NUS to the project, you would need to allocate more RAM to the SoftDevice.

    How do I change the RAM?

Related