@@ -306,6 +306,7 @@ void* _configure6PWMPinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no,
306
306
SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_operators) + " comparators." );
307
307
// Create and configure comparators
308
308
mcpwm_comparator_config_t comparator_config = {0 };
309
+ comparator_config.flags .update_cmp_on_tez = true ;
309
310
for (int i = 0 ; i < no_operators; i++) {
310
311
CHECK_ERR (mcpwm_new_comparator (params->oper [i], &comparator_config, ¶ms->comparator [i])," Could not create comparator: " + String (i));
311
312
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,
319
320
SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_pins) + " comparators." );
320
321
// Create and configure comparators
321
322
mcpwm_comparator_config_t comparator_config = {0 };
323
+ comparator_config.flags .update_cmp_on_tez = true ;
322
324
for (int i = 0 ; i < no_pins; i++) {
323
325
int oper_index = (int )floor (i / 2 );
324
326
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
452
454
SIMPLEFOC_ESP32_DRV_DEBUG (" Configuring " + String (no_pins) + " comparators." );
453
455
// Create and configure comparators
454
456
mcpwm_comparator_config_t comparator_config = {0 };
457
+ comparator_config.flags .update_cmp_on_tez = true ;
455
458
for (int i = 0 ; i < no_pins; i++) {
456
459
int oper_index = shared_timer ? (int )floor ((i + 1 ) / 2 ) : (int )floor (i / 2 );
457
460
CHECK_ERR (mcpwm_new_comparator (params->oper [oper_index], &comparator_config, ¶ms->comparator [i])," Could not create comparator: " + String (i));
0 commit comments