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

CONFIG_BOOTLOADER_MCUBOOT costing hundreds of uA?

I've been struggling to track down excessive power consumption on a nRF9160 device and have found that, when all UART/Serial are de-selected/off,  adding or commenting out:


CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

has an impact of hundreds of microamps. It's the difference between measuring about 10uA and four or five hundred.

This effect disappears when I enable serial output debugging: my guess is that it's just that masked in those cases, since the UART's already on.

I've added these MCUBOOT options because we want to do FOTA, but I'm not sure how to mcuboot to either be quiet or shutdown the UART when it's done.

I've found bootloader/mcuboot/boot/zephyr/Kconfig that seems to have related stuff in it, but all the options in there I try to add to my prj.conf to disable things just cause the build to gag and die.  Not certain which flags to use or how to incorporate these into my project config (I certainly don't want to use any of the menuconfig stuff, as we're in dev and that step needs to be repeated everytime we clean up). Is mcuboot really using the uart without being able (or knowing to) shut it down?  How do I make it stop?

Any ideas?

On a semi-related note: at this point, every time I want to enabled/disable serial debug, I'm editing my prj.conf and nrf/samples/nrf9160/spm/prj.conf -- is there any way to set this in one place only?

On a completely unrelated note, why is the Secure Partition Manager--something that seems relatively crucial--buried so deep in a "samples" directory?

Thanks!

P

Parents Reply
  • Your answer also solves my power consumption issue. Thanks. With or without the mcuboot.conf  file, I can see 750+ uA difference. So, I will keep the mcuboot.conf  file.

    But I just wonder, I already have the CONFIG_SERIAL=n in the prj.conf, why that one doesn't disable the serial logging from MCUboot? Why only the one in mcuboot.conf  file can disable it?

Children
No Data
Related