SPRUJB3 March 2024 AM67 , AM67A , TDA4AEN-Q1 , TDA4VEN-Q1
By default, the clock division ratio is defined by the MCSPI_CHiCONF[5-2] CLKD bit field with power-of-2 granularity leading to a clock division in the range 1 to 4096; in this case, the duty cycle is always 50 percent. With the MCSPI_CHiCONF[29] CLKG bit, clock division granularity can be changed to one clock cycle; in that case the MCSPI_CHiCTRL[15-8] EXTCLK bit field is concatenated with the MCSPI_CHiCONF[5-2] CLKD bit field to give a 12-bit-wide division ratio in the range 1 to 4096.
When granularity is one clock cycle (the CLKG bit set to 1), for the odd value of the clock ratio, the clock high level lasts one clock cycle more than the low level, depending on the MCSPI_CHiCONF[1] POL and MCSPI_CHiCONF[0] PHA bits (see Table 12-20).
Clock Ratio FRATIO | CLKSPIO High Time | CLKSPIO Low Time |
---|---|---|
1 | THIGH_REF | TLOW_REF |
Even >= 2 | T_ref * (FRATIO/2) | T_ref * (FRATIO/2) |
Odd >= (POL = PHA) | T_ref * (FRATIO– 1)/2 | T_ref * (FRATIO + 1)/2 |
Odd >= (POL =! PHA) | T_ref * (FRATIO+ 1)/2 | T_ref * (FRATIO – 1)/2 |
FRATIO = SPICLK
frequency (FOUT) division ratio
THIGH = SPICLK high time period
TLOW = SPICLK low time period
T_ref
= MCSPI_FCLK period
THIGH_REF =
MCSPI_FCLK high time period
TLOW_REF =
MCSPI_FCLK low time period
If the CLKG bit is set to 1; FRATIO = EXTCLK concatenated with CLKD + 1.
For odd ratio values, the duty cycle is calculated as follows:
Duty_cycle = (1 – 1/FRATIO)/2
Table 12-21 shows examples of clock granularity with a clock source frequency of 50 MHz.
EXTCLK | CLKD | CLKG | FRATIO | PHA | POL | THIGH (ns) | TLOW (ns) | TPERIOD (ns) | Duty Cycle | FOUT (MHz) |
---|---|---|---|---|---|---|---|---|---|---|
X | 0 | 0 | 1 | X | X | 10.0 | 10.0 | 20.0 | 50–50 | 50 |
X | 1 | 0 | 2 | X | X | 20.0 | 20.0 | 40.0 | 50–50 | 25 |
X | 2 | 0 | 4 | X | X | 40.0 | 40.0 | 80.0 | 50–50 | 12.5 |
X | 3 | 0 | 8 | X | X | 80.0 | 80.0 | 160.0 | 50–50 | 6.2 |
0 | 0 | 1 | 1 | X | X | 10.0 | 10.0 | 20.0 | 50–50 | 50 |
0 | 1 | 1 | 2 | X | X | 20.0 | 20.0 | 40.0 | 50–50 | 25 |
0 | 2 | 1 | 3 | 1 | 0 | 40.0 | 20.0 | 60.0 | 66–33 | 16.6 |
0 | 2 | 1 | 3 | 1 | 1 | 20.0 | 40.0 | 60.0 | 33–66 | 16.6 |
0 | 3 | 1 | 4 | X | X | 40.0 | 40.0 | 80.0 | 50–50 | 12.5 |
5 | 0 | 1 | 81 | 1 | 0 | 820.0 | 800.0 | 1620.0 | 50.6–49.4 | 0.617 |
5 | 7 | 1 | 88 | X | X | 880.0 | 880.0 | 1760.0 | 50–50 | 0.568 |