Skip to main content
Associate III
May 26, 2025
Solved

Bug MCSDK v6.3.2 - stm32_mc_common_it.c.ftl failed to generate SPD_TIM_M1_IRQHandler

  • May 26, 2025
  • 1 reply
  • 361 views

Code generation failed to generate 

void SPD_TIM_M1_IRQHandler(void);

Because the comment section was not closed off with "-->"

 

Line 171 in stm32_mc_common_it.c.ftl: 

<#else> <#--CondFamily_STM32F0 || CondFamily_STM32F4 || CondFamily_STM32F7 || CondFamily_STM32F3 || CondFamily_STM32G4 || CondFamily_STM32H5 || CondFamily_STM32H7 || CondFamily_STM32L4>
 <#if (M1_ENCODER == true) >
void SPD_TIM_M1_IRQHandler(void);

 Needs to be: 

<#else> <#--CondFamily_STM32F0 || CondFamily_STM32F4 || CondFamily_STM32F7 || CondFamily_STM32F3 || CondFamily_STM32G4 || CondFamily_STM32H5 || CondFamily_STM32H7 || CondFamily_STM32L4 -->
 <#if (M1_ENCODER == true) >
void SPD_TIM_M1_IRQHandler(void);

 
Error is only apparent when both Encoder and Hall sensor are used because of the double function name SPD_TIM_M1_IRQHandler 

Best answer by GMA

Hello @Zeno,

Thank you for your report.
Encoder/Hall speed sensing configuration has not been taken into account as usually Encoder and Hall are connected through the same input pins.
Using Main sensor set to Encoder and Auxiliary sensor set to Hall and renaming 

SPD_TIM_M1_IRQHandler to SPDEnc_TIM_M1_IRQHandler/SPDHall_TIM_M1_IRQHandler according to TIM IP feature connection, it should be ok. 

1 reply

GMA
GMABest answer
Technical Moderator
May 26, 2025

Hello @Zeno,

Thank you for your report.
Encoder/Hall speed sensing configuration has not been taken into account as usually Encoder and Hall are connected through the same input pins.
Using Main sensor set to Encoder and Auxiliary sensor set to Hall and renaming 

SPD_TIM_M1_IRQHandler to SPDEnc_TIM_M1_IRQHandler/SPDHall_TIM_M1_IRQHandler according to TIM IP feature connection, it should be ok. 
If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
ZenoAuthor
Associate III
May 31, 2025

Hi GMA, 

Yea I figured just renaming te function prototypes was fine, thanks!