Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHow to use timer defined by OSTmrCreate ?
Hi all,
I would like to use timer with MicroC/OS-II. I have already enabled it by setting to 1 OS_TMR_EN . The functions OSTmrCreate and OSTmrStart return no error. But the timer never elapse and the associated callback is never called. Is there any other flag to set for using timer functionnality in MicroC/OS-II ? How to set a timer ? I have not foung any tutorials about that. Thanks for your answer. Patrice1 Reply
- Altera_Forum
Honored Contributor
Hello,
In v2.86, it seems that with uCOSII, you need to call yourself the function OSTmrSignal() as : - It post the OSTmrSemSignal semaphore which is the condition to execute the OSTmr_Task() task. - No other kernel function post the OSTmrSemSignal semaphore You can check that in the \altera\91\nios2eds\components\micrium_uc_osii\UCOSII\src\os_tmr.c file As far as i've seen, the uCOSII documentation seems a bit weak for this part. However It is quite new feature as it as been introduced in V2.81 in think. Maybe it was too early ;)