when I use S32K144 LPSPI module to setup communication in S32DS environment,there is some issues as the following.
1.if LPSPI_DRV_MasterTransfer(instance,sendBuffer,receiveBuffer,transferByteCount); there is no receive data in RDR.
2. if LPSPI_DRV_MasterTransferBlocking(instance,sendBuffer,receiveBuffer,transferByteCount,100);after several frames, it is pended in OSif_wait().
function as:
LPSPI_DRV_MasterInit(LPSPICOM1,&lpspiCom1State,&lpspiCom1_MasterConfig0);
status_t error = STATUS_ERROR;
uint16_t remaincnt=0;
uint8 txdatabuf[5]={0x55,0x55,0x55,0x55,0x55};
uint8 rxdatabuf[5]={0x00};
txdatabuf[0].=IMU_READ_SID0;
txdatabuf[1].Imufrm_U32=IMU_READ_SID1;
if(LPSPI_DRV_MasterGetTransferStatus(LPSPICOM1,&remaincnt)==STATUS_SUCCESS)
{
//error=LPSPI_DRV_MasterTransfer(LPSPICOM1,txdatabuf,rxdatabuf,transferByteCount);
error=LPSPI_DRV_MasterTransferBlocking(LPSPICOM1,txdatabuf,rxdatabuf,transferByteCount,5);
}
project configuration as below:
Hi,
Based on the details provided in your post I see just one issue: data is stored as uint8_t, but your frame size is 32.
Can you share here the project to reproduce the same setup as on your side?
Razvan
I'm using frame size of 16 bits , data is stored as uint8_t (Given array )
please try to answer the query posted here (https://community.nxp.com/t5/S32K/Implementing-Non-SDK-example-in-SDK-LPSPI-S32K144-Project-LPSPI/m-...)