cancel
Showing results for 
Search instead for 
Did you mean: 

Error when compiling an MC WB / cubeMX generated app

pjrebordao
Associate II

When compiling a test app for the B-G431B-ESC1 board, I generated code using the MC Workbench and cube MX for a 6-step control of a BLDC.

If while in the Workbench, I choose to enable the "Electronic Speed Control" option, I get the error below when compiling inside the ST IDE:

 

C:/Users/pjreb/.st_workbench/projects/test_4_6s/MCSDK_v6.3.2-Full/MotorControl/MCSDK/MCLib/Any/Src/esc.c:293: multiple definition of `TIM2_IRQHandler'; ./Application/User/stm32g4xx_mc_it.o:C:/Users/pjreb/.st_workbench/projects/test_4_6s/Src/stm32g4xx_mc_it.c:103: first defined here

 

How can I fix this?

 

Thanks

2 REPLIES 2
GMA
ST Employee

Hello @pjrebordao,

Thank you for your problem report.
Selecting another timer than TIM2 (used by ESC) on Workbench Speed Sensing Config should work

GMA_0-1740651589202.png

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

I changed to TIM3 and it compiled without errors.

However, now I can't get the motor to run. It wiggles back and forth and mostly doesn't respond to commands.

I also noticed this:

pjrebordao_0-1740659292139.png

 

Shouldn't be updated to TIM3 ?