Chapter 22
SWRU191C–April 2009– Revised January 2012
Timer 2 (MAC Timer)
Timer 2 is mainly used to provide timing for 802.15.4 CSMA-CA algorithms and for general timekeeping in
the 802.15.4 MAC layer on CC253x devices, for timekeeping in the BLE link layer on CC2540/41, and for
general radio timekeeping when running the radio in proprietary mode on CC2541. Timer 2 must not be
used by the application on the CC2540/41 when the BLE stack is running. When Timer 2 is used together
with the Sleep Timer, the timing function is provided even when the system enters low-power modes PM1
and PM2. The timer runs at a speed according to the system clock. If Timer 2 is to be used with the Sleep
Timer, the system clock source must be the 32-MHz crystal whenever Timer 2 is running, and an external
32-kHz XOSC should be used for accurate results.
The main features of Timer 2 are the following:
• 16-bit timer up-counter providing, for example, a symbol/frame period of 16 μs/320 μs
• Adjustable period with accuracy of 31.25 ns
• 2 × 16-bit timer compare function
• 24-bit overflow count
• 2 × 24-bit overflow compare function
• Start-of-frame-delimiter capture function
• Timer start/stop synchronous with 32-kHz clock and timekeeping maintained by Sleep Timer.
• Interrupts generated on compare and overflow
• DMA trigger capability
• Possible to adjust timer value while counting by introducing delay
Topic ........................................................................................................................... Page
22.1 Timer Operation .............................................................................................. 208
22.2 Interrupts ........................................................................................................ 209
22.3 Event Outputs (DMA Trigger and Radio Events) .................................................. 210
22.4 Timer Start/Stop Synchronization ...................................................................... 210
22.5 Timer 2 Registers ............................................................................................ 212
207
SWRU191C–April 2009–Revised January 2012 Timer 2 (MAC Timer)
Submit Documentation Feedback
Copyright © 2009–2012, Texas Instruments Incorporated