тест zero cross detected
This commit is contained in:
parent
d7fe7b0ba1
commit
f34eb8b900
@ -1 +1 @@
|
|||||||
Subproject commit 08719ffc055e27b3b22a9c37742add86ece43ea4
|
Subproject commit ea8bdbc185777a1321e8dedcfb76bfeb7f74b94c
|
@ -10,27 +10,28 @@ void upp_main(void)
|
|||||||
upp_phase_routine(&phase_B);
|
upp_phase_routine(&phase_B);
|
||||||
upp_phase_routine(&phase_C);
|
upp_phase_routine(&phase_C);
|
||||||
|
|
||||||
upp_phase_control(&phase_A);
|
// upp_phase_control(&phase_A);
|
||||||
upp_phase_control(&phase_B);
|
// upp_phase_control(&phase_B);
|
||||||
upp_phase_control(&phase_C);
|
// upp_phase_control(&phase_C);
|
||||||
}
|
}
|
||||||
|
|
||||||
void upp_phase_control(Phase_t *phase)
|
void upp_phase_control(Phase_t *phase)
|
||||||
{
|
{
|
||||||
if(is_zero_cross(&phase->zc_detector))
|
tiristor_angle_control(&phase->ctrl);
|
||||||
{
|
tiristor_control(&phase->ctrl);
|
||||||
tiristor_start_angle_delay(&phase->ctrl);
|
|
||||||
|
|
||||||
if (phase->ctrl.f.TiristorIsEnable)
|
|
||||||
tiristor_disable(&phase->ctrl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void upp_phase_routine(Phase_t *phase)
|
void upp_phase_routine(Phase_t *phase)
|
||||||
{
|
{
|
||||||
tiristor_angle_control(&phase->ctrl);
|
|
||||||
tiristor_control(&phase->ctrl);
|
|
||||||
zero_cross_update(&phase->zc_detector);
|
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)
|
void upp_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user