zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.34k stars 6.33k forks source link

stm32: VBAT internal charging #55992

Open coran21 opened 1 year ago

coran21 commented 1 year ago

Is your feature request related to a problem? Please describe. We are using the supercapacitor instead of battery connected to the VBAT input and we need to charge this capacitor when the system is powered on. There is already charging circuit in the hardware (at least in STM32L4) and we are looking for the correct way how to enable and disable this charging circuit and select the internal resistance for charging.

Describe the solution you'd like In STM32Cube is this charging in PWR LL driver, but I'm not sure if there is some VBAT/charging power control in Zephyr. I would also don't mind if the enable/disable charging would be part of the new RTC API as this will be probably used mostly with RTC.

I would appreciate any idea or comments how to implement this into Zephyr correctly.

erwango commented 1 year ago

No plans to implement this on STM32 in short/mid term. Best way to get answers is not to target this to STM32 as the point is to find a proper Zephyr charging API in Zephyr. Removing STM32 tag and I suggest to edit title to remove STM32 in order to widen the audience.