General-Purpose Input/Output (GPIO)
www.ti.com
96
SPRUI07–March 2020
Submit Documentation Feedback
Copyright © 2020, Texas Instruments Incorporated
System Control and Interrupts
Time between samples (sampling period):
To qualify the signal, the input signal is sampled at a regular period. The sampling period is specified by
the user and determines the time duration between samples, or how often the signal will be sampled,
relative to the CPU clock (SYSCLKOUT).
The sampling period is specified by the qualification period (QUALPRDn) bits in the GPxCTRL register.
The sampling period is configurable in groups of 8 input signals. For example, GPIO0 to GPIO7 use
GPACTRL[QUALPRD0] setting and GPIO8 to GPIO15 use GPACTRL[QUALPRD1]. Table 1-42 and
Table 1-43 show the relationship between the sampling period or sampling frequency and the
GPxCTRL[QUALPRDn] setting.
Table 1-42. Sampling Period
Sampling Period
If GPxCTRL[QUALPRDn] = 0 1 × T
SYSCLKOUT
If GPxCTRL[QUALPRDn] ≠ 0 2 × GPxCTRL[QUALPRDn] × T
SYSCLKOUT
Where T
SYSCLKOUT
is the period in time of SYSCLKOUT
Table 1-43. Sampling Frequency
Sampling Frequency
If GPxCTRL[QUALPRDn] = 0 f
SYSCLKOUT
If GPxCTRL[QUALPRDn] ≠ 0 f
SYSCLKOUT
× 1 ÷ (2 × GPxCTRL[QUALPRDn])
Where f
SYSCLKOUT
is the frequency of SYSCLKOUT
From these equations, the minimum and maximum time between samples can be calculated for a given
SYSCLKOUT frequency:
Example: Maximum Sampling Frequency:
If GPxCTRL[QUALPRDn] = 0
then the sampling frequency is f
SYSCLKOUT
If, for example, f
SYSCLKOUT
= 150 MHz
then the signal will be sampled at 150 MHz or one sample every 6.67 ns.
Example: Minimum Sampling Frequency:
If GPxCTRL[QUALPRDn] = 0xFF (255)
then the sampling frequency is f
SYSCLKOUT
× 1 ÷ (2 × GPxCTRL[QUALPRDn])
If, for example, f
SYSCLKOUT
= 150 MHz
then the signal will be sampled at 150 MHz × 1 ÷ (2 × 255) or one sample every 3.4 μs.