Other Parts Discussed in Thread: OMAPL138
Tool/software: Code Composer Studio
Hi,
I am developing some DSP audio effects with the help of the mcasp starterware. One issue I am presented with is the presence of noise within my system, I think this is mainly due to inefficient code execution (please correct me if there is another significant factor that could cause this).
/* ** Transmit buffers. If any new buffer is to be added, define it here and ** update the NUM_BUF. */ signed char txBuf0[AUDIO_BUF_SIZE]; signed char txBuf1[AUDIO_BUF_SIZE]; //
/* Array of transmit buffer pointers */ signed int txBufPtr[NUM_BUF] = { (signed int) txBuf0, (signed int) txBuf1 };
In streamlining my code I want to figure out how to point to and assign values to my transmission buffers. Currently I am checking the lastSentTxBuf through an 'if' statement and assigning values to the arrays txBuf0 and txBuf1 within.
for (all values in buffer)
{
if (lastSentTxBuf == 0) { txBuf0[i] = Processed data; } else { txBuf1[i] = Processed data; }
}
Is there a way to avoid this, potentially by using the txBufPtr array directly? I have tried multiple times to solve this but nothing seems to work. Please advise me on any solutions to this problem, along with ways to increase code efficiency and to get the most processing power out of the C6748.
Thanks,
Calum