SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
By default, the clock division ratio is defined by the MCSPI_CHxCONF[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_CHxCONF[29] CLKG bit, clock division granularity can be changed to one clock cycle; in that case the MCSPI_CHxCTRL[15:8] EXTCLK bit field is concatenated with the MCSPI_CHxCONF[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_CHxCONF[1] POL and MCSPI_CHxCONF[0] PHA bits (see Table 24-204).
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 = FCLK period
THIGH_REF = FCLK high time period
TLOW_REF = 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 24-205 shows examples of clock granularity with a clock source frequency of 48 MHz.
EXTCLK | CLKD | CLKG | FRATIO | PHA | POL | THIGH (ns) | TLOW (ns) | TPERIOD (ns) | Duty Cycle | FOUT (MHz) |
---|---|---|---|---|---|---|---|---|---|---|
X | 0 | 0 | 1 | X | X | 10.4 | 10.4 | 20.8 | 50–50 | 48 |
X | 1 | 0 | 2 | X | X | 20.8 | 20.8 | 41.6 | 50–50 | 24 |
X | 2 | 0 | 4 | X | X | 41.6 | 41.6 | 83.2 | 50–50 | 12 |
X | 3 | 0 | 8 | X | X | 83.2 | 83.2 | 166.4 | 50–50 | 6 |
0 | 0 | 1 | 1 | X | X | 10.4 | 10.4 | 20.8 | 50–50 | 48 |
0 | 1 | 1 | 2 | X | X | 20.8 | 20.8 | 41.6 | 50–50 | 24 |
0 | 2 | 1 | 3 | 1 | 0 | 41.6 | 20.8 | 62.4 | 66–33 | 16 |
0 | 2 | 1 | 3 | 1 | 1 | 20.8 | 41.6 | 62.4 | 33–66 | 16 |
0 | 3 | 1 | 4 | X | X | 41.6 | 41.6 | 83.2 | 50–50 | 12 |
5 | 0 | 1 | 81 | 1 | 0 | 852.8 | 832 | 1684.8 | 50.6–49.4 | 0.592 |
5 | 7 | 1 | 88 | X | X | 915.2 | 915.2 | 1830.4 | 50–50 | 0.545 |