使用MOTOR workbench 5.20 ,生成代码编译不成功。请各位帮助!如下,都是一些变量没有定义。 ../Src/main.c(414): error: #20: identifier "TIM_CLOCK_DIVIDER" is undefined htim1.Init.Prescaler = ((TIM_CLOCK_DIVIDER) - 1); ../Src/main.c(416): error: #20: identifier "PWM_PERIOD_CYCLES" is undefined htim1.Init.Period = ((PWM_PERIOD_CYCLES) / 2); ../Src/main.c(418): error: #20: identifier "REP_COUNTER" is undefined htim1.Init.RepetitionCounter = (REP_COUNTER); ../Src/main.c(467): error: #20: identifier "HTMIN" is undefined sConfigOC.Pulse = (((PWM_PERIOD_CYCLES) / 2) - (HTMIN)); ../Src/main.c(476): error: #20: identifier "DEAD_TIME_COUNTS" is undefined sBreakDeadTimeConfig.DeadTime = ((DEAD_TIME_COUNTS) / 2); ../Src/main.c: 1 warning, 5 errors "../Src/main.c" - 5 Error(s), 1 Warning(s). |
我今天也是遇到这问题,不知道怎么办。
换了个系统~~~
我也遇到了,你的解决了吗?
只能换系统吗?
keil workbech cubeMX的版本要匹配