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

ota over serial merging with application

hai ,

  i my application i need to update ota over serial . i m using nrf52840 and sdk 15.2

step 1 : at first flashed uart boot loader code on my board 

step 2 : updated the application over serial is worked fine

but second  time after changing to  boot loader mode i got issues with  not loading a new firmware file .

even not a ping response also.

i dont know whether the issue with button-less to enter in boot-loader mode  or on boot-loader 

application memory 

FLASH_PH_START=0x0

FLASH_PH_SIZE=0x100000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x40000

FLASH_START=0x26000

FLASH_SIZE=0xda000

RAM_START=0x20001cd0

RAM_SIZE=0x3e330

uart bootloader memory 

FLASH_PH_START=0x0

FLASH_PH_SIZE=0x100000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x40000

FLASH_START=0xe4000

FLASH_SIZE=0x1a000

RAM_START=0x20000008

RAM_SIZE=0x3fff8

completed with serial. but when i am merging the code  its not entering the boot loader mode.

on uart boot-loader code just changed button-less option to 1 in sdk.h and timed out 2 mins

on my application side  implemented for entering boot loader ,attached the code below.

#define BOOTLOADER_DFU_START 0xB1

void boot_mode()
{
 nrf_delay_ms(100);
               NRF_POWER->GPREGRET = BOOTLOADER_DFU_START;

              nrf_delay_ms(100);

              NVIC_SystemReset(); 
			  
			  }

but once its enter into boot mode after timeout also staying in same mode not changing to application.

dont know why ,same process done with BLE its working .

coming to over serial having these issues.

how to merge the code with sofdevice , uart boot loader , application  and bl_settings.hex ?

is there any documentation for uart ?

could you please explain me on that ? 

 

Parents Reply Children
  • hai,

          at first merged secure uart bootloader.hex code and softdevice.hex together

    and flashed the hex file to the board .

    now my device is in bootloader mode then i send a application file over serial ,

    then device running in application.

    then changed to bootloader mode the code is attached below.it is not entering into with2-3 seconds changing again to application mode

    whats the mistake here ?

    could you please what to do ?

    #define BOOTLOADER_DFU_START 0xB1
    
    void boot_mode()
    {
        printf("ENTER IN BOOTLOADER MODE!!!!!\n");
             err_code = sd_power_gpregret_clr (0, 0xff);
     APP_ERROR_CHECK(err_code);
    err_code = sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
     APP_ERROR_CHECK(err_code);
    
        //  NRF_POWER->GPREGRET = BOOTLOADER_DFU_START;
    
     nrf_delay_ms(100);
    
                  NVIC_SystemReset();
                  }

  • Hi,

    It could be that the update is rejected by the bootloader. In that case, the bootloader will boot the old application again. Are you able to debug the bootloader to see if maybe the pre-validation step is failing (nrf_dfu_validation.c->nrf_dfu_validation_init_cmd_execute)?

Related