diff --git a/zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c b/zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c index f0e18874764517645aa1c5a92d92f126be9f29d9..18bddbf8428323cac2348338c4853b6053646b22 100644 --- a/zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c +++ b/zephyr/modules/owntech_hrtim_driver/zephyr/src/hrtim_common.c @@ -23,6 +23,7 @@ * @author Clément Foucher <clement.foucher@laas.fr> * @author Luiz Villa <luiz.villa@laas.fr> * @author Ayoub Farah Hassan <ayoub.farah-hassan@laas.fr> + * @author Thomas Walter <thomas.walter@laas.fr> */ #include <stm32_ll_hrtim.h> @@ -60,16 +61,16 @@ void _hrtim_init_events_center_aligned(hrtim_tu_t leg1_tu, hrtim_tu_t leg2_tu) LL_HRTIM_TIM_SetADCRollOverMode(HRTIM1, LL_HRTIM_TIMER_B, LL_HRTIM_ROLLOVER_MODE_PER); // setting adc trigger - hrtim_adc_trigger_en(1, 1, LL_HRTIM_ADCTRIG_SRC13_TIMAPER); - hrtim_adc_trigger_en(3, 2, LL_HRTIM_ADCTRIG_SRC13_TIMBPER); + 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){ // setting the adc roll-over mode on period event LL_HRTIM_TIM_SetADCRollOverMode(HRTIM1, LL_HRTIM_TIMER_A, LL_HRTIM_ROLLOVER_MODE_PER); LL_HRTIM_TIM_SetADCRollOverMode(HRTIM1, LL_HRTIM_TIMER_C, LL_HRTIM_ROLLOVER_MODE_PER); // setting adc trigger - hrtim_adc_trigger_en(3, 1, LL_HRTIM_ADCTRIG_SRC13_TIMAPER); - hrtim_adc_trigger_en(1, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCPER); + hrtim_adc_trigger_en(3, 1, LL_HRTIM_ADCTRIG_SRC13_TIMACMP3); + hrtim_adc_trigger_en(1, 3, LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4); } }