Problem using Internal RTC LPC1768/69. RTC registers content live for ever

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem using Internal RTC LPC1768/69. RTC registers content live for ever

1,026 Views
fernando_casado
Contributor II

I fill a little like an idiot, because my problem sound to "magic".

I have board with a LPC1768 microcontroller and we use LPCXpresso for programming.

I am trying to use the 20 bytes of battery-powered backup registers to store some information. As long as there is a battery connected, everything is OK: information is there when we power the system on.

The problem has appeared when we have dismounted the battery and removed the power. Once we have power on the board again (without the battery), the information was still there. We have tested with  debugger cable (removing the cable to be sure the micro has no other voltage applied, and running free (without debugger), and moving a LED if the battery-powered backup registers had a value different from zero.

So my questions are:

- Has someone found this kind of behavior? Any solution?

- How much time the information is retained in the battery-powered registers when power (both Vdd and battery) are removed?

- Do they reset to 0, or the read value is random? (In my case, the value in the debugger was exactly the same)

Thank you and regards

Fernando

Labels (1)
0 Kudos
5 Replies

988 Views
frank_m
Senior Contributor III

I would check the schematics, is a cap parallel to the battery (connectors) ?

Without or with minimal load, quality electrolytic caps take quite long to discharge, thus keeping your RTC registers up to date.

If so, you can try to discharge this cap(s) after powering off / disconnecting.

0 Kudos

970 Views
fernando_casado
Contributor II

Hi Frank,

Thank you for your response. Electrical schematic is OK. Nothing in parallel to battery connectors.

Which should be the read value from RTC registers when battery power is removed and there is no voltage applied to PCB? Zero, or random?

Thank you again.

Fernando

0 Kudos

966 Views
frank_m
Senior Contributor III

> Which should be the read value from RTC registers when battery power is removed and there is no voltage applied to PCB? Zero, or random?

Without any supply voltage, you should not be able to read anything at all.

> Electrical schematic is OK. Nothing in parallel to battery connectors.

Not even a buffering cap ? That would surprise me.

The datasheet says (sect. 8.28):

The RTC on the LPC17xx is designed to have extremely low power consumption, i.e. less than 1 uA. ... When operating from a battery, the RTC will continue working down to 2.1 V.

The user manual states (sect. 27.6):

Reset values apply only to a power-up of the RTC block, other types of reset have no effect on this block. Since the RTC is powered whenever either of the VDD(REG)(3V3), or VBAT supplies are present, power-up reset occurs only when both supplies were absent and then one is turned on. Most registers are not affected by power-up of the RTC and must be initialized by software if the RTC is enabled.

Thus, everything indicates the backup registers are still powered (at least for some while) when your supply is turned off.

Did you try longer waiting periods, or deliberately discharging caps that might power the battery domain ?

0 Kudos

961 Views
fernando_casado
Contributor II

Hi Frank,

There is no capacitor in parallel to VBATT entry, but you are rigth: there are some capacitors in parallel to 3.3V

I left the PCB without power for more than 10 hours... This time should be more than enough to discharge all capacitors, although I did not test the remaining voltages. I will do again with the oscilloscope measuring the 3.3V and I will tell you.

Regards

Fernando

0 Kudos

957 Views
frank_m
Senior Contributor III

> I left the PCB without power for more than 10 hours... This time should be more than enough to discharge all capacitors, ...

I would agree, about an hour should be o.k.

Perhaps you can try to short caps on the board e.g. with a pair of tweezers (after a few minutes, not fully charged), or short the VBAT pins (on the LPC) the same way after turning off power and removing all wires.

I didn't use the LPC176x RTC myself yet, though. 

0 Kudos