This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SPI Multi-buffer mode as a slave: TG suspend interrupt is not triggered

Other Parts Discussed in Thread: TMS570LC4357

Hi,

I am developing a SW on a TMS570LC4357 which goal is to acquire data from external sensors and to transmit the data through SPI to an external microcontroler (MPC56xx).

In the communication, the MPC56xx is the master, and the TMS570LC is the slave. The protocol is based on 16-bits frames and around 69 buffers are necessary, and the communication is functional.

In order to send the more up to date data from the TMS570 side (that are stored in a structure in internal RAM), I want to detect the transfer group start in order to place the internal RAM data into the MibSPI buffers of that same transfer group (TG0). In the protocol between the microcontrolers, the first frame transmission is intended to give enough time to prepare data on the TMS570LC side.

I first used the DMA (that worked fine), but I can not use it anymore, since in my architecture I already have two DMA channels configured that can be triggered at the same time (the DMA ignores the requests when more than 2 requests are received at the same time).

Now I am trying the TransferGroup Suspend interrupt (to handle it as an FIQ) but I wonder if it is really triggered when configured in slave mode (in the TRM, nothing states that it works only in master mode). In order to trigger that interrupt, I wrote that two specific lines of code:

// Enable TG0 suspend interrupt and set its level to 1
MIBSPI5TGITENST_bit.SETINTENSUS0 = 1;
MIBSPI5TGITLVST_bit.SETINTLVLSUS0 = 1;

The first line is to trigger TG suspend interrupt, and the second is to tell the MibSPI to raise a MibSPI level 1 interrupt when a TG suspend interrupt occurs.

I have also configured the VIM and so on, but my problem is only at MibSPI level: the TGINTFLAG register never shows any TG suspend interrupt (bit INTFLGSUS0).

I am sure that communication works because I receive correctly MPC56xx data in RX data buffers, and the TG completed interrupt (that I use to extract data from the buffers) is correctly triggered and shown in the TGINTFLAG register at the end of the TG0 transmission.

Does anyone has any idea why the TG suspend interrupt doesn't work? Is that a normal situation as the MibSPI is configured in slave mode? Is there an errata that is not documented in the errata document? Also, any idea in order that I can update the buffers 


Thanks for your help,

Gael