Part Number: MCU-PLUS-SDK-AM243X
Tool/software:
Hi Ti,
we are using AM243x for motor control. I'm here to ask if the AM243x supports PWM mode switching dynamicly? Here is the aim we want to achieve:
Normal operation:
- PWM is complementary with deadband
- When a brake request is received, we switch to the braking mode.
In the braking mode:
- Set the upper - bridge PWM output to be constantly OFF.
- The lower - bridge continues with PWM, and the duty cycle is controlled (soft braking).
- When the stop condition is met, we return to the normal control mode or keep all three LOW bridges are constantly on.
we tried seveal ways, but cannot brake the complementary characristic of PWM effectively.
Here is an example provided by Dong Kangjia, Ti support China. But we are now sure if this way is safe or the best way:
switch(state) {
case STATE_RUNNING:
EPWM_enableDeadBand(...);
// 上下桥互补输出
break;
case STATE_ENTER_BRAKE:
// 第一步:强制关闭上桥
EPWM_setActionQualifierAction(..., A, LOW);
// 等待 2 周期
wait_n_cycles(2);
// 第二步:禁用 Dead - Band
EPWM_disableDeadBand(...);
// 第三步:配置下桥 PWM
EPWM_setAQAction(..., B, PWM);
state = STATE_BRAKING;
break;
case STATE_BRAKING:
update_pwm_duty(brakeDuty);
break;
}
