Skip to content

Commit c296d73

Browse files
committed
FIX move
1 parent e56b338 commit c296d73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/drivers/hardware_specific/esp32_mcu.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "driver/mcpwm.h"
66
#include "soc/mcpwm_reg.h"
77
#include "soc/mcpwm_struct.h"
8-
#include "wiring_private.h" // pinPeripheral() function
98

109
// empty motor slot
1110
#define _EMPTY_SLOT -20
@@ -320,6 +319,12 @@ void _configureTimerFrequency6PWM(long pwm_frequency, mcpwm_dev_t* mcpwm_num, m
320319
MCPWM0.timer[0].sync.out_sel = 1;
321320
delayMicroseconds(1000);
322321
MCPWM0.timer[0].sync.out_sel = 0;
322+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_0, MCPWM_OPR_A, 50);
323+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_0, MCPWM_OPR_B, 50);
324+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_1, MCPWM_OPR_A, 50);
325+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_1, MCPWM_OPR_B, 50);
326+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_2, MCPWM_OPR_A, 50);
327+
mcpwm_set_duty(MCPWM_UNIT_0, MCPWM_TIMER_2, MCPWM_OPR_B, 50);
323328
}
324329

325330

0 commit comments

Comments
 (0)