error: #20: identifier “TIM_IT_Update“ is undefined

created at 06-20-2022 views: 8

problem

Sometimes, an error will be reported:

..\..\User\stm32f10x_it.c(193): error: #20: identifier "TIM_IT_Update" is undefined

As shown in the figure, in the configured .C file, the variable of the library function is called, but the variable is displayed as undefined

undefined

We look at the .c file and find that the .h header file has been included

.h file

Please add image description

Looking at the .h header file again, it is found that the header file of stm32f10x.h is also included

stm32f10x.h

And also includes the TimBase folder in the included folder

TimeBase

solution

We opened the header file of stm32f10x_conf.h and found that stm32f10x_tim.h was commented out, so the variables defined by library functions could not be found

stm32f10x_conf.h

We can remove the comment

reference

https://blog.csdn.net/EstrangedZ/article/details/125273784

created at:06-20-2022
edited at: 06-20-2022: