Skip to content
Snippets Groups Projects
Commit 76fc051d authored by Luiz Fernando Lavado Villa's avatar Luiz Fernando Lavado Villa :speech_balloon:
Browse files

There is an inversion in the triggering of adc conversion events. This patch corrects it.

The ADC must be triggered by the HRTIM to make a conversion.
ADC1 converts the data from leg 1 and ADC2 converts data from leg 2.
ADC1 uses event 1 to trigger and ADC2 uses event 3.
This patch links event 1 to HRTIMA (leg1) and event 3 to HRTIM C (leg 2).
This connection was previously inverted.
parent ecf6ec31
No related branches found
No related tags found
1 merge request!45There is an inversion in the triggering of adc conversion events. This patch corrects it.
......@@ -38,8 +38,8 @@ void _hrtim_init_events(hrtim_tu_t leg1_tu, hrtim_tu_t leg2_tu)
hrtim_adc_trigger_en(1, 1, LL_HRTIM_ADCTRIG_SRC13_TIMACMP3);
hrtim_adc_trigger_en(3, 2, LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4);
}else if(leg1_tu == TIMA && leg2_tu == TIMC){
hrtim_adc_trigger_en(1, 1, LL_HRTIM_ADCTRIG_SRC13_TIMACMP3);
hrtim_adc_trigger_en(3, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4);
hrtim_adc_trigger_en(3, 1, LL_HRTIM_ADCTRIG_SRC13_TIMACMP3);
hrtim_adc_trigger_en(1, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4);
}
hrtim_update_adc_trig_interleaved(1, leg1_tu, leg2_tu);
......@@ -61,8 +61,8 @@ void _hrtim_init_events_center_aligned(hrtim_tu_t leg1_tu, hrtim_tu_t leg2_tu)
LL_HRTIM_TIM_SetADCRollOverMode(HRTIM1, LL_HRTIM_TIMER_C, LL_HRTIM_ROLLOVER_MODE_PER);
// setting adc trigger
hrtim_adc_trigger_en(1, 1, LL_HRTIM_ADCTRIG_SRC13_TIMAPER);
hrtim_adc_trigger_en(3, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCPER);
hrtim_adc_trigger_en(3, 1, LL_HRTIM_ADCTRIG_SRC13_TIMAPER);
hrtim_adc_trigger_en(1, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCPER);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment