SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
In this mode, the signal is first synchronized to the system clock (SYSCLK) and then qualified by a specified number of cycles before the input is allowed to change. Figure 13-4 and Figure 13-5 show how the input qualification is performed to eliminate unwanted noise. Two parameters are specified by the user for this type of qualification: 1) the sampling period, or how often the signal is sampled, and 2) the number of samples to be taken.
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 is sampled, relative to the CPU clock (SYSCLK).
The sampling period is specified by the qualification period (QUAL_PERIOD_PER_SAMPLE) bits in IOMUX_QUAL_GRP*_*_CFG_REG. The sampling period is configurable in groups of 8 input signals. For example, GPIO0 to GPIO7 use MSS_IOMUX.QUAL_GRP_0_CFG_REG[QUAL_PERIOD_PER_SAMPLE] setting and GPIO8 to GPIO15 use MSS_IOMUX.QUAL_GRP_1_CFG_REG[QUAL_PERIOD_PER_SAMPLE]. Table 13-9 and Table 13-10 show the relationship between the sampling period or sampling frequency and the MSS_IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] setting.
Sampling Period | ||
---|---|---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0 | 1 × TSYSCLK | |
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ≠ 0 | 2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] × TSYSCLK | |
Where TSYSCLK is the period in time of SYSCLK |
Sampling Frequency | ||
---|---|---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0 | fSYSCLK | |
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ≠ 0 | fSYSCLK × 1 ÷ (2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ) | |
Where fSYSCLK is the frequency of SYSCLK |
From these equations, the minimum and maximum time between samples can be calculated for a given SYSCLK frequency:
Example: Maximum Sampling Frequency: |
---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0 |
then the sampling frequency is fSYSCLK |
If, for example, fSYSCLK = 200MHz |
then the signal is sampled at 200MHz or one sample every 5ns. |
Example: Minimum Sampling Frequency: |
---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0xFF (255) |
then the sampling frequency is fSYSCLK × 1 ÷ (2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ) |
If, for example, fSYSCLK = 200MHz |
then the signal is sampled at 200MHz × 1 ÷ (2 × 255) (392.157kHz) or one sample every 2.5μs. |
Number of samples:
The number of times the signal is sampled is either three samples or six samples as specified in the qualification selection IOMUX.*_CFG_REG[QUAL_SEL] registers. When three or six consecutive cycles are the same, then the input change is passed through to the device.
Total Sampling-Window Width:
The sampling window is the time during which the input signal is sampled as shown in Figure 13-5. By using the equation for the sampling period, along with the number of samples to be taken, the total width of the window can be determined.
For the input qualifier to detect a change in the input, the level of the signal must be stable for the duration of the sampling-window width or longer.
The number of sampling periods within the window is always one less than the number of samples taken. For a three-sample window, the sampling-window width is two sampling-periods wide where the sampling period is defined in Table 13-9. Likewise, for a six-sample window, the sampling-window width is five sampling-periods wide. Table 13-11 and Case 2: Six-Sample Sampling-Window Width show the calculations used to determine the total sampling-window width based on IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] and the number of samples taken.
Total Sampling-Window Width | ||
---|---|---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0 | 2 × TSYSCLK | |
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ≠ 0 | 2 × 2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] × TSYSCLK | |
Where TSYSCLK is the period in time of SYSCLK |
Total Sampling-Window Width | ||
---|---|---|
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] = 0 | 5 × TSYSCLK | |
If IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] ≠ 0 | 5 × 2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] × TSYSCLK | |
Where TSYSCLK is the period in time of SYSCLK |
The required duration for an input signal to be stable for the qualification logic to detect a change is described in the data sheet.
Example Qualification Window:
For the example shown in Figure 13-5, the input qualification has been configured as follows:
This configuration results in the following:
tw(IQSW) = 5 × tw(SP) = 5 × 2 × IOMUX.QUAL_GRP_*_CFG_REG[QUAL_PERIOD_PER_SAMPLE] × TSYSCLK = 5 × 2 × TSYSCLK
Sampling period, tw(SP) = 2 x TSYSCLK = 2 × 5ns = 10ns
Sampling window, tw(IQSW) = 5 × tw(SP) = 5 × 5ns = 25ns
tw(IQSW) + tw(SP) + TSYSCLK = 25ns + 10ns + 5ns = 40ns