@CHIP-RTOS C Library V2.06 - RTOS API
RTX_FineTickInit
Initialize data required by
the RTX_GetFineTick
and RTX_GetTick_us
API. void RTX_FineTickInit (void); Return Value
- -- none --
Comments
- This function is implicitly called by the
RTX_GetFineTick
and RTX_GetTick_us
API if it has not already been called explicitly by the
user.
Interrupts are enabled within the @Chip-RTOS API
call made here. Consequently, it may be advisable
to call this function from your application program's initialization
area to avoid this action during your real-time operation.
After a single call here, this one-shot function performs no
operation on subsequent calls since its job is already done.
Some global constants are initialized by this API.
This data is used internally by the other
C-library functions, but may also be of general use to the
application. (The names given these have been preceded
with an underscore to avoid name space conflicts.)
These constants are listed here.
unsigned long far *_pRti_Tick ;
This pointer references the 32 bit Real-Time Interrupt
up counter internal to the @Chip-RTOS. This location
should never be written to from outside the @Chip-RTOS!
Note that for reliable reads, interrupts must be momentarily
masked if both 16 bit halves are sampled.
unsigned int _RTI_kHz ;
The Real-Time Interrupt
rate
in kHz. (For SC1x systems this value will always be 1.)
unsigned int _us_per_RTI ;
Number of microseconds per Real-Time Interrupt.
(For SC1x systems this value will always be 1000.)
unsigned int _Timer2_Limit ;
Hardware TIMER2 ticks per Real-Time Interrupt.
unsigned int _Timer2Tick_per_us ;
Number of hardware TIMER2 ticks per microsecond.
SC1x3 Comments- For some selected Real-Time Interrupt rates,
the _us_per_RTI and _Timer2Tick_per_us
values computed here will not be accurate. This is the case
for any
RTI
rates which do not divide 1000 an integral number of times,
e.g. 15 kHz. Consequently the
RTX_GetTick_us API
should not be used for such configurations, since the computation
done within that API relies on the accuracy of these constants.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.20 | V1.20 | V1.20 | V1.05 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|