LPC55S28 Lower Power RTC Battery Backup when using ROM bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S28 Lower Power RTC Battery Backup when using ROM bootloader

跳至解决方案
159 次查看
guitardenver
Contributor IV

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?

 

0 项奖励
回复
1 解答
50 次查看
Harry_Zhang
NXP Employee
NXP Employee

Hi @guitardenver 

Thank you for sharing the schematic.
VBAT_PMU and VBAT_DCDC/CORE are tied together and fed from the coin cell through a diode.
In ROM bootloader mode, the MCU is in full active state (PD_CORE + PD_SYSTEM powered).When VDD_MAIN collapses suddenly, the PMU doesn’t automatically force Deep Power Down.
The internal regulators try to keep PD_CORE alive using VBAT as a fallback.
So If the MCU is in ROM ISP mode and power is removed, there’s no software hook to enter DPD. The PMU doesn’t auto-gate PD_CORE because it assumes VDD will return quickly.
If you only need RTC backup, do not feed VBAT_DCDC/CORE from the coin cell.
Tie VBAT_PMU to the coin cell, but leave VBAT_DCDC/CORE connected only to VDD_MAIN.
This ensures PD_CORE cannot draw from VBAT.

BR
Harry

在原帖中查看解决方案

0 项奖励
回复
4 回复数
78 次查看
guitardenver
Contributor IV

In my design, I only power VBAT with the battery once powered down. Via diodes to to protect it from feeding VMAIN as well. The issue is that if you boot into ROM bootloader, and power is removed, VBAT is drawing almost 10mA. It's only when I am able to put the MCU into deep power down mode on the brown out detection that the current draw is 1uA or less. 

guitardenver_1-1765211271829.png

 

 

0 项奖励
回复
51 次查看
Harry_Zhang
NXP Employee
NXP Employee

Hi @guitardenver 

Thank you for sharing the schematic.
VBAT_PMU and VBAT_DCDC/CORE are tied together and fed from the coin cell through a diode.
In ROM bootloader mode, the MCU is in full active state (PD_CORE + PD_SYSTEM powered).When VDD_MAIN collapses suddenly, the PMU doesn’t automatically force Deep Power Down.
The internal regulators try to keep PD_CORE alive using VBAT as a fallback.
So If the MCU is in ROM ISP mode and power is removed, there’s no software hook to enter DPD. The PMU doesn’t auto-gate PD_CORE because it assumes VDD will return quickly.
If you only need RTC backup, do not feed VBAT_DCDC/CORE from the coin cell.
Tie VBAT_PMU to the coin cell, but leave VBAT_DCDC/CORE connected only to VDD_MAIN.
This ensures PD_CORE cannot draw from VBAT.

BR
Harry
0 项奖励
回复
10 次查看
guitardenver
Contributor IV

Thank you for the information!

 

I will connect VBAT_DCDC and VBAT_DCDC_CORE to the main external power only. And only connect the VBAT_PMU to the battery. 

0 项奖励
回复
88 次查看
Harry_Zhang
NXP Employee
NXP Employee

Hi @guitardenver                                                                                                                                         

On LPC55S28, the chip is split into power domains. When VDD_MAIN goes away, only the Always‑On (PD_AON) domain—powered from VBAT_PMU—remains. PD_AON contains the PMU/PMC, RTC, OS event timer.
Harry_Zhang_0-1765160108245.png

So Power removed in ROM ISP: ROM stops; non‑AO domains lose power; AO domain keeps RTC on VBAT; next wake is a cold boot with ROM re‑deciding boot source. No ROM-induced VBAT drain provided you block back‑power from external interfaces.

You can refer to the Power Management on LPC55S3x/LPC553x.

If you want to 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.

I think VBAT must feed only the AO domain. Make sure the coin cell feeds VBAT_PMU via a diode/ideal‑diode and does not accidentally source VDD_MAIN or any external rails through pull-ups or transceivers.

You can refer to the Hardware Design Guidelines for LPC55(S)xx.

BR

