fixed modulation and ADC clocks initial phase to 0. (by TIM->CNT=0)
This commit is contained in:
@ -421,6 +421,8 @@ int main(void)
|
||||
uint16_t trigger_counter = 0;
|
||||
uint16_t trigger_step = (uint8_t )((task.max_param - task.current_param)/task.delta_param * 10);
|
||||
uint16_t task_sheduler = 0;
|
||||
TIM11 -> CNT = 0;
|
||||
TIM4 -> CNT = 0;
|
||||
HAL_TIM_PWM_Start(&htim11, TIM_CHANNEL_1); //start modulating by Mach-Zander modulator
|
||||
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_3); //start modulating by Mach-Zander modulator
|
||||
while (task.current_param < task.max_param)
|
||||
@ -428,8 +430,8 @@ int main(void)
|
||||
if (TIM10_coflag)
|
||||
{
|
||||
Set_LTEC(TT_CHANGE_CURR_1, task.current_param);
|
||||
TIM11 -> CNT = 0; // to link modulator phase
|
||||
TIM4 -> CNT = 0; // to link ADC clock phase
|
||||
//TIM11 -> CNT = 0; // to link modulator phase
|
||||
//TIM4 -> CNT = 0; // to link ADC clock phase
|
||||
task.current_param += task.delta_param;
|
||||
TO10 = 0;
|
||||
TIM10_coflag = 0;
|
||||
|
||||
Reference in New Issue
Block a user