i.MX28 RTC Backup Battery Connection

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

i.MX28 RTC Backup Battery Connection

Jump to solution
7,270 Views
markwilliams
Senior Contributor I

Hi all,

I have a board that uses the 5V input to the i.MX28 PMU for the power supply and just requires a small NiMH backup battery to keep the RTC alive. The NiMH is trickle charged from the VDD4P2 rail when the device is powered on to keep it topped up.

I am a little confused about the connections for the PMU battery and DCDC batt pins. When I started my design the AN4199 document from Freescale did not cover this so I laid the board out based on the descriptions of the connections. Since obtaining my prototypes Freescale have updated AN4199 to add more detail on systems with just a backup battery and now I am not so sure of what I have done!

If you look at the diagram of the PMU in AN4199 it shows that the BATTERY pin is the output from the internal charger, and the DCDC_BATT pin is the input to the DC-DC from the battery.

In the datasheet for the i.MX28 it states that the BATTERY pin provides current to charge the battery, and the DCDC_BATT pin provides power into the iMX28 PMU from a battery. This agrees with the diagram.

Now, assuming that you are not using the internal battery charger naturally you would think to leave the battery pin disconnected. However, in the data sheet it states: "Application should include a Schottky diode between BATT and VDD4P2.". Which I have done.

I am feeding my battery backup into the DCDC_BATT pin and as from the above I believed this was the input to the board for the battery. Even if just used for RTC backup.

I have since found out that the RTC backup battery should be fed into the pin labelled BATTERY (which is described as the charger output in the documentation?!) and not DCDC_BATT.

My schematic is below, thankfully I added R24 which is a big 1206 pad in case I needed to make a mod!

Battery Setup.png

In this schematic I have the diode the datasheet asks for from BATTERY to VDD4P2. I am trickle charging the NiMH via D5 and R65 from VDD4P2.

D8 is to prevent the possibility of charging the battery back from DCDC_BATT (I guess nothing should be output from this pin anyway). R67 is there to essentially protect the battery should the board try and boot from it. The Vdrop accross R67 is negligible under backup mode but would kill the supply if the board tried to boot.

The problem I have is that I have now found out that BATTERY is not just the charger output as described in the documentation. It is also the input for the RTC backup. Apparently it is also the pin on which the internal battery monitor measures the battery voltage too. Can anyone confirm this for me?

I can mod my circuit above as I only have a small prototype run and have the necessary pads brought out from the device.

I have seen the power scheme suggested in the revised AN4199. This connects the battery to the BATTERY pin. It then has resistors from DCDC_BATT  and BATTERY to VDD4P2.

Can anyone from Freescale who actually knows the internal architecture offer any advice on my circuit above?

Thanks, Mark

Labels (1)
Tags (1)
0 Kudos
1 Solution
3,348 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Mark,

    Do you have i.MX28 platform at hand ? If you have Home Energy Gateway reference platform, You can test it .  I only have  i.MX28 EVK board at my hand.

    According to my understanding it, whatI disscussed with you is my poiont of view. If I design a board based on i.MX28, I will handle RTC like above method that I described.

    Don't worry about it, Let me confirm the questions on RTC with HW Dept. :smileyhappy:

Regards,

Weidong

View solution in original post

0 Kudos
22 Replies
3,134 Views
markwilliams
Senior Contributor I

Further to the above, a reference design for the iMX233 (same PMU apparently) states to remove the resistor from BATT to VDD4P2:

imx233 batt.png

The AN4199 shows the resistor that the above diagram says to remove (R329) connected?

an4199.png

So I am not sure if the resistor from battery to VDD4P2 is required as these two documents from Freescale seem to conflict. I would guess that if you are trying to minimise the current draw from your battery then you wouldn't want a path via a 1k resistor from the battery to VDD4P2?

Mark

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Further to the above, can I clarify the following from the datasheet:

"The RTC can continue to count time as long as a voltage is applied to the BATT

pin, irrespective of whether the rest of the chip is powered up. The normal digital reset has

no effect on the master RTC registers located in the crystal power and clock domain. A

special first-power-on reset establishes the default value of the master RTC registers when

a voltage is first applied to the BATT pin (battery insertion)."

Which pin is this referring to as 'BATT' - is this DCDC_BATT or BATTERY? I.e. which pin do I need to connect a backup battery to in order to keep the RTC alive?

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Further research! The Home Energy Gateway reference platform has a schematic very similar to mine. They have not used the 'recommended pull up resistors' and maintained the schottky diode:

heg.png

Looks like in this design the battery charger could be used to charge the lithium cell via the 80.6k resistor, and take power from it via the diode. Interestingly the cell would push the backup power into both BATTERY and DCDC_BATT. So I am still no clearer as to which of these pins actually powers the RTC!