Harry

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2255465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC55S28%20%E4%BD%BF%E7%94%A8%20ROM%20%E5%BC%95%E5%AF%BC%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%E6%97%B6%E7%9A%84%E4%BD%8E%E5%8A%9F%E8%80%97%20RTC%20%E7%94%B5%E6%B1%A0%E5%A4%87%E4%BB%BD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2255465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%20LPC55S28%20MCU%E3%80%82%E6%88%91%E9%9C%80%E8%A6%81%E4%B8%BA%20RTC%20%E5%AE%89%E8%A3%85%E5%A4%87%E7%94%A8%E7%94%B5%E6%B1%A0%E3%80%82%E7%94%B1%E4%BA%8E%E6%B2%A1%E6%9C%89%E4%B8%93%E7%94%A8%E7%9A%84RTC%E7%94%B5%E6%BA%90%E5%BC%95%E8%84%9A%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%AF%8F%E6%AC%A1%E6%96%AD%E5%BC%80%E8%AE%BE%E5%A4%87%E7%94%B5%E6%BA%90%E6%97%B6%EF%BC%8C%E6%88%91%E4%BB%AC%E7%9A%84MCU%E9%83%BD%E5%BF%85%E9%A1%BB%E8%BF%9B%E5%85%A5%E6%B7%B1%E5%BA%A6%E6%8E%89%E7%94%B5%E6%A8%A1%E5%BC%8F%E3%80%82%E5%A6%82%E6%9E%9C%E4%B8%8D%E8%BF%99%E6%A0%B7%E5%81%9A%EF%BC%8CVBAT%20%E5%BC%95%E8%84%9A%E7%9A%84%E7%94%B5%E6%B5%81%E5%AF%B9%E7%BA%BD%E6%89%A3%E7%94%B5%E6%B1%A0%E6%9D%A5%E8%AF%B4%E5%B0%B1%E5%A4%AA%E5%A4%A7%E4%BA%86%E3%80%82%E6%88%91%E9%9C%80%E8%A6%81%E8%83%BD%E4%BD%BF%E7%94%A8%201632%20%E7%BA%BD%E6%89%A3%E7%94%B5%E6%B1%A0%204-6%20%E5%B9%B4%E7%9A%84%E4%BA%A7%E5%93%81%E3%80%82%E6%88%91%E7%9A%84%E5%A4%87%E7%94%A8%E7%94%B5%E6%B1%A0%E5%8F%AA%E6%8F%90%E4%BE%9B%20VBAT%20%E7%94%B5%E6%BA%90%E5%BC%95%E8%84%9A%EF%BC%88%E5%8F%AA%E6%9C%89%203%20%E4%B8%AA%E5%BC%95%E8%84%9A%EF%BC%89%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E7%BB%8F%E9%85%8D%E7%BD%AE%E4%BA%86%20VBAT%20BOD%EF%BC%8C%E5%BD%93%E4%B8%AD%E6%96%AD%E5%8F%91%E7%94%9F%E6%97%B6%EF%BC%8C%E6%88%91%E4%BC%9A%E5%85%B3%E9%97%AD%E6%89%80%E6%9C%89%E8%AE%BE%E5%A4%87%E5%B9%B6%E8%BF%9B%E5%85%A5%E6%B7%B1%E5%BA%A6%E6%8E%89%E7%94%B5%E6%A8%A1%E5%BC%8F%E3%80%82%E8%BF%99%E4%BD%BF%E5%BE%97%20VBAT%20%E5%8F%AA%E6%B6%88%E8%80%97%E7%BA%A6%20720nA%20%E7%94%B5%E6%B5%81%E3%80%82%E8%BF%99%E5%BE%88%E5%A5%BD%EF%BC%8C%E6%95%88%E6%9E%9C%E4%B9%9F%E9%9D%9E%E5%B8%B8%E5%A5%BD%E3%80%82%20%3C%2FP%3E%3CP%3E%E6%88%91%E8%BF%98%E6%83%B3%E4%BD%BF%E7%94%A8%20ROM%20%E5%AE%89%E5%85%A8%E5%90%AF%E5%8A%A8%E5%8A%A0%E8%BD%BD%E5%99%A8%E3%80%82%E6%88%91%E6%83%B3%E4%BD%BF%E7%94%A8%20USB%20%E7%AB%AF%E5%8F%A3%E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8C%E5%A6%82%E4%BD%95%E4%BF%9D%E8%AF%81%E7%94%B5%E6%B1%A0%E6%9C%80%E7%BB%88%E4%B8%8D%E4%BC%9A%E6%B6%88%E8%80%97%E5%A4%A7%E9%87%8F%E7%94%B5%E6%B5%81%EF%BC%9F%3C%2FP%3E%3CP%3E3.%E6%9C%89%E6%B2%A1%E6%9C%89%E5%85%B6%E4%BB%96%E5%BB%BA%E8%AE%AE%EF%BC%8C%E6%97%A2%E8%83%BD%E4%BD%BF%E7%94%A8%20ROM%20%E5%BC%95%E5%AF%BC%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%EF%BC%8C%E5%8F%88%E8%83%BD%E4%BB%85%E4%B8%BA%20RTC%20%E6%8F%90%E4%BE%9B%E5%BC%BA%E5%A4%A7%E7%9A%84%E5%A4%87%E7%94%A8%E7%94%B5%E6%B1%A0%EF%BC%9F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2257349%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55S28%20Lower%20Power%20RTC%20Battery%20Backup%20when%20using%20ROM%20bootloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2257349%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%9C%A8%E6%88%91%E7%9A%84%E8%AE%BE%E8%AE%A1%E4%B8%AD%EF%BC%8C%E4%B8%80%E6%97%A6%E6%96%AD%E7%94%B5%EF%BC%8C%E6%88%91%E5%8F%AA%E7%94%A8%E7%94%B5%E6%B1%A0%E4%B8%BA%20VBAT%20%E4%BE%9B%E7%94%B5%E3%80%82%E9%80%9A%E8%BF%87%E4%BA%8C%E6%9E%81%E7%AE%A1%E6%9D%A5%E4%BF%9D%E6%8A%A4%E5%AE%83%E5%85%8D%E5%8F%97VMAIN%E4%BE%9B%E7%94%B5%E7%9A%84%E5%BD%B1%E5%93%8D%E3%80%82%E9%97%AE%E9%A2%98%E5%9C%A8%E4%BA%8E%EF%BC%8C%E5%A6%82%E6%9E%9C%E4%BD%A0%E5%90%AF%E5%8A%A8ROM%E5%BC%95%E5%AF%BC%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%E5%B9%B6%E6%96%AD%E5%BC%80%E7%94%B5%E6%BA%90%EF%BC%8CVBAT%E6%B6%88%E8%80%97%E7%9A%84%E7%94%B5%E6%B5%81%E5%B0%86%E8%BF%9110mA%E3%80%82%E5%8F%AA%E6%9C%89%E5%BD%93%E6%88%91%E8%83%BD%E5%A4%9F%E5%9C%A8%E6%8E%89%E7%94%B5%E6%A3%80%E6%B5%8B%E6%97%B6%E5%B0%86%20MCU%20%E7%BD%AE%E4%BA%8E%E6%B7%B1%E5%BA%A6%E6%8E%89%E7%94%B5%E6%A8%A1%E5%BC%8F%E6%97%B6%EF%BC%8C%E7%94%B5%E6%B5%81%E6%B6%88%E8%80%97%E6%89%8D%E4%BC%9A%E8%BE%BE%E5%88%B0%201uA%20%E6%88%96%E6%9B%B4%E4%BD%8E%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22guitardenver_1-1765211271829.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22guitardenver_1-1765211271829.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22guitardenver_1-1765211271829.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368995iED36997145540F8F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22guitardenver_1-1765211271829.png%22%20alt%3D%22guitardenver_1-1765211271829.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2258980%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55S28%20Lower%20Power%20RTC%20Battery%20Backup%20when%20using%20ROM%20bootloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2258980%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F43524%22%20target%3D%22_blank%22%3E%40guitardenver%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E5%88%86%E4%BA%AB%E7%A4%BA%E6%84%8F%E5%9B%BE%E3%80%82%3CBR%20%2F%3EVBAT_PMU%20%E5%92%8C%20VBAT_DCDC%2FCORE%20%E8%BF%9E%E6%8E%A5%3CSTRONG%3E%E5%9C%A8%E4%B8%80%E8%B5%B7%3C%2FSTRONG%3E%EF%BC%8C%E9%80%9A%E8%BF%87%E4%BA%8C%E6%9E%81%E7%AE%A1%E4%BB%8E%E7%A1%AC%E5%B8%81%E7%94%B5%E6%B1%A0%E9%A6%88%E7%94%B5%E3%80%82%3CBR%20%2F%3E%E5%9C%A8%20ROM%20%E5%BC%95%E5%AF%BC%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E5%BE%AE%E6%8E%A7%E5%88%B6%E5%99%A8%E5%A4%84%E4%BA%8E%E5%AE%8C%E5%85%A8%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81%EF%BC%88%E7%94%B1%20PD_C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