7 years, 9 months ago.

KL25Z RTC does not count on 5V VIN but on USB

Hello,

I found a strange problem. I drive my KL25Z with a step-up regulator (NCP1402) with 5V output and two AA rechargeable batteries as source. I collect acceleration data (ADXL345 over SPI) on a miroSD Card (SPI).

Moreover I use the RTC Module on the KL25Z for determining some start/termination times. Works fine in 'debug' mode, connected with my computer over USB cable. Powered with the step-up regulator at 5V the RTC does not 'count'. I can set its value via Bluetooth but it is not getting incremented.

Is this a known bug? How can this issue be solved?

Kind regards tknapp

1 Answer

7 years, 9 months ago.

Looking at the schematic for the KL25Z the RTC clock is generated by the debug interface chip.

When the USB isn't connected the debug interface chip is held in reset.

So no USB, no RTC clock, no RTC time.

I can't think of any way around this without modifying the hardware.

You either need to pull SDA_RST high when powered with a 4.7k resistor to 5V or use a diode to supply power to P5V_SDA from your 5V rail. You could fix it by short circuiting across pins 1 and 3 of D2 but that then risks damaging things (including whatever is powering the USB) if the USB is connected at the same time as some other power source.

To be honest the simplest solution is probably to power it from the debug port. Either put a USB plug on your 5V source or use a USB battery pack designed for charging cell phones. I use the phone charging packs all the time, the biggest issue I've had with them is that the mbed power draw is sometimes too low and the battery shuts itself off thinking the phone is fully charged.

Accepted Answer