Looking at the above schematic, the coin cell also powers up VDD4P2? Would this increase the current taken from the battery?

A clarification of this circuit from Freescale would be a great help to anyone attempting to use the i.MX28 series....

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

The latest information I have is that both BATTERY and DCDC_BATT must be connected to VDD4P2 using a 1k resistor.

Unfortunately this then contradicts the datasheet which states that the voltage on DCDC_BATT should not exceed the voltage on BATTERY.

With the circuit in AN4199, when 5V power is applied the DCDC_BATT pin will be pulled to 4.2V through its 1k resistor.

The voltage on the BATTERY pin will be the current battery voltage (less than 4.2V).

This means that V_DCDC_BATT > V_BATTERY with this recommended circuit, violating the datasheet parameters.

I am currently waiting response from Freescale in how this should be connected.

0 Kudos
3,134 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Mark,

     DCDC_BATT & BATTERY pins are used to connect working Battery with 3.7V . this battery is not Li coin cell battery for keeping RTC atfter powerdonw.

     If you don't use working battery with 3.7V, RTC inside i.MX28 can't be kept atfter power down. You will have to add another RTC IC with 3.0V li-coin cell supply for your design.

Regards,

Weidong.

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Hi Weidong,

In the datasheet the minimum operating voltage of the battery pin is stated as 3.1V?

Do you (or anyone) know what the minimum input voltage to keep the RTC running is?

Mark

0 Kudos
3,134 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Mark,

     You can supply i.MX28 with single 5V adapter or single Li battery with 3.7V , or "5V adapter + 3.7V battery". just like a mobile device.

     DCDC_BATT & BATTERY pins are not for Li-coin cell battery to keep RTC. Here should be connected to big capacity Li Cell battery for board working. For example, a li cell battery with 3.7V & 1000mA. That's to say ,these 2 pins are input of Li battery with 3.7V( at least 500mA)

     If your design doesn't support battery for board working, RTC in i.MX28 can't be used to keep "Time" atfer power down. It means you will have to use an external RTC IC(such as BQ32000, DS1342, DS1337 etc) for your keeping Time purpose.

   

>>In the datasheet the minimum operating voltage of the battery pin is stated as 3.1V?

   Yes, it also tell us battery pin is for working battery, not li coin cell battery. when the voltage on this pin is less than 3.1V, the board can't work if you only supply it with battery.

   Understand what I described ?

Regards,

Weidong

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Hi Weidong,

If this is true then why does Freescale provide a reference platform with a 3V lithium coin cell to keep the RTC alive???!!!

Check out the Home Energy Gateway reference platform:

heg battery.png

