cancel
Showing results for 
Search instead for 
Did you mean: 

Assert error in STM32CubeL1: Need check definition of IS_TIM_MASTER_INSTANCE macro

Shilin
Associate

I get some bug. I use mcu stm32l152ve. Version 1.9.0. After update i got some errors.

When i init, timer 6, 7, i got assert error in

assert_param(IS_TIM_SYNCHRO_INSTANCE(htim->Instance));

because

#define IS_TIM_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM2)  || \
                                          ((INSTANCE) == TIM3)  || \
                                          ((INSTANCE) == TIM4)  || \
                                          ((INSTANCE) == TIM5)  || \
                                          ((INSTANCE) == TIM9))
 
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE)  IS_TIM_MASTER_INSTANCE(INSTANCE)

In previous versions was

#define IS_TIM_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM2)  || \
                                          ((INSTANCE) == TIM3)  || \
                                          ((INSTANCE) == TIM4)  || \
                                          ((INSTANCE) == TIM5)  || \
                                          ((INSTANCE) == TIM6)  || \
                                          ((INSTANCE) == TIM7)  || \
                                          ((INSTANCE) == TIM9))

it work perfect

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello,

Yes I confirm that TIM6 and TIM7 must be added to the IS_TIM_MASTER_INSTANCE macro.

I raised this internally for correction.

Thank your for highlighting this issue.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

4 REPLIES 4
Khouloud ZEMMELI
ST Employee

​Hello @Shilin​ 

Could you please share your ioc file?

Thanks,

Khouloud

Shilin
Associate

No problem.

Khouloud ZEMMELI
ST Employee

​Seems not a cubeMX Issue,

@Imen DAHMEN​  Could you please check it ?

Thanks,

Khouloud

Imen.D
ST Employee

Hello,

Yes I confirm that TIM6 and TIM7 must be added to the IS_TIM_MASTER_INSTANCE macro.

I raised this internally for correction.

Thank your for highlighting this issue.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen