bugfix: transient glitch with turning vbat_c on during startup

tatry_variant
Mateusz Lubecki 2022-11-06 12:50:10 +01:00
rodzic d1ce25f0eb
commit 88fd2987cb
2 zmienionych plików z 12 dodań i 7 usunięć

Wyświetl plik

@ -227,6 +227,10 @@ void io_pwr_init(void) {
GPIO_InitTypeDef.Alternate = LL_GPIO_AF_7;
LL_GPIO_Init(GPIOB, &GPIO_InitTypeDef);
io___cntrl_vbat_r_disable();
io___cntrl_vbat_g_disable();
io___cntrl_vbat_c_disable();
io___cntrl_vbat_s_disable();
#endif
}

Wyświetl plik

@ -560,6 +560,14 @@ int main(int argc, char* argv[]){
// call periodic handle to wait for 1 second and then switch on voltage
wx_pwr_switch_periodic_handle();
#if defined(PARAMETEO)
// swtich power to M4. turn on sensors but keep GSM modem turned off
pwr_save_switch_mode_to_c1();
delay_fixed(300);
#endif
// waiting for 1 second to count number of ticks when the CPU is idle
main_idle_cpu_ticks = delay_fixed_with_count(1000);
@ -580,13 +588,6 @@ int main(int argc, char* argv[]){
main_target_kiss_baudrate = 9600u;
#if defined(PARAMETEO)
// swtich power to M4. turn on sensors but keep GSM modem turned off
pwr_save_switch_mode_to_c1();
#endif
#ifndef PARAMETEO
// if Victron VE-direct protocol is enabled set the baudrate to the 19200u
if (main_config_data_mode->victron == 1) {