www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - Hardware API


hal_init_timer_ext

Initialize timer settings Extended

void hal_init_timer_ext ( unsigned char timer,
                          unsigned short mode );

Parameters

timer

Timer
    0=Timer0 / 1=Timer1

mode

Timer mode:
    Bit 0..2: must be 0
    Bit 3: 0=disable prescale t2 / 1=enable prescale t2
    Bit 4: 0=disable retrigger / 1=enable retrigger
    Bit 5..15: must be 0

Return Value

-- none --.

Comments

This function must be called after the Initialize Timer Settings hal_init_timer function call!

The mode control bits have the following affect:

Prescale T2:    If the Prescale feature is enabled, the timer (specified by argument timer) will use the Timer2 output for its time base.   If the RTI rate is not changed by the user it will provide a 1000 Hz timer clock rate.   (Timer2 is used internally by the @CHIP-RTOS as the Real-Time Interrupt (RTI), which defaults to a one millisecond interval timer.)   If the Prescale feature is disabled, then the value returned from the hal_get_frequencies function indicates the timer's time base.


Retrigger:    If the retrigger setting is enabled, then a 0 to 1 edge transition on TMRIN0 or TMRIN1 resets the respective counter to zero.   When retrigger setting is disabled, a High input on TMRIN0 or TMRIN1 enables counting and a Low input holds the current timer value.

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

    SC12SC13SC11SC1x3
    V1.10V1.00V1.00V0.90

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document