Increase charge pump frequency to 500 Hz
This change reduces the voltage drop with higher loads, for example if both the solar and the load switch are on at the same time.
This commit is contained in:
parent
3e8ebbe201
commit
0982f8d7c9
|
@ -32,7 +32,7 @@ void charge_pump_init(void)
|
||||||
timer_set_prescaler(TIM1, 48 - 1); // Timer runs at 1 MHz
|
timer_set_prescaler(TIM1, 48 - 1); // Timer runs at 1 MHz
|
||||||
|
|
||||||
// auto-reload value
|
// auto-reload value
|
||||||
timer_set_period(TIM1, 10000 - 1); // overflow every 10000 cycles = 100 Hz
|
timer_set_period(TIM1, 2000 - 1); // overflow every 2000 cycles = 500 Hz
|
||||||
|
|
||||||
// output compare value
|
// output compare value
|
||||||
timer_set_oc_value(TIM1, TIM_OC1, 100); // High for 100 cycles = 100 μs
|
timer_set_oc_value(TIM1, TIM_OC1, 100); // High for 100 cycles = 100 μs
|
||||||
|
|
Loading…
Reference in a new issue