Faster load short circuit protection via LPTIM
The PWM charge controllers don't have a fuse and need a reliable load short circuit protection implemented in the microcontroller. The comparator monitoring the load current now triggers LPTIM connected to the load disable pin. This allows to switch off the load with a defined time delay and glitch filter. During tests, switching off the load in an ISR triggered by COMP2 did not lead to reliable delays (especially in case of wake-up from sleep), hence this alternative solution using LPTIM was implemented. The load switch functions were moved from hardware.cpp to load.cpp.
This commit is contained in:
+1
-9
@@ -20,17 +20,9 @@
|
||||
/** @file
|
||||
*
|
||||
* @brief
|
||||
* Hardware-specific functions like timers, output switches, bootloader
|
||||
* Hardware-specific functions like timers, watchdog, bootloader
|
||||
*/
|
||||
|
||||
/** Enable/disable load switch
|
||||
*/
|
||||
void hw_load_switch(bool enabled);
|
||||
|
||||
/** Enable/disable USB output
|
||||
*/
|
||||
void hw_usb_out(bool enabled);
|
||||
|
||||
/** Initialization of IWDG
|
||||
*
|
||||
* @param timeout Timeout in seconds
|
||||
|
||||
Reference in New Issue
Block a user