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

Image for DFU not page aligned

Hello, i'm currently doing my own DFU central for the BLE DFU on SDK 13, i followed all the steps on this link, i created the init and image files with nrfutil and now i want to send them for the DFU. I succede to send the init packet and the execture is working but when i'm tring to create the image object i get the error "the page in not aligned".

This is the DEBUG LOG from the secure_dfu_bootloader, the image is 71180 byte wide, What page aligned mean ? if iw have to send the image in several parts how do i do ?

Thanks for the help

  • Hi Albin,

     Yes you have to split you image into multiple objects. 

    Currently the max object size DATA_OBJECT_MAX_SIZE is equal to CODE_PAGE_SIZE. Meaning basically all objects should be 1 page, except for the last one. 

    If you look at the code in nrf_dfu_data_req() you can see the check inside case NRF_DFU_OBJECT_OP_CREATE , if it's not the last object it has to be page aligned. 

    To send the image in several object, you can just split them and send objects one by one, finish an object by execute command, and start the next object using Create command. 

     

    I would suggest you to either use a logic analyzer to track Serial DFU update or use a BLE sniffer to track a BLE DFU update , so you can have a reference to follow. 

  • Yes i manage to split my entire image into several objects, i didn't use the BLE sniffer but i used the bootloader_secure_ble_debug with nrfConnect and it was enough to the DFU update, thanks for the help.

Related