I am using the LPC55S28 MCU. I need a battery backup for the RTC. Since there is not a dedicated RTC power pin, our MCU must go into a deep power down mode each time power is removed from the device. If I do not, the current VBAT pins draw is way to much for a coin cell battery. I need something that will last 4-6 years on a 1632 coin cell. My battery backup only supplies the VBAT power pins (only 3 pins).
I have the VBAT BOD configured and when the interrupt hits, I shut everything down and go into a deep power down mode. Which makes the VBAT only draw about 720nA. Which is great and works really well.
I also want to use the ROM secure bootloader. I want to use the USB port for firmware updates. Instead of making a custom bootloader I would love to use the one built in and use the NXP secure provisioning tool and encrypted firmware files.
My questions:
1. If the MCU boots into the ROM bootloader, via the ISP pin, what happens when power is removed while in bootloader mode?
2. How can I guarantee that the battery will not end up drawing a ton of current if my application code is not running with it's BOD interrupt?
3. Any other suggestions to use the ROM bootloader and still have a robust battery backup only for the RTC?