Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12692 Discussions

How to use timer defined by OSTmrCreate ?

Altera_Forum
Honored Contributor II
1,514 Views

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. 

 

Patrice
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
796 Views

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 ;)
0 Kudos
Reply