Something strange started happening to one of my boards.
After putting the cpu in deep sleep I normally wake up with a motion detection, and it works normally, but if I connect the usb to charge the battery when in deep sleep, the cpu simply stuck and there is no way to wake up except by pressing the reset or reprogramming.
Just plugging/unplugging the usb has no effect.
Reprogramming doesn’t need to reset, so the bootloader is still active.
So , that is Peculiar to say the least and NOT Normal AFAIK, So tell me does the charge LED illuminate? Describe some more if you can the in situ setup and the test setup, code also would be helpful but not required at this juncture.
Are you using a double tap, wake up or any motion or movement.
The Park Demo I have on here does what you discribe, Button to sleep , double tap to Wake Up, or button to wake up , timer to sleep , etc…
If it had been working, but now is not? Does the onboard charger actually work?
This is not the only board sharing the same software, but only this board shows the issue. The battery (lipo 3.7v) is charged applying 5v directly to the 5v pin, the usb is hidden inside the case.
To prevent reverse voltage, a schottky diode is used, 0.25v measured.
Everything is working fine, the battery is charging, the led lights on,the cpu wake up on imu motion and so on.
Usually I wake up the board before charging, but this is not a must, always worked as well.
The only”different” thing is that this xiao have been removed from another board and reflowed on a new one, which could partially explain the problem.
The strangest thing is that most of the times the board wakes up when charged via usb, but never if applying +5v to the pin.
Even removing the schottky diode doesn’t change the result, the usb works and the 5v pin not.
When the cpu doesn’t wake up , the imu will not work any more and only a reset can restore the board.