Skip to content

Commit e235d70

Browse files
Merge pull request #474 from adamgerhant/master
Disable allow power down when creating MCPWM timer
2 parents 0bb487a + a03b493 commit e235d70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/drivers/hardware_specific/esp32/esp32_driver_mcpwm.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ void* _configure6PWMPinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no,
282282
pwm_config.count_mode = MCPWM_TIMER_COUNT_MODE_UP_DOWN;
283283
pwm_config.intr_priority = 0;
284284
pwm_config.period_ticks = _calcPWMPeriod(pwm_frequency);
285+
pwm_config.flags.allow_pd = 0;
285286

286287
CHECK_ERR(mcpwm_new_timer(&pwm_config, &timers[mcpwm_group][timer_no]), "Could not initialize the timer in group: " + String(mcpwm_group));
287288
pwm_periods[mcpwm_group][timer_no] = pwm_config.period_ticks / 2;
@@ -410,6 +411,7 @@ void* _configurePinsMCPWM(long pwm_frequency, int mcpwm_group, int timer_no, int
410411
pwm_config.count_mode = MCPWM_TIMER_COUNT_MODE_UP_DOWN;
411412
pwm_config.intr_priority = 0;
412413
pwm_config.period_ticks = _calcPWMPeriod(pwm_frequency);
414+
pwm_config.flags.allow_pd = 0;
413415
// initialise the timer
414416
CHECK_ERR(mcpwm_new_timer(&pwm_config, &timers[mcpwm_group][timer_no]), "Could not initialize the timer in group: " + String(mcpwm_group));
415417
// save variables for later

0 commit comments

Comments
 (0)