Other Parts Discussed in Thread: SYSBIOS, C2000WARE
I am using the 28035 DMA subsystem to buffer data from the A/D converter. The A/D converter is triggered by an ePWM module. The ePWM is configured as up/down with a SOC generated at timer 0 and timer period match. The DMA1 is configured to transfer the A/D results to a buffer, 16 words/burst and 2 bursts per transfer triggered by ADC sequence 1 complete. DMA complete triggers an ISR that processes the data and resets the DMA. This system has been in place for several months and seemed to be working well.
I was debugging a strange 'glitch' that would occur in the output current of an LLC converter. Infrequently there would be a disturbance of the output current for no apparent reason. It seemed to happen randomly. I've traced this back to an occasional 0 appearing in the DMA buffer. In the operating mode at the time, the A2D count should have been ~3200, so i would get a long stream of values around 3200, the a single 0, then back to 3200 again. The DMA buffer is 32 words long and contains 2 samples of each A/D channel. The LLC current in my case is in buffer indices 9 and 25 (current is the 10th A/D channel in the sequence). The 0 is always at index 9 and never at index 25. There's no code that clears the DMA buffer, it's declared const in the C code. The project is entirely written in C and C++ with no assembly language.
I suspected some kind of memory corruption so I moved to the DMA buffer to an unused section of SARAM. It didn't change anything. I've also tried changing the sequence order. That just proved it's happening on other channels as well. I've also verified that the signal going into the A/D converter is correct.
I'm out of ideas; I can't find anything in the datasheets that says I'm doing something wrong, and can't find anything in the errata about the A/D converter and the DMA.
Has anyone else had issues using the DMA with the A/D converter?