The other reference documents from Freescale also show you can use a Super Cap (initial voltage will be higher as charged from VDD4P2 to keep the RTC alive.

From responses from Freescale support I have found that the battery pin CAN be used to keep the system alive providing the voltage is above 3.1V. This does not have to be a high power lithium battery. It could be any battery source that will be able to supply the 20uA or so required to keep just the 32.768kHz crystal running for as long as the application requires.

I think you are wrong to say that you can't keep the RTC alive if you are not using the battery for operation.

Check out the reference schematics for HEG, iMX233 board and also AN4199. These all show methods of keeping the RTC alive during power down and do not use the battery for powering up the i.MX28.

0 Kudos
3,349 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Mark,

    Do you have i.MX28 platform at hand ? If you have Home Energy Gateway reference platform, You can test it .  I only have  i.MX28 EVK board at my hand.

    According to my understanding it, whatI disscussed with you is my poiont of view. If I design a board based on i.MX28, I will handle RTC like above method that I described.

    Don't worry about it, Let me confirm the questions on RTC with HW Dept. :smileyhappy:

Regards,

Weidong

0 Kudos
3,134 Views
YixingKong
Senior Contributor IV

Weidong, could you please reply the customer's questions? We would like to close the discussion.

Thanks,

Yixinig

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Hi,

I eventually got to the bottom of my board not shutting down properly. I needed to change the power management code in the Windows CE BSP to allow the device to detect a falling 5V rail and shut down. It would then take just 15-20uA from the backup battery and keep the clock alive.

There is a 'reserved bit' in the datasheet that can be used to set up this shutdown that I only found out about by looking through the linux driver! In the linux driver they use this bit, but in the Windows CE driver they do not.

I have still had a couple of occasions though where the board will not power up until I remove all sources of power (including the battery), which I think means the shutdown code has not worked.

I am tempted to add an external RTC with its own battery management as I should be able to get a much longer lifetime and guarantee the i.MX28 shuts down properly every time the power is removed.

0 Kudos
3,134 Views
jordifarres
Contributor III

Hi Mark

I've the same problem than you.

I use a supercap as described in AN199 and configured power_prep for 5v only and setting  HW_RTC_PERSISTENT0 properly.

Unfortunately I had no success.

I found that when 5v is removed, 24MHz oscillator still works and de current drain in the battery pin is about 250uA instead of 20uA to keep only RTC running.

I'm also tempted to re-design  the circuit with an external RTC but before that I'll try to struggle a little more.

Did you have more success ?

thanks

jordi

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

Hi Jordi,

I assume you are using Linux? We are using Windows CE but the driver source is not maintained as well as for the Linux OS so I had to refer to it to correct my WCE driver - I think you need to make sure you have the latest Linux patches as the 5V shutdown was addressed in one of these.

If I recall correctly there is a bit in one of the PMU registers that is marked in the datasheet as 'reserved' but actually is required to configure the chip to shut down correctly when 5V is removed. This is documented in the Linux patch but I can't recall what bit this is.

I have decided to move to an external RTC because we need longer lifetime and ideally need to use a supercap rather than a NiMH battery. The i.MX28 RTC keep-alive current is relatively high and the working input voltage range small which leads to a short lifetime.

We have also had the occasional problem where the board will not boot up after being powered down. We found if we disconnect the RTC battery and re-connect it then the board will start up. It is like the RTC battery has kept the processor locked up.

We are using an RTC from Microchip (they are really cheap) and a Panasonic 1F super capacitor. The cost of this comes in less than the cost of the small Varta NiMH battery we had directly connected to the i.MX28.

Regards,

Mark

0 Kudos
3,134 Views
jordifarres
Contributor III

Hi Mark

I use linux from L2.6.35_1.1.0_130130 BSP.

I'll try to find out what reserved bit is it.

thanks

jordi

0 Kudos
3,134 Views
markwilliams
Senior Contributor I

In the power patches on the Freescale website this is the bit that I needed to shut down my 5V-only board (with RTC backup battery) in power_prep.c:

0001-MX28-imx-bootlets-adds-the-most-robust-support-for-VDD5V-only-configuration.patch

/* If Battery not ready,setup the auto power down if we lost 5V.*/
if (!bBatteryReady)
+{
HW_POWER_5VCTRL_SET(BM_POWER_5VCTRL_PWDN_5VBRNOUT);

+

+#if defined(NO_DCDC_BATT_SOURCE) && defined(mx28)

+/* On i.MX28, a new bit has been added to allow automatic hardware
+ * shutdown if VDD4P2 browns out.  If we permanently only have a VDD5V
+ * source, we want to enable this bit.  For devices with dead batteries,
+ * we could also temporarily set this bit until the kernel battery
+ * charger sufficiently charges the battery but we won't do this for
+ * now as the latest release kernel versions aren't aware of  it
+ * and thus don't handle the proper setting/clearing of this bit.
+ */
+HW_POWER_REFCTRL_SET(1<<7);

+#endif

+

+}

You can see from the comment that HW_POWER_REFCTRL bit 7 is a 'new bit' to shut down the device on VDD4P2 brownout (when power removed).

I hope this helps,

Mark

0 Kudos
3,124 Views
jordifarres
Contributor III

Hi Mark

I finally found de soultion: figure 9 of the AN199 application note is wrong. BATTERY and DCDC_BAT pin should be shortcutted and R145 removed. And it works . I measured 13uA when removing 5V.

:smileyhappy:

Regards

Jordi

0 Kudos
3,124 Views
albertguardiola
Contributor III

Hi Jordi,

I have gone through this discussion carefully. I'm facing the same issue now, still in the design stage.

So did you find any problem implementing this solution? Besides shorting BATTERY and DCDC_BATT pins, and removing R145 pullup, which SW actions shall be taking into account?

Thanks indeed. Best regards

0 Kudos
3,134 Views
jordifarres
Contributor III

Thanks Mark

Surely it will helps me

regards

Jordi

0 Kudos
3,126 Views
jordifarres
Contributor III

Hi

Bad news:

In fact I had already the patches applied on my bootlets version. So the mysterious bit was already setted.

I think will have to change to B plan

Thanks for all

Jordi

0 Kudos
3,134 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Mark,

     I have confirmed and discussed with HW depart. You can use a li-coin cell battery or supper capacitor like above solution.

     But the most important thing is configurations in software : When VDD_5V is on, system will boot. Register should be set "disable 5v to DCDC_BATT". It means if 5V is removed, DCDC_BATT can be used to be input of DCDC converter. Only set it like this, li-coin cell or supper capacitor can only supply RTC module.

    More details, See AN4199 (attached)

Regards,

Weidong