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

NRF52832 uses a large amount of energy when entering application from secure_bootloader

We are currently working on an energy harvesting solution that powers the nRF52832. The energy harvester is providing energy from indoor solar and at the lowest light level (200 lux) the solar cell outputs close to 20uA at 2.5V. The energy harvester has a built in boost converter that can charge the attached two 220uF capacitors to 3.65 volts, and will enable the output of the capacitors to power the nRF52832 once they charge up to 3.3 volts. This leaves around ~400 uC of charge that can be used by the NRF at boot before discharging down to below the operating voltage of 2.2 volts.

The 400uC of charge has been more than enough to boot most of our modified applications. However, when merging the secure_bootloader and another application the boot process uses more charge than running the two independent of each other, as seen by the PPK output:

Only the bootloader on the device:

Only the application on the device:

Merged bootloader and application using mergehex and nrfutil:

These measurements were taken by using the PPK and the PCA10040 DK. The PPK would be connected, started, and then the power output would be enabled. The highlighted regions represent the first fractions of a second when the power output was enabled.

My guess is that there's some kind of loop that is drawing a large amount of charge. I'm not exactly sure what would require a wait cycle that lasts 1/8th of a second while transitioning over to the app.

Any guidance or help to get rid of this high power state would be wonderful, and thanks in advance.

Parents
  • The cause of the high power state was from the CRC that happens before the application boots. I'm going to try to change the CRC code a bit to make it pause every X bytes so the capacitors have enough time to recharge before continuing the CRC. I also might try to modify the crc_on_valid_app_required code to only check the CRC after certain reset events.

  • Hello,

     

    PF-JohnF said:
    I'm going to try to change the CRC code a bit to make it pause every X bytes so the capacitors have enough time to recharge before continuing the CRC.

     I suggest you search for "CRC" in the bootloader's sdk_config.h file. You will see that there are some options, such as NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET. Perhaps you can modify the behavior of the bootloader's CRC checks just by modifying these options.

    Best regards,

    Edvin

Reply
  • Hello,

     

    PF-JohnF said:
    I'm going to try to change the CRC code a bit to make it pause every X bytes so the capacitors have enough time to recharge before continuing the CRC.

     I suggest you search for "CRC" in the bootloader's sdk_config.h file. You will see that there are some options, such as NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET. Perhaps you can modify the behavior of the bootloader's CRC checks just by modifying these options.

    Best regards,

    Edvin

Children
No Data
Related