Issue reported by customer is copied here, kindly advice.
The version that is in use is AUTOSAR_MCAL_TMS570LSx-05.30.00.
-
Change in SPI Pin Control Register 0 (SPIPC0)
It was seen that there is no activity on the CLK and CS lines of the SPI. Below is the snapshot of the configuration done for the device under test. There were supporting configurations in the Port also. Let us know in case you need configuration data and what you need for the analysis. Only on setting the register SPI Pin Control Register 0 (SPIPC0), to the values suggested in the fields, SOMIFUN0, SIMOFUN0,CLKFUN, SCSFUN .
We could see activity on the SPI CLK and CS after the change.
**************
-
SpiCsSelection
For one of the devices in this project there is a need to control the CS as a GPIO and not from the Peripheral engine(SPI). On changing the SpiCsSelection
CS_VIA_PERIPHERAL_ENGINE (default)
To
CS_VIA_GPIO, there is no change of the generated code. Also, the SPI_Driver_userguide.pdf does not mention about this parameter, SpiCsSelection. I also see no reference of using this parameter in the static code.
Let us know how to achieve this configuration.
-
SpiCsIdentifier range
It is seen that the SPI MCAL (\Mcal_Tms570Lx\Supply\AUTOSAR_MCAL_TMS570LSx-05.30.00\Spi_TI_TMS570LSx) does not let us choose SpiCsIdentifier other than ( SCS0, SCS1, SCS2, SCS3). In the project we work for the HW needs we would like to configure SCS4 and SCS5 as well.
This is not allowed from the Tool, it throws a validation error saying
*******************
INFO 18-05-16,14:14:52 (13030) Running generator "plugin.tresosdb.api.verifygenerator" in mode "generate" for module ""
INFO 18-05-16,14:14:52 (13030) Running generator "Spi_TI_TMS570LSx_GeneratorId" in mode "generate" for module "Spi_TI_TMS570LSx"
ERROR 18-05-16,14:14:52 (2091) Failed to run generator "Spi_TI_TMS570LSx_GeneratorId" (mode: "generate") for module "Spi_TI_TMS570LSx"
INFO 18-05-16,14:14:52 (13014) Generated "D:\TEMP\DaVinci\Cfg-9624225\Generation\Cfg_Gen-1526459630778-0\Tresos-1526460287276-0\Tresos_Gen_-1526460287510-0\include\Spi_Cfg.h"
ERROR 18-05-16,14:14:52 (2004) [D:\usr\development\CustomerProjects\PRJ00012348_VCU_ME\Main\trunk\S1_SW\060_Int\Appl\CoreMSR\ThirdParty\Mcal_Tms570Lx\Supply\Tresos\plugins\Spi_TI_TMS570LSx/generate/src/Spi_PBcfg.c (signed):306]: Invalid CS identifier selected. (node )
ERROR 18-05-16,14:14:52 (2070) Failed to generate file "D:\usr\development\CustomerProjects\PRJ00012348_VCU_ME\Main\trunk\S1_SW\060_Int\Appl\CoreMSR\ThirdParty\Mcal_Tms570Lx\Supply\Tresos\plugins\Spi_TI_TMS570LSx/generate/src/Spi_PBcfg.c (signed)"
*******************