Modem Timer Information
MC1321x Reference Manual, Rev. 1.6
Freescale Semiconductor
6-5
NOTE
It is important to realize that not all bits of the timer compare value are
updated simultaneously within the SPI. To prevent the Event Timer from
generating a false match to a partially updated timer compare value, the
compare hardware is inhibited temporarily. The inhibit feature initiates
when the address of the MSB location of the timer compare field is decoded
on a SPI write, and ends when a write to the LSB field is completed. Thus,
once an SPI write to the MSB location starts, the comparator is disabled
until an SPI write to the LSB location is completed. The preferred procedure
for software to change a timer compare value within the MC1321x is to
perform a 2-word recursive write of the timer compare field starting at the
MSB address.
6.7
Intended Event Timer Usage
It is intended that the system utilize the “current time” value and the timer compare functions of the Event
Timer to schedule system events, including:
•
Generating time-based interrupts
•
Exiting Doze Mode
•
Triggering transceiver operations
NOTE
•
The timer_compare functions exit reset with the timer function enabled
but with the interrupts masked off. Users should disable all timers and
clear the IRQ_Status Register via a read as part of system initialization
after reset.
•
Due to a device anomaly, the tmr_cmp3[23:0] is always running and
doing a comparison with the “current time”
. This only causes a
problem if the MC1321x is in receive mode and has not yet started to
receive a packet. In this situation, the RX will be aborted without any
status being set. This may be dealt with in several ways:
– Never let the timer counter reach the compare value in Comp 3 register.
– Enable tmr_cmp3[23:0] always (normal mode) and enable the interrupt. If the Tmr_cmp3
interrupt occurs and the RX state was enabled; restart the RX mode as required.
– The “out-of-idle” status output can be used to detect the condition where the device is
expected to be in RX mode, and the RX has been aborted without the status being set.
6.7.1
Generating Time-Based Interrupts
Generating time-based interrupts is accomplished by setting timer compare values relative to the “current
time”, allowing the Event Timer counter to increment until a timer compare match is generated, and using
this match to generate an interrupt to the host. The general procedure is as follows:
1. Disable the timer compare. This clears the status flag if already set.
Summary of Contents for freescale semiconductor MC13211
Page 40: ...MC1321x Pins and Connections MC1321x Reference Manual Rev 1 6 2 6 Freescale Semiconductor...
Page 166: ...Modem Modes of Operation MC1321x Reference Manual Rev 1 6 7 22 Freescale Semiconductor...
Page 172: ...Modem Interrupt Description MC1321x Reference Manual Rev 1 6 8 6 Freescale Semiconductor...
Page 186: ...MCU Modes of Operation MC1321x Reference Manual Rev 1 6 10 8 Freescale Semiconductor...
Page 208: ...MCU Memory MC1321x Reference Manual Rev 1 6 11 22 Freescale Semiconductor...
Page 244: ...MCU Parallel Input Output MC1321x Reference Manual Rev 1 6 13 20 Freescale Semiconductor...
Page 288: ...MCU Central Processor Unit CPU MC1321x Reference Manual Rev 1 6 15 20 Freescale Semiconductor...
Page 308: ...MCU Timer PWM TPM Module MC1321x Reference Manual Rev 1 6 17 16 Freescale Semiconductor...
Page 338: ...Inter Integrated Circuit IIC MC1321x Reference Manual Rev 1 6 19 14 Freescale Semiconductor...
Page 372: ...Development Support MC1321x Reference Manual Rev 1 6 21 20 Freescale Semiconductor...