Part Number: LP-AM261
Other Parts Discussed in Thread: CCSTUDIO, SYSCONFIG
Device: LP-AM261 Evaluation board
SDK: MCU+ SDK for AM261x 26.0.0.06
CCStudio: 21.0.0.14
SysConfig: 1.27.0
Using the MCSPI Performance 8 Bit example provided by the MCU+ SDK, I'm attempting to transmit at 12 MHz with SPI0, however it will only transmit at 10 MHz.
The CONFIG_MCSPI0 Channel Configuration 0 has the Clock Frequency set to 12,000,000. 
The initial setup of SPI0's clock is to use SYSCLK with SPI0_CLK_GRM_CLKDIV set to 5, to have SPI0_CLK of 50.00MHz.

This generates a Release/syscfg/ti_drivers_config.c gMcspiAttrs with the inputClkFreq set to 50,000,000.
/* MCSPI atrributes */
static MCSPI_Attrs gMcspiAttrs[CONFIG_MCSPI_NUM_INSTANCES] =
{
{
.baseAddr = CSL_MCSPI0_U_BASE,
.inputClkFreq = 50000000U,
.intrNum = CSLR_R5FSS0_CORE0_INTR_MCSPI0_INTR,
.operMode = MCSPI_OPER_MODE_POLLED,
.intrPriority = 4U,
.chMode = MCSPI_CH_MODE_SINGLE,
.pinMode = MCSPI_PINMODE_4PIN,
.initDelay = MCSPI_INITDLY_0,
.multiWordAccess = FALSE,
},
};
However when measured via an oscilloscope the SPI0_CLK signal is only at 10 MHz, which appears to be due to MCU+ SDK McSPI driver's MCSPI_setClkConfig function.
static void MCSPI_setClkConfig(uint32_t baseAddr,
uint32_t chNum,
uint32_t inputClkFreq,
uint32_t bitRate)
{
uint32_t fRatio;
uint32_t clkD;
uint32_t extClk;
/* Calculate the value of fRatio. */
fRatio = inputClkFreq / bitRate;
if(((inputClkFreq % bitRate) != 0U) && (fRatio < MCSPI_MAX_CLK_DIVIDER_SUPPORTED))
{
/* use a higher divider value in case the ratio
* is fractional so that we get a lower SPI clock
* than requested. This ensures we don't go beyond
* recommended clock speed for the SPI peripheral */
fRatio++;
}
/* If fRatio is not a power of 2, set granularity of 1 clock cycle */
if((uint32_t) 0U != (fRatio & (fRatio - 1U)))
{
/* Set the clock granularity to 1 clock cycle */
CSL_REG32_FINS(
baseAddr + MCSPI_CHCONF(chNum),
MCSPI_CH0CONF_CLKG,
CSL_MCSPI_CH0CONF_CLKG_ONECYCLE);
/* Calculate the ratios clkD and extClk based on fClk */
extClk = (fRatio - 1U) >> 4U;
clkD = (fRatio - 1U) & (uint32_t) MCSPI_CLKD_MASK;
/* Set the extClk field */
CSL_REG32_FINS(
baseAddr + MCSPI_CHCTRL(chNum),
MCSPI_CH0CTRL_EXTCLK,
extClk);
}
else
{
/* Clock granularity of power of 2 */
CSL_REG32_FINS(
baseAddr + MCSPI_CHCONF(chNum),
MCSPI_CH0CONF_CLKG,
CSL_MCSPI_CH0CONF_CLKG_POWERTWO);
clkD = 0U;
while (1U != fRatio)
{
fRatio >>= 1U;
clkD++;
}
}
/* Configure the clkD field */
CSL_REG32_FINS(baseAddr + MCSPI_CHCONF(chNum), MCSPI_CH0CONF_CLKD, clkD);
return;
}
Since the inputClkFreq is 50,000,000 and bitRate is 12,000,000, the ratio is not a power of 2, therefore the Clock ration extension is used.
This results in EXTCLK of 0, CLKD of 4, which creates a clock ratio of CLKD + 1, resulting in SPI0's clock being 10MHz.
To have the desired 12 MHz rate, the input clock for SPI0 should be 48 MHz, which should be possible by selecting DPLL_PER_HSDIV0_CLKOUT0 for SPI0_CLK_GCM_CLKSRC_SEL.

However this change appears to have no affect on the generated a Release/syscfg/ti_drivers_config.c gMcspiAttrs as the the inputClkFreq set to 50,000,000, which results in the SPI0 clock still being 10MHz.
In fact attempting any changes to SPI0's clock, via SysConfig's ClockTree tool, such as modifying the SPI0_CLK_GCM_CLKDIV value do not appear to impact the generated Release/syscfg/ti_drivers_config.c gMcspiAttrs's inputClkFreq parameter.
I can confirm when changing the SPI0_CLK_GCM_CLKSRC_SEL to DPLL_PER_HSDIV0_CLKOUT0 the following entry is added to my example.syscfg file.
const mux27 = system.clockTree["SPI0_CLK_GCM_CLKSRC_SEL"];
mux27.inputSelect = "DPLL_PER_HSDIV0_CLKOUT0";
Is this a bug within SysConfig/ClockTree/MCU+ SDK or am I missing something?