@@ -306,6 +306,7 @@ void* _configure6PWMPinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no,
306306 SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_operators) + " comparators." );
307307 // Create and configure comparators
308308 mcpwm_comparator_config_t comparator_config = {0 };
309+ comparator_config.flags .update_cmp_on_tez = true ;
309310 for (int i = 0 ; i < no_operators; i++) {
310311 CHECK_ERR (mcpwm_new_comparator (params->oper [i], &comparator_config, ¶ms->comparator [i])," Could not create comparator: " + String (i));
311312 CHECK_ERR (mcpwm_comparator_set_compare_value (params->comparator [i], (0 )), " Could not set duty on comparator: " + String (i));
@@ -319,6 +320,7 @@ void* _configure6PWMPinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no,
319320 SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_pins) + " comparators." );
320321 // Create and configure comparators
321322 mcpwm_comparator_config_t comparator_config = {0 };
323+ comparator_config.flags .update_cmp_on_tez = true ;
322324 for (int i = 0 ; i < no_pins; i++) {
323325 int oper_index = (int )floor (i / 2 );
324326 CHECK_ERR (mcpwm_new_comparator (params->oper [oper_index], &comparator_config, ¶ms->comparator [i])," Could not create comparator: " + String (i));
@@ -452,6 +454,7 @@ void* _configurePinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no, int
452454 SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_pins) + " comparators." );
453455 // Create and configure comparators
454456 mcpwm_comparator_config_t comparator_config = {0 };
457+ comparator_config.flags .update_cmp_on_tez = true ;
455458 for (int i = 0 ; i < no_pins; i++) {
456459 int oper_index = shared_timer ? (int )floor ((i + 1 ) / 2 ) : (int )floor (i / 2 );
457460 CHECK_ERR (mcpwm_new_comparator (params->oper [oper_index], &comparator_config, ¶ms->comparator [i])," Could not create comparator: " + String (i));
0 commit comments