Hello
I have a nrf52840 in deep sleep mode connected to USB and intern a 350mAh lipo battery
The documentation say the led turns off when the battery is full. Now I’m more than 7h in charging mode but the LED is on anytime.
Calculate the battery was totally empty it might be 7h to charge to full. But it wasn’t empy so the time was long enough.
Any hints?
Best regards from Germany and sorry for my English René
Hi there,
SO there is an anomaly where the LED will be on Dimly when it’s in Sleep mode.
until you turn it off. Not sure if it was BSP related , I think so.
Look at the Sleep threads here , I have a post on it. 
HTH
GL
PJ 
what’s the battery voltage at now? the charge current on the xiao is only around 50ma iirc, so even a half empty 350mah pack takes hours and the led stays on until it actually terminates
Some updates
when all pins are switched of (HIGH) and only the 100mAh load-pin is LOW the small green light turns of after a the Akku seems to be full. So this is importent to Know when using Deepsleep while charging.
In this case the batteryCapaticyPercent calculator i found gives after full loading a 86%
int rawValue = analogRead(PIN_VBAT);
float voltage = 2.961 * 3.6 * rawValue / 4096.0;
int batteryPercent = (voltage - 3.3) / (4.2 - 3.3) * 100;
Maybe some values are not 100% correct.
Last Question
does the nrf switch off for saving the battery when 3.3v is reached?
Your point about the load pin being LOW during deep sleep while charging is useful to keep in mind. On the percentage mismatch, the formula assumes a linear discharge curve, but LiPo voltage flattens in the middle, so a full pack often reads well under 100% with that raw scaling. Checking the actual voltage against a multimeter would tell you whether the ADC or the math is off. As for the nRF at 3.3V, that depends on your firmware’s brownout configuration; it doesn’t shut down on its own at that threshold, so you’d need to code that cutoff yourself.
The 86% reading after a full charge likely comes from the ADC scaling rather than the pack itself; the divider and reference voltage both matter more than the linear formula suggests. Measuring the actual cell voltage with a multimeter at that point would tell you which side is off. On the nRF cutoff, the reply above is right that nothing happens automatically at 3.3V unless your firmware enables brownout detection or you explicitly drop into a low-power state, so building that logic in yourself is the safe route.
Seven hours may be normal for a 350mAh LiPo. The XIAO nRF52840 uses a BQ25100 charger. Charging current can be 50mA or 100mA. Actual charging takes longer during the final phase. Measure battery voltage after disconnecting USB. A fully charged LiPo should measure approximately 4.2V.