This section describes the differences between MCSPI APIs of MCU+ SDK and Processor SDK RTOS (PDK). This can be used as a migration aid when moving from Processor SDK RTOS (PDK) to MCU+ SDK.
In MCU+ SDK, the MCSPI module provides both low latency and higher level driver APIs.Refer MCSPI for more details. From the user point of view, higher level API usage is same as in PDK.APIs name begins with MCSPI_
instead of SPI_
. Low latency APIs are provided on top of these higher level abstracted APIs and the usage of these APIs are showcased in MCSPI Performance 8 Bit example.
There are changes in API names, structure names and macro names. Low latency API names also begin with MCSPI_
now. The low latency available API names and the name changes are listed below.
PDK | MCU+ SDK | Remarks |
---|---|---|
McSPIClkConfig | MCSPI_chConfig | Configuring field MCSPI_ChConfig::bitRate in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPIWordLengthSet | MCSPI_chConfig | Configuring field MCSPI_Transaction::dataSize in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPICSEnable | MCSPI_open | CS is enabled via SysConfig. |
McSPICSDisable | MCSPI_open | CS is disabled via SysConfig. |
McSPICSPolarityConfig | MCSPI_chConfig | Configuring field MCSPI_ChConfig::csPolarity in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPICSTimeControlSet | MCSPI_chConfig | Configuring field MCSPI_ChConfig::csIdleTime in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPICSAssert | MCSPI_writeChConfReg | In MCU+SDK CS is asserted by driving FORCE field using MCSPI_writeChConfReg. |
McSPICSDeAssert | MCSPI_writeChConfReg | In MCU+SDK CS is asserted by driving FORCE field using MCSPI_writeChConfReg. |
McSPIStartBitEnable | MCSPI_open | Configuring field MCSPI_ChConfig::startBitEnable in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPIStartBitPolarityConfig | MCSPI_open | Configuring field MCSPI_ChConfig::startBitPolarity in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPIStartBitDisable | MCSPI_close | |
McSPIControllerModeEnable | MCSPI_open | Configuring field MCSPI_OpenParams::msMode in MCSPI_OpenParams will do the equivalent of PDK MCSPI API. |
McSPIPeripheralModeEnable | MCSPI_open | Configuring field MCSPI_OpenParams::msMode in MCSPI_OpenParams will do the equivalent of PDK MCSPI API. |
McSPIControllerModeConfig | MCSPI_open MCSPI_chConfig | Configuring fields MCSPI_Attrs::chMode,MCSPI_Attrs::pinMode in MCSPI_Attrs, field MCSPI_ChConfig::trMode in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPIChannelEnable | MCSPI_writeChCtrlReg | In MCU+SDK Channel is enabled by setting EN field using MCSPI_writeChCtrlReg. |
McSPIChannelDisable | MCSPI_writeChCtrlReg | In MCU+SDK Channel is enabled by clearing EN field using MCSPI_writeChCtrlReg. |
McSPIReset | MCSPI_open | |
McSPITurboModeEnable | None | In MCU+SDK API not supported |
McSPITurboModeDisable | None | In MCU+SDK API not supported |
McSPITxFIFOConfig | MCSPI_enableTxFIFO | Only API name change |
McSPIRxFIFOConfig | MCSPI_enableRxFIFO | Only API name change |
McSPIFIFOTrigLvlSet | MMCSPI_open | In MCU+SDK, FIFO trigger level is set to fixed value based on transfer mode. |
McSPIWordCountSet | MCSPI_transfer | |
McSPIDMAEnable | None | In MCU+SDK API not supported |
McSPIDMADisable | None | In MCU+SDK API not supported |
McSPIIntEnable | MCSPI_transfer | |
McSPIIntDisable | None | Interrupt mode is supported only in higher level driver APIs and driver manages ISR. |
McSPIInitDelayConfig | MCSPI_open | Configuring field MCSPI_Attrs::initDelay in MCSPI_Attrs will do the equivalent of PDK MCSPI API. |
McSPITransmitData | MCSPI_writeTxDataReg | Only API name change |
McSPIReceiveData | MCSPI_readRxDataReg | Only API name change |
McSPIIntStatusGet | None | Interrupt mode is supported only in higher level driver APIs and driver manages ISR. |
McSPIIntStatusClear | None | Interrupt mode is supported only in higher level driver APIs and driver manages ISR. |
McSPIChannelStatusGet | MCSPI_readChStatusReg | Only API name change |
McSPIMultipleWordAccessConfig | None | In MCU+SDK API not supported |
McSPIFIFODatManagementConfig | None | In MCU+SDK API not supported |
MCSPISysConfigSetup | MCSPI_open | |
MCSPIPinDirSet | MCSPI_open | Configuring field MCSPI_ChConfig::inputSelect, MCSPI_ChConfig::dpe0 and MCSPI_ChConfig::dpe1 in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
MCSPISingleChModeEnable | MCSPI_open | Configuring field MCSPI_Attrs::chMode in MCSPI_Attrs will do the equivalent of PDK MCSPI API. |
MCSPIMultiChModeEnable | MCSPI_open | Configuring field MCSPI_Attrs::chMode in MCSPI_Attrs will do the equivalent of PDK MCSPI API. |
McSPISetPeripheralChipSel | MCSPI_open | Configuring field MCSPI_ChConfig::slvCsSelect in MCSPI_ChConfig will do the equivalent of PDK MCSPI API. |
McSPIGetChannelCtrl | MCSPI_readChCtrlReg | Only API name change |
McSPISetChannelCtrl | MCSPI_writeChCtrlReg | Only API name change |
McSPIGetChannelConf | MCSPI_readChConf | Only API name change |
McSPISetChannelConf | MCSPI_writeChConfReg | Only API name change |
Not Available | MCSPI_getBaseAddr | This API is only present in MCU+SDK |
Not Available | MCSPI_reConfigFifo | This API is only present in MCU+SDK |
Not Available | MCSPI_getBufWidthShift | This API is only present in MCU+SDK |