Hello,
i have a problem with the McASP unit and buffered data. I used a HWI for getting the input data from the McASP unit. Input and output serializer has the same clock.
XBUF11 = Transmit channel and XBUF12 = Receive channel
When i used a single int var it works:
int data;
void McASPInt(void) {
MCASP->XBUF11 = data;
data = MCASP->XBUF12;
}
The input is echoed with a small delay.
If i exchange this to an int array for getting greater delays, it fails:
#define BUFFER_SIZE 48
int InBuffer[BUFFER_SIZE];
int BufferIndex;
void McASPInt(void) {
int RingIndex = (BufferIndex%BUFFER_SIZE);
MCASP->XBUF11 = InBuffer[RingIndex];
InBuffer[RingIndex] = MCASP->XBUF12;
BufferIndex++;
}
I set a breakpoint at the output and check the InBuffer and the RingIndex. Everything is OK, but nothing is output.
I wondered why i don't get an output, although the same routine worked correctly with a single int.
Have anybody an idea, what could be the reason?