2022-01-05 03:56 AM
If i don't put #define on the variables "linked" to Tim2_Ticks, it make me an error like:"inizializer element is not constant". On web i serch this error but i didn't solve. In this page (https://stackoverflow.com/questions/30158010/initializer-element-not-constant) anyone have same problem but i have same gcc compiler by the way didn't works.
Any idea for solve this problem?
Best Regards, Antonio S.
Solved! Go to Solution.
2022-01-05 07:30 AM
This is because you use the variable F_SIGNAL in the initializer of TIM2_Ticks. There is no error if you replace F_SIGNAL by 100.
The compiler set the cursor on the 1st element of the initializer formula, and wrongly point to TIM2CLK.
You must use only constants known at compile time in an initialiser.
2022-01-05 07:30 AM
This is because you use the variable F_SIGNAL in the initializer of TIM2_Ticks. There is no error if you replace F_SIGNAL by 100.
The compiler set the cursor on the 1st element of the initializer formula, and wrongly point to TIM2CLK.
You must use only constants known at compile time in an initialiser.