|
|
|
@ -51,7 +51,7 @@ void IOClass::InitMotors() {
@@ -51,7 +51,7 @@ void IOClass::InitMotors() {
|
|
|
|
|
ERROR_CHECK(mcpwm_gpio_init(MCPWM_UNIT, MCPWM1A, MOTOR_RIGHT_PWM)); |
|
|
|
|
|
|
|
|
|
mcpwm_config_t mcpwm_config; |
|
|
|
|
mcpwm_config.frequency = 10000; // 20khz
|
|
|
|
|
mcpwm_config.frequency = 20000; // 20khz
|
|
|
|
|
mcpwm_config.cmpr_a = 0; |
|
|
|
|
mcpwm_config.cmpr_b = 0; |
|
|
|
|
mcpwm_config.counter_mode = MCPWM_UP_DOWN_COUNTER; // for symmetric pwm
|
|
|
|
|