Hi Marius,
I followed the article from your reply above, to integrate the driver in a Model. The driver is used in TPL mode so also two SPI's are configured in the model.
I have added a Matlab functionblock with an init function for the MC33771C driver. But I noticed a problem during debugging:
- the Slave SPI is not receiving all bytes
In the function BCC_MCU_TransferTpl after the execution of LPSPI_DRV_MasterTransferBlocking, LSPI0->SR->REF=1 (Receive fifo has overflow)
And later the function BCC_CheckEchoFrame will return an error
Is this because this is all executed in the LPIT0_Ch0_IRQHandler?
I'm suspecting this interrupt as in the BCC_S32_Freemaster example this same code is executed in the main loop.
How can this be solved? Is the driver using DMA for SPI transfers? I already played around with the interrupt level of LPIT0, but without success.
Kind regards,
Geert