I use TM4C1231H6PGE.
I need to use SSI0 in slave mode with DMA for both TX and RX, and I need an interrupt to be issued when a DMA transfer is complete.
If I program the Interrupt as foolows:
static void SSI2RecvEndIntHandler(UArg unused)
{
volatile unsigned long i;
unsigned long v;
v = ROM_uDMAIntStatus();
ROM_uDMAIntClear(v);
if((v&(1<<UDMA_CHANNEL_SSI2RX))!=0)
{
Semaphore_post(hSemRecv);
}
}
ROM_IntEnable(INT_SSI2);
ROM_SSIIntDisable(SSI2_BASE, SSI_TXFF | SSI_RXFF | SSI_RXTO | SSI_RXOR);
Hwi_create(INT_SSI2, &SSI2RecvEndIntHandler, NULL, NULL);
two interrupts are issued as shows the D1 signal in this oscilloscope screenshot:
a TX interrupt is issued before the transfer is complete, and after, another interrupt is issued for RX.
But I cannot read the interrupt status from DMA because (from datasheet):
"When transfers are performed from a FIFO of the SSI using the μDMA, and any interrupt is generated
from the SSI, the SSI module's status bit in the DMA Channel Interrupt Status (DMACHIS) register
must be checked at the end of the interrupt service routine. If the status bit is set, clear the interrupt
by writing a 1 to it."
So what can I do?
best regards
