The types of timers supported by the TLSR8258 are as follows:
The TLSR8258F512 also supports a System Timer. System Timer clock is derived from 24M cystal oscillator via a 2/3 frequency divider. The clock frequency is fixed as 16Mhz. The relative APIs refer to APIs list
The TLSR8258F512 supports three timers: Timer0 ~ Timer2. The three timers all support four modes. The clock source of all three timers is System Clock.
Since these modes are relatively simple, we provide examples to make it easy for users to use directly.
Programmable watchdog could reset chip from unexpected hang up or malfunction. But only Timer2 supports Watchdog.
Chip will be reset when the Timer2 Tick matches Watchdog capture. It is noted that Timer2 Tick has 32 bits, but Watchdog Capture has only 14bits.
The TLSR8258F512 also supports a low frequency (32KHz) Timer in suspend mode or deepsleep mode. The clock source of 32K Timer is 32KHz RC Oscillator or 32KHz Crystal Oscillator, which is configurable. This timer can be used as one kind of wakeup source. For more details ...
In order to facilitate users to quickly develop products according to their own needs, TSI provide the following related APIs and examples.
APIs list | Description | Example | Update Date | Status |
---|---|---|---|---|
sleep_us() | delay by microsecond | - | 2019-1-10 | Done |
sleep_ms() | delay by millisecond | - | 2019-1-10 | Done |
clock_time_exceed() | time out by microsecond | - | 2019-1-10 | Done |
clock_time() | get tick value of system timer | - | 2019-1-10 | Done |
timer0_gpio_init() | set the polarity of gpio for GPIO Trigger Mode or GPIO Pulse Width Mode of Timer0 | refer to API-TIMER-CASE2 | 2019-1-10 | Done |
timer1_gpio_init() | set the polarity of gpio for GPIO Trigger Mode or GPIO Pulse Width Mode of Timer1 | refer to API-TIMER-CASE2 | 2019-1-10 | Done |
timer2_gpio_init() | set the polarity of gpio for GPIO Trigger Mode or GPIO Pulse Width Mode of Timer2 | API-TIMER-CASE2 | 2019-1-10 | Done |
timer0_set_mode() | set the mode of Timer0 , the initial tick and the capture tick | refer to API-TIMER-CASE1 | 2019-1-10 | Done |
timer1_set_mode() | set the mode of Timer1 , the initial tick and the capture tick | refer to API-TIMER-CASE1 | 2019-1-10 | Done |
timer2_set_mode() | set the mode of Timer2 , the initial tick and the capture tick | API-TIMER-CASE1 | 2019-1-10 | Done |
timer_start() | get tick value of system timer | API-TIMER-CASE1 | 2019-1-10 | Done |
timer_stop() | get tick value of system timer | - | 2019-1-10 | Done |
APIs related to Watchdog are listed below.
APIs list | Description | Example | Update Date | Status |
---|---|---|---|---|
wd_set_interval_ms() | set the interval of watchdog by millisecond | API-TIMER-CASE5 | 2019-1-10 | Done |
wd_clear() | clear the tick for watchdog | API-TIMER-CASE5 | 2019-1-10 | Done |
wd_start() | start watchdog | API-TIMER-CASE5 | 2019-1-10 | Done |
wd_stop() | stop watchdog | - | 2019-1-10 | Done |
TSI provides the following examples of this module to help users quickly understand and apply related modules.
Examples list | Description | Update Date | Status |
---|---|---|---|
API-TIMER-CASE1 | Timer in system clock Mode | 2019-1-10 | Done |
API-TIMER-CASE2 | Timer in GPIO Trigger Mode | 2019-1-10 | Done |
API-TIMER-CASE3 | Timer in GPIO Pulse Width Mode | 2019-1-10 | Done |
API-TIMER-CASE4 | Timer in Tick Mode | 2019-1-10 | Done |
API-TIMER-CASE5 | watch dog mode | 2019-1-10 | Done |
Date | Description | Author |
---|---|---|
2019-1-10 | initial release | LJW |
2019-8-15 | update api name for application | LJW |