тест zero cross detected

This commit is contained in:
Razvalyaev 2025-05-16 08:23:01 +03:00
parent d7fe7b0ba1
commit f34eb8b900
2 changed files with 14 additions and 13 deletions

@ -1 +1 @@
Subproject commit 08719ffc055e27b3b22a9c37742add86ece43ea4
Subproject commit ea8bdbc185777a1321e8dedcfb76bfeb7f74b94c

View File

@ -10,27 +10,28 @@ void upp_main(void)
upp_phase_routine(&phase_B);
upp_phase_routine(&phase_C);
upp_phase_control(&phase_A);
upp_phase_control(&phase_B);
upp_phase_control(&phase_C);
// upp_phase_control(&phase_A);
// upp_phase_control(&phase_B);
// upp_phase_control(&phase_C);
}
void upp_phase_control(Phase_t *phase)
{
if(is_zero_cross(&phase->zc_detector))
{
tiristor_start_angle_delay(&phase->ctrl);
if (phase->ctrl.f.TiristorIsEnable)
tiristor_disable(&phase->ctrl);
}
tiristor_angle_control(&phase->ctrl);
tiristor_control(&phase->ctrl);
}
void upp_phase_routine(Phase_t *phase)
{
tiristor_angle_control(&phase->ctrl);
tiristor_control(&phase->ctrl);
zero_cross_update(&phase->zc_detector);
if(is_zero_cross(&phase->zc_detector))
{
phase->ctrl.gpiox->ODR ^= phase->ctrl.gpio_pin;
// tiristor_start_angle_delay(&phase->ctrl);
// if (phase->ctrl.f.TiristorIsEnable)
// tiristor_disable(&phase->ctrl);
}
}
void upp_init(void)