OTA for NRF52833

Hi Everyone,

               I am trying to do OTA on NRF52833. In my previous project I was able to do OTA on NRF52840. The memory requirements for the project were as follows:-

Memory requirements for NRF52840 in the DFU project. 

MEMORY SEGMENTS -

FLASH1 RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000;mbr_params_page RX 0x000FE000 0x1000;bootloader_settings_page RX 0x000FF000 0x1000;uicr_bootloader_start_address RX 0x10001014 0x4;uicr_mbr_params_page RX 0x10001018 0x4

SECTION PLACEMENT MACROS

FLASH_PH_START=0x0

FLASH_PH_SIZE=0x100000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x40000

FLASH_START=0xf1000

FLASH_SIZE=0xd000

RAM_START=0x20005978

RAM_SIZE=0x3a688

Memory requirements for NRF52840 in the application  project. 

MEMORY SEGMENTS - FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000

SECTION PLACEMENT MACROS

FLASH_PH_START=0x0

FLASH_PH_SIZE=0x100000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x40000

FLASH_START=0x27000

FLASH_SIZE=0xd9000

RAM_START=0x20005978

RAM_SIZE=0x3a688

Now I wanted to perform OTA on NRF52833. How can I modify these memory settings to do a successful OTA ?What needs to be changed in the MEMORY SEGMENTS for NRF52840?

It also seems that there is no NRF_CRYPTOCELL in the NRF52833 dfu project. Can we add NRF_CRYPTOCELL for nrf52833 like it is added in nrf52840?? 

Parents Reply Children
  • Hi, 

    My colleague, Vidar, created a new 'pca10100' configuration for the buttonless template app in this thread. Please try it. 

    -Amanda

  • Hi Amanda,

                     I know its too late to reply but I have successfully manages to do OTA on NRF52833. Now my only issue is when for the first time I program the device, I am using merge hex to combine the softdevice,bootloader and application file. I give the following script  to generate merged hex file:-

    
    @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 S140=s140_nrf52_7.2.0_softdevice.hex
    SET BOOTLOADER=bootloader.hex
    SET APPLICATION=application.hex
    
    echo "## Looking to make sure %S140% exists"
    if not exist %S140% (
    echo "#### s140 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 "## Looking to make sure APPLICATION% exists"
    if not exist %APPLICATION% (
    echo "#### APPLICATION hex file does not exist! Please make sure its compiled, copied, and renamed into this folder!"
    goto :end
    )
    echo.
    
    mergehex -v
    
    echo "## Merging S140 and bootloader, then flashing it to nRF52-DK; make sure the DK is powered on and connected to the PC"
    mergehex -m %S140% %BOOTLOADER% %APPLICATION% -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

    After running this script I load the generated merged hex file into device. Now what I have observed is the device stays in the bootloader mode. It does not automatically go into application mode. 

    What changes are needed to do so that after flashing this merged hex file, the device will come out of bootloader mode and start running the application. 

    I am getting the following error:-

    00> <info> app: Inside main
    00> 
    00> <info> nrf_dfu_settings: Old settings page detected. Upgrading info.
    00> 
    00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    00> 
    00> <info> app: No firmware to activate.
    00> 
    00> <warning> app: Boot validation failed. App is invalid.
    00> 
    00> <info> nrf_bootloader_wdt: WDT is not enabled
    00> 
    00> <info> app: Entering DFU mode.

     

    I saw many threads on it but could not find the link to what I am missing. Please help. 

    Thanks & Regards,

    Snehal Bundele.

  • Hi, 

    sne_333 said:
    After running this script I load the generated merged hex file into device.

    If you flash that generated merged hex file into the device, you would also need to program the Bootloader settings page.

    -Amanda 

  • So for NRF52833, this will be the command to generate settings file?

    nrfutil settings generate --family NRF52833 --application app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings.hex

Related