AnsweredAssumed Answered

SPI deadlock on SKEAZ1284

Question asked by 0815 on Jan 18, 2016
Latest reply on Jan 25, 2016 by Kerry Zhou

Actually I have an strange deadlock in the SPI driver for my custom SKEAZ1284 board:

I'm using the Processor Expert SPIMaster_LDD component, the same unchanged configuration was working flawlessly for weeks before. Also, before it deadlocks the code is working for a few calls.

 

Here is the interesting part of my communication driver, nothing special but SPI is used in polling mode:

 

while(ERR_BUSY == SM_SPI_ReceiveBlock(SM_SPI_DeviceData, receive, 2));
while(ERR_BUSY == SM_SPI_SendBlock(SM_SPI_DeviceData, transmit, 2));
while (!SM_SPI_GetBlockReceivedStatus(SM_SPI_DeviceData))
{
     SM_SPI_Main(SM_SPI_DeviceData);
}

If the problem occurs, it is deadlocked in the last while loop. At this point, the content of the SPI registers is as follows:

 

register2.PNG

 

At the same time the device data structure of the SPI component is this:

devicedata.PNG

 

So for me it seems, everything is transferred the right way (also confirmed by logic analyzer) but afterwards something happens?

 

I'm grateful for any help...

Outcomes