-
Bug
-
Resolution: Fixed
-
Medium
-
MCAL
-
MCAL-9144
-
MCUSW_J7_01.03.03
-
MCUSW_J7_09.00.00
-
j721e-evm
The SPI Driver documentation describes an API available to disable/enable the loopback mode of the SPI driver:
Spi_SetLoopbackMode
This function enables or disables the internal loopback mode of SPI. Note: Only McSPI HW units supports this feature. This API should be called after Spi_Init is called. Otherwise this API will return E_NOT_OK. Also this API should not be called when the HW unit is busy. This API could be used to check the integrity of the SPI module. When the loopback mode is enabled, the data transferred is received back and hence the caller can verify and compare the TX buffer with RX buffer for any HW failures.
This API is not available in the MCUSW driver package. Instead, the loopback functionality is now enabled through the Application startup code:
118 /* MCU MCSPI 0 D1 PAD configuration
119 * If D1 is selected for Rx please set value to 0xFFFFFFF0U
120 * Here D1 is set to 0xFFDFFFF0U because this application is
121 * SPI Internal Loopback */
122 regVal = CSL_REG32_RD(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C098U);
123 regVal &= 0xFFDFFFF0U;
124 CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C098U, regVal);