cancel
Showing results for 
Search instead for 
Did you mean: 

Timer issue

ST MICROCONTOLLER
Associate II
Posted on December 16, 2016 at 07:11

In a timer code, I am facing number of 'missing prototype' errors in the included tim1.c file. Each of the error marks the line starting from 'assert param' ..... in tim1.c file. Do I have to change anything in conf.h file? Kindly help me.

4 REPLIES 4
Seb
ST Employee
Posted on December 16, 2016 at 09:00

If compiler fails on a C file, select the function name and run 'find in file' (if STVD, press SHIFT+CTRL+F, you'll use it quite a lot). It will show where the function is declared (.h) and make sure that this header file is included correctly.

You can file in file the corresponding .h file to make sure the right #include is activated, and visible in the project.

All compiler and linkers do more of less the same thing, when things don't compile or link, you'll have to hunt for the project settings and configuration, which is compiler dependent. Good luck!

ST MICROCONTOLLER
Associate II
Posted on December 16, 2016 at 09:17

Ok. I think you are talking about tim.c and tim1.h files. I have included the files in the folders src and inc respectively in  stm8s_StdPeriph_Driver, which is in my project folder. I have selected the controller in stm8s.h file. Is there something that is missed?

ST MICROCONTOLLER
Associate II
Posted on December 16, 2016 at 14:28

I have set the project path as C:\Program Files (x86)\STMicroelectronics\st_toolset\stvd\Project name. Also, for the same code, if I create new project, another error '

symbol_assert_failed

' appears. Do I have to add anything like '#ifdef USE_FULL_ASSERT' or so in my code? Any help would be appreciated.

ST MICROCONTOLLER
Associate II
Posted on December 18, 2016 at 04:51

Can anybody help in setting the timer value. If I have a variable that is incremented according to timer value, how can it be written in code? Is there any facility to see the timer value in watch window?

Thanks.