Timers

This section is aimed to provide users an overview on available timers, timer usage and availability across various power states.

Table 6. Timer Overview

Timer

Availability in Power Mode

Resolution

General Purpose Timer

Available in Active mode and Idle mode

(1/48)MHz

Watchdog Timer

Available in Active mode, Idle mode and Standby mode.

System Timer

Available in Active mode, Idle mode.

1us or 250ns

Real-Time Clock

Available in Active mode, Idle mode and Standby mode.

8us

Clock DPL

Available in Active mode, Idle mode and Standby mode.

1us

FreeRTOS Timer

Available in Active mode, Idle mode.

10ms

Hardware Timer

There are 4 HW timers available for the application to use.

General Purpose Timer (LGPT)

The General Purpose Timer (LGPT) runs off on High Frequency Clock which is only available in Active or Idle mode. LGPT is often used for high accuracy measurement, timer comparison, DMA triggering, PWM, etc. For more information, please refer to the CC23xx datasheet.

Note

The General Purpose Timer driver is not yet available.

Watchdog Timer

The Watchdog timer is used as a recovery mechanism to regain control. Upon timer expiration, the CC23xx will be reset.

Note

The watchdog Timer driver is not yet available.

Real-Time Clock (RTC)

The RTC is a 2-channel timer (compare channel and capture channel) and runs on the Low Frequency Clock. The compare channel is used by system software to program CC23xx future wake up time before going into Standby mode.

System Timer (SYSTIM)

SYSTIM has 5 channels and 4 channels are reserved by system software and radio operation. There is only one available for the user. SYSTIM is synchronized to RTC in hardware.

To get current device timestamp, users should use ClockP_getSystemTicks() from ClockP Module

Attention

For more Hardware Timer information, please refer to the CC23xx datasheet. In general, it is recommended to use ClockP Module if users want to realize the functionality provided by SYSTIM.

Software Timer

ClockP Module

The ClockP module is developed by Texas Instruments and uses one SYSTIM channel with 1 us resolution and is synchronized with RTC.

ClockP can be used to do the following:

  1. Get current timestamp

  2. Get CPU clock frequency

  3. Periodic timer to trigger periodic task

  4. One shot timer to trigger task

Note

Currently there is no API documentation available for this module. To see the available APIs, please navigate to <SDK_INSTALL_DIR>/source/ti/drivers/dpl/ClockP.h

FreeRTOS Timer

FreeRTOS has its own timer module. For more information, please refer to: FreeRTOS Software Timers