Download I SCIOPTA - Real
Transcript
3 System Calls Reference
3.74
sc_tick
3.74.1
Description
This function calls directly the kernel tick function and advances the kernel tick counter by 1.
SCIOPTA - Real-Time Kernel
The kernel maintains a counter to control the timing functions. The timer needs to be incremented in regular intervals.
If the processor contains an on-chip timer the kernel uses it by default. The on-chip timer is set-up by the kernel
automatically at start-up and all parameters are defined in the SCIOPTA configuration utility. In this case the user
does not need to call sc_tick.
If the processor does not have an on-chip timer or the user does not want to use it, sc_tick must be called explicitly
by the user from within an user interrupt process. The user is responsible to write the user interrupt process and to
setup the timer chip to define the requested tick interval.
This system call is only allowed in hardware activated interrupt processes and is not allowed to be used in interrupt
processes which have been activated by trigger, message sent, process creation and killing.
3.74.2
Syntax
void sc_tick (void);
3.74.3
Parameter
None.
3.74.4
Return Value
None.
3.74.5
Example
SC_INT_PROCESS(sysTick,src)
{
if ( src == 0 ){
sc_tick();
/* Handle timer irq */
}
}
3.74.6
Errors
None
SCIOPTA - Real-Time Kernel
Reference Manual Manual Version 4.1
3-115