Learning; Other Considerations; Timer 1 Interrupts; Timer 1 Dma Triggers - Texas Instruments CC253x User Manual

System-on-chip for 2.4ghz
Table of Contents

Advertisement

www.ti.com

9.9.4 Learning

Learning is done by using the capture function of Timer 1 (16-bit) and Timer 3 (8-bit). Timer 3 can handle
the carrier frequency detection and Timer 1 can handle the code learning from the demodulated signal.
The circuit could be set up as described in
9.9.4.1
Carrier Frequency Detection
Timer 3 is used to capture and detect the carrier frequency with input directly from the IR PIN diode. The
timer should sample the carrier a limited number of times. If a carrier is detected, the frequency detected
should contribute to the average number, which is what can be stored in the database.
9.9.4.2
Demodulated Code Learning
The output from the IR PIN diode is demodulated by an appropriate circuit. The output from this circuit is
used as input to one of the Timer 1 channels in capture mode.

9.9.5 Other Considerations

The IR output pin should be placed in the high-impedance state or pulled down during reset to avoid
unnecessary power consumption from illuminating the IR LED. Note that only the P1.1 output for Timer 1
channel 1 is placed in the high-impedance state with no pullup during and after reset.

9.10 Timer 1 Interrupts

One interrupt vector is assigned to the timer. An interrupt request is generated when one of the following
timer events occurs:
Counter reaches terminal count value (overflow, or turns around zero).
Input capture event
Output compare event
The status register, T1STAT, contains the source interrupt flags for the terminal-count value event and the
five channel compare or capture events. A source interrupt flag is set when the corresponding event
occurs, regardless of interrupt mask bits. The CPU interrupt flag IRCON.T1IF is set when one of the
events occurs if the corresponding interrupt mask bit is equal to 1. The interrupt mask bits are
T1CCTLn.IM for the five channels and TIMIF.T1OVFIM for the overflow event. The CPU interrupt flag
IRCON.T1IF is also set when a Timer 1 source interrupt flag is being cleared and one or more other
Timer 1 source interrupt flags are still set while the corresponding interrupt mask bit is set. An interrupt
request is generated when IRCON.T1IF goes from 0 to 1 if IEN1.T1IEN and IEN0.EA are both equal to
1.

9.11 Timer 1 DMA Triggers

There are three DMA triggers associated with Timer 1. These are DMA triggers T1_CH0, T1_CH1, and
T1_CH2, which are generated on timer compare events as follows:
T1_CH0 – Channel 0 compare
T1_CH1 – Channel 1 compare
T1_CH2 – Channel 2 compare
SWRU191F – April 2009 – Revised April 2014
Submit Documentation Feedback
Figure 9-9
IR
Demod
PIN
Diode
Figure 9-9. IR Learning Board Diagram
Copyright © 2009–2014, Texas Instruments Incorporated
IR Signal Generation and Learning
Timer 1 Ch 2
CC253x
CC2540
CC2541
Timer 3 Ch 1
B0359-01
113
Timer 1 (16-Bit Timer)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents