![Texas Instruments SimpleLink Ethernet MSP432E401Y Скачать руководство пользователя страница 1261](http://html1.mh-extra.com/html/texas-instruments/simplelink-ethernet-msp432e401y/simplelink-ethernet-msp432e401y_technical-reference-manual_10955781261.webp)
Input Signal
Timer stops,
flags asserted
Timer reload
on next cycle Ignored Ignored
Count
0x000A
0x0006
0x0007
0x0008
0x0009
Functional Description
1261
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
General-Purpose Timers
Figure 18-2. Input Edge-Count Mode Example, Counting Down
18.3.3.4 Input Edge-Time Mode
NOTE:
For rising-edge detection, the input signal must be high for at least two system clock periods
following the rising edge. Similarly, for falling edge detection, the input signal must be low for
at least two system clock periods following the falling edge. Based on this criteria, the
maximum input frequency for edge detection is 1/4 of the system frequency.
In Edge-Time mode, the timer is configured as a 24-bit up- or down-counter including the optional
prescaler with the upper timer value stored in the GPTMTnPR register and the lower bits in the
GPTMTnILR register. In this mode, the timer is initialized to the value loaded in the GPTMTnILR and
GPTMTnPR registers when counting down and 0x0 when counting up. The timer is capable of capturing
three types of events: rising edge, falling edge, or both. The timer is placed into Edge-Time mode by
setting the TnCMR bit in the GPTMTnMR register, and the type of event that the timer captures is
determined by the TnEVENT fields of the GPTMCTL register.
lists the values that are loaded
into the timer registers when the timer is enabled.
Table 18-7. Counter Values When the Timer is Enabled
in Input Event-Count Mode
Register
Count Down Mode
Count Up Mode
TnR
GPTMTnILR
0x0
TnV
GPTMTnILR
0x0
When software writes the TnEN bit in the GPTMCTL register, the timer is enabled for event capture. When
the selected input event is detected, the current timer counter value is captured in the GPTMTnR and
GPTMTnPS register and is available to be read by the microcontroller. The GPTM then asserts the
CnERIS bit in the GPTM Raw Interrupt Status (GPTMRIS) register, and holds it until it is cleared by writing
the GPTM Interrupt Clear (GPTMICR) register. If the capture mode event interrupt is enabled in the GPTM
Interrupt Mask (GPTMIMR) register, the GPTM also sets the CnEMIS bit in the GPTM Masked Interrupt
Status (GPTMMIS) register. In this mode, the GPTMTnR and GPTMTnPS registers hold the time at which
the selected input event occurred while the GPTMTnV register hold s the free-running timer value. These
registers can be read to determine the time that elapsed between the interrupt assertion and the entry into
the ISR.
In addition to generating interrupts, an ADC and/or a µDMA trigger can be generated. The ADC trigger is
enabled by setting the TnOTE bit in GPTMCTL and the event that activates the ADC is configured in the
GPTM ADC Event (GPTMADCEV) register. The µDMA trigger is enabled by configuring the appropriate
µDMA channel as well as the type of trigger selected in the GPTM DMA Event (GPTMDMAEV) register
(see