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

Possible to disable pre- and post-validation in the DFU process?

We're working on a product that is able to store around 400uC of charge (two 220uF capacitors). There is a constant input of 21 uA minimum coming from a small solar panel. We are using the secure_bootloader example

When testing the DFU, the prevalidation check will take around 600uC of charge in 125 ms. We're able to get normal operation if we comment out prevalidation check (lines 548-555 of file nrf_dfu_validation.c) the device is able to recieve the firmware binary. However, once the DFU gets completes transmission of the binary it will take too much power again during the postvalidation check.

Commenting out postvalidation check (lines 563-569 of nrf_dfu_req_handler) allows the DFU to state it was "complete" but it will fail to boot into the application and advertise as dfutarg.

Eventually we are thinking of changing the uECC.c file to allow for a delay as it is processing through uECC_verify function in order to reduce the average current usage and allow the solar panel to recharge the capacitors.

Is there a way to disable these validation checks? 

  • Hello,

    As I just posted in your previous ticket, you should look into the project settings in sdk_config.h in your bootloader project. 

     

    Commenting out postvalidation check (lines 563-569 of nrf_dfu_req_handler) allows the DFU to state it was "complete" but it will fail to boot into the application and advertise as dfutarg.

     Are you sure it is the postvalidation check that causes the issue? It may be the MBR that handles the moving of the image that is drawing the power. I guess you need to experiment with the uECC_verify to figure this out. If the issue is the moving of the new application (from temporary position into final position) then you should look into deleting the old application first and writing the new one directly to the place it will run from. This, however, will only work for application, and not for softdevice updates. 

Related