Other Parts Discussed in Thread: TMS570LS20216
Hi,
We are using TMS570LS20216 safety processor, communicating with FPGA on SPI bus (4- wired). TMS570 is configured as the Master and SPI transfer is done using DMA.
These function are also used in our source code:
1] spiSetData
2] spiTransfer
3] while (!(spiIsTransferComplete(spiREG3,TG0))));
4] spiREG3->TGINTFLG = 0x00080000;
5] spiGetData
6] spiREG3->TGINTFLG = 0x00080000;
Before calling the “spiTransfer” function “TGINTFLG” shows 0x0 and after that it is set, but the value is not cleared anymore. Actually this statement “spiREG3->TGINTFLG = 0x00080000 or 0x00000000” does not clear the flag.
Adding a delay before “spiGetData” solves the problem and data transfer is done successfully but the baud rate is low and I should remove this delay.
I need a help to find a way for clearing the “TGINTFLG” flag, so the while statement really waits for the completion of Transfer Group 0.
Thanks in advance
Fatemeh