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

DFU for nRF52810 on SDK 15.3.0

Dears,

Now I am using nRF5_SDK_15.3.0_59ac345 for my project on nRF52810.

I found a bootloader example at

\nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040e_ble\

And an application example at:

\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e\

And some pre-compiled hex files at:

\nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_dfu_test_images\ble\nrf52832\

Questions:

1. Can I use pca10040e bootloader/application examples for my nRF52810 board directly?

2. I tried to flash device with pre-compiled hex files but it failed with error. Does this mean I can not use pre-compiled nRF52832 hex files on nRF52810?

I searched around at forum and not found any topic on DFU 15.3.0, and my question may be stupid.

But I will be very appreciated if anyone can give me some suggestions.

Updates:

1. I tried pca10040e for ble_app_buttonless_dfu and secure_bootloader, but at last, I got an error like this:

(I attahced merge/flashing script file here


@echo off

:: # Check to make sure nrfjprog is installed before moving on
WHERE >nul 2>nul nrfjprog
IF %ERRORLEVEL% NEQ 0 (
ECHO "nrfjprog was not found in PATH, please install using windows installed as found on nordicsemi.com"
goto :end
)
WHERE >nul 2>nul mergehex
IF %ERRORLEVEL% NEQ 0 (
ECHO "mergehex was not found in PATH, please install using windows installed as found on nordicsemi.com"
goto :end
)

SET S112=s112_nrf52_6.1.1_softdevice.hex
SET BOOTLOADER=bootloader.hex

echo "## Looking to make sure %S112% exists"
if not exist %S112% (
echo "#### S112 hex file does not exist! Make sure the softdevice is in the same folder as this script!"
goto :end
)
echo.

echo "## Looking to make sure %BOOTLOADER% exists"
if not exist %BOOTLOADER% (
echo "#### Bootloader hex file does not exist! Please make sure its compiled, copied, and renamed into this folder!"
goto :end
)
echo.

echo "## Merging S132 and bootloader, then flashing it to nRF52-DK; make sure the DK is powered on and connected to the PC"
mergehex -m %S112% %BOOTLOADER% -o merged_SD_bootloader.hex
nrfjprog --program merged_SD_bootloader.hex --chiperase
echo.

echo "## Please power cycle the DK and then with nRF Connect, make sure the board is in bootloader mode and ADV as DfuTarg"
echo.

:end
pause

@echo off

:: # Check to make sure nrfutil and mergehex and nrfjprog are installed before moving on
WHERE >nul 2>nul nrfutil
IF %ERRORLEVEL% NEQ 0 (
ECHO "nrfutil was not found in PATH, please install using pip install"
goto :end
)
WHERE >nul 2>nul nrfjprog
IF %ERRORLEVEL% NEQ 0 (
ECHO "nrfjprog was not found in PATH, please install using windows installer from nordicsemi.com"
goto :end
)
WHERE >nul 2>nul mergehex
IF %ERRORLEVEL% NEQ 0 (
ECHO "mergehex was not found in PATH, please install using windows installer from nordicsemi.com"
goto :end
)

SET APPLICATION_HEX=app.hex

echo "## Looking to make sure %APPLICATION_HEX% is present in folder"
if not exist %APPLICATION_HEX% (
echo "#### app.hex file does not exist! Please copy a application .hex file into the folder, rename it, and try again!"
goto :end
)
echo.

echo "## Creating bootloader settings based on app.hex"
nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
echo.

echo "## Merging bootloader settings and app.hex into merged.hex"
mergehex -m app.hex settings.hex -o merged.hex
echo.

nrfjprog --program merged.hex --sectorerase

:end
pause

modified from :buttonless-dfu-development-tutorial

 

echo "## Creating bootloader settings based on app.hex"
nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
echo.

echo "## Merging bootloader settings and app.hex into merged.hex"
mergehex -m app.hex settings.hex -o merged.hex
echo.

nrfjprog --program merged.hex --sectorerase

e:\working_case\TEMP_52810>nrfjprog --program merged.hex --sectorerase
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.

Parents Reply Children
Related