Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK16.0.0 how to merge serial and BLE DFU

My goal is based on SDK16.0.0 and s132_7.0.1 softdevice to achieve BLE DFU (requires binding) and UART DFU work at the same time,
I have combined the 'secure_bootloader_uart' and 'secure_bootloader_ble' in the SDK according to the guidence on DvZone, but
that was 3 years ago The article does not match in some places.

Code path:

github.com/.../BLE-Nordic
Project path:examples\dfu\secure_bootloader\pca10040_uart_merge_ble


STEP:

  1. IDE: uVision V5.23.0.0, nRF_DeviceFamilyPack 8.29.0, CMSIS 5.0.1.
  2.  Added relevant files under BLE DFU project to UART DFU project.
  3. To resolve errors and warnings, move the nrf_error.h, nrf_nvic.h, nrf_sdm.h, nrf_soc.h files in the \components\softdevice\s132\headers\ folder to the \components\ folder.
  4. Modified IROM1 configuration Start: 0x70000 Size: 0xE000
  5.  Copy the ble settings in sdk_config.h under BLE DFU Project to sdk_config.h in uart DFU Project.
  6.  After compilation, merge the nrf52832_xxaa_mbr.hex , hrs_application_s132.hex and s132_nrf52_7.0.1.hex files with the following instructions:
    nrfutil.exe settings generate --family NRF52 --application hrs_application_s132.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 bootloader_settings.hex
    mergehex.exe --merge nrf52832_xxaa_mbr.hex s132_nrf52_7.0.1.hex --output production_final1.hex
    mergehex.exe --merge production_final1.hex hrs_application_s132.hex --output production_final2.hex
    mergehex.exe --merge production_final2.hex bootloader_settings.hex --output production_final.hex
  7. Download to the chip through the following instructions:
    nrfjprog -f NRF52 --eraseall
    nrfjprog -f NRF52 --program "production_final.hex" --verify
    nrfjprog -f NRF52 --reset



PROBLEM:

  1.  After the download is completed, LED1 flashes, indicating that the bootloader jumps normally, you can see NORDIC_HRM through nRF Connect and can connect.
  2.  Hold down BUTTON4 and RESET BUTTON and release at the same time, LED1 and LED2 are on, which is abnormal (LED1 and LED3 are on in the official SDK demo).
  3.  Use "nrfutil dfu serial -pkg hrs_application_s132.zip -p COM4 -b 115200" instruction to update, and the last error message is "No ping response after opening COM port".
  4.  The Bluetooth device with the DfuTarg name cannot be searched with the mobile phone.
Parents Reply Children
Related