-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
MCAL
-
MCAL-29246
-
MCUSW_J7_10.01.00
-
MCUSW_J7_11.00.00
-
Configuring external device as 3(which is actually required) instead of default, results in wrong external device configuration getting copied during Spi_copyConfig(). In Spi_copyConfig() in file Spi_Priv.c, line 653 extDevCfg is taken for the index corresponding to jobCfg_PC.externalDeviceCfgId.
In file Spi_PBcfg.c, extDevCfg corresponding to the SpiExternalDevice configured to CSIB2(MCSPI0) is at index 0. Since the jobCfg_PC.externalDeviceCfgId is CSIB2(0x2), wrong extDevCfg from index is 2 is taken instead of index 0.
The issue happens when we configure 3 external devices. We don't use CSIB0 or CSIB1. Our external device is configured to CSIB2.if you check line 653 in Spi_copyConfig() , you will realize that extDevCfg[2] is taken because externalDeviceCfgId of CSIB2 is 2. extDevCfg at index 0 is CSIB2.