Hi,
I have an interaction problem between use of XDS510 USB debugger, TMS570 MCU Development Kit, SPI and DMA modules.
My setup is two TMS570 MCU connected by SPI1 to SPI1, CS, CLK, SOMI and SIMO, running at 8MHz. My SPI Master controls transmissions of 9*16-bit frames every 62.4us. The SPI Master receives constantly changing data from the SPI Slave. The SPI Master receives this data and uses the SPI RXBUF FULL interrupt to initiate a Semi_CPU DMA transfer from RXRAM to an internal software buffer of my own, RXBUF. Only one transfer group is used, TG0. I currently have the SPI Slave echoing back the received data.=
I use nowFlash to program each of my TMS570s.
My problem is that that data received from the SPI Slave at the SPI Master in RXRAM is all-zero without the XDS510 running a debug session. When the XDS510 session is CONNECTED, the data in RXRAM is seen to be non-zero, and equates to the data transmissted by the SPI Master.
I have verified that the data in RXRAM is zero without the debugger connected by setting a GIO LOW for zero data, GIO HIGH for non-zero data and then using a scope. Data in RXBUF matches that in RXRAM. Using the scope, I have also verified that the SPI Slave is transmitting valid changing data, it is not zero.
The SPI Slave (which uses the same technique to transfer data from RXRAM to RXBUF) does not exhibit this problem, data it receives from the SPI Master is valid within RXRAM and RXBUF.
I have spent a great deal of time narrowing down my complex interactions between SPI, ISR, DMA and CRC to this simple problem scenario, but I don't have a clue why this is happening. I have switched SPI Master/Slave applications across my two TMS570s but the problem just moves with the applications. Does anybody have any suggestions which may explain this behaviour?
Regards, Tony.