Part Number: SYSCONFIG
Tool/software:
Hi,
In Sysconfig v.1.20.0+3578 in cooperation with MCU+ SDK 9.02.00.50 we have the configured 2 peripheral McSPI interfaces. Below the configuration for one of them, the second is identical except of the McSPI and pins used:

We get the following initialization structures generated:
MCSPILLD_InitObject gMcspiInitObject[2] =
{
{
.inputClkFreq = 50000000,
.intrNum = 63,
.operMode = MCSPI_OPER_MODE_POLLED,
.intrPriority = 4U,
.chMode = MCSPI_CH_MODE_PERIPHERAL,
.pinMode = MCSPI_PINMODE_4PIN,
.initDelay = MCSPI_INITDLY_0,
.multiWordAccess = FALSE,
.msMode = MCSPI_MS_MODE_CONTROLLER,
.chEnabled = {TRUE, FALSE, FALSE, FALSE},
.mcspiDmaHandle = NULL,
.chObj[0].chCfg = &gAdcDportMcspi3ChCfg[0],
.chObj[0].dmaChCfg = NULL,
.chObj[0].dmaChConfigNum = 0,
.clockP_get = ClockP_getTicks,
.transferCallbackFxn = NULL,
.errorCallbackFxn = NULL,
},
{
.inputClkFreq = 50000000,
.intrNum = 205,
.operMode = MCSPI_OPER_MODE_POLLED,
.intrPriority = 4U,
.chMode = MCSPI_CH_MODE_PERIPHERAL,
.pinMode = MCSPI_PINMODE_4PIN,
.initDelay = MCSPI_INITDLY_0,
.multiWordAccess = FALSE,
.msMode = MCSPI_MS_MODE_CONTROLLER,
.chEnabled = {TRUE, FALSE, FALSE, FALSE},
.mcspiDmaHandle = NULL,
.chObj[0].chCfg = &gAdcDportMcspi1ChCfg[0],
.chObj[0].dmaChCfg = NULL,
.chObj[0].dmaChConfigNum = 0,
.clockP_get = ClockP_getTicks,
.transferCallbackFxn = NULL,
.errorCallbackFxn = NULL,
},
};
Apparently, the above init values are wrong, in particular the values:
- .chMode = MCSPI_CH_MODE_PERIPHERAL
- .msMode = MCSPI_MS_MODE_CONTROLLER
The right values here would be:
- .chMode = MCSPI_CH_MODE_SINGLE
- .msMode = MCSPI_MS_MODE_PERIPHERAL
Please fix that in the following revisions of SysConfig, as patching generated files is really annoying.
Thanks!