If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

# TMS320C5515: Microprocessor-based signal processing devices

Part Number: TMS320C5515

Hello E2E Experts,

Good day.

Could you help me with the C code for the TMS320C5515 microprocessor? My task is to write a function Cascaded IIR Direct Form II Using 4 Coefficients per Biquad. I wrote an algorithm for this function, but there is a problem related to "dbuffer stores the index of the current element in the buffer, and the buffer itself is cyclic: "The first location of dbuffer is reserved for the index"".

ushort iircas4(DATA *x, DATA *h, DATA *r, DATA *dbuffer, ushort nbiq, ushort nx) {

int i, j;

DATA y;

for (i = 0; i < nx; ++i) {

DATA tmp = (long)x[i] - ((long)h * (long)dbuffer >> 16) - ((long)h * (long)dbuffer[nbiq] >> 16);

y = tmp + ((long)h * (long)dbuffer >> 16) + ((long)h * (long)dbuffer[nbiq] >> 16);

dbuffer[nbiq] = dbuffer;

dbuffer = tmp;

for (j = 1; j < nbiq; ++j) {

ushort hOffset = (4 * j) >> 1;

tmp = y - ((long)h[hOffset] * (long)dbuffer[j] >> 16) - ((long)h[hOffset + 2] * (long)dbuffer[nbiq + j] >> 16);

y = tmp + ((long)h[hOffset + 1] * (long)dbuffer[j] >> 16) + ((long)h[hOffset +3] * (long)dbuffer[nbiq + j] >> 16);

dbuffer[j + nbiq] = dbuffer[j];

dbuffer[j] = tmp;

}

r[i] = y;

}

volatile ushort oflag = 0;

return oflag;

}

Could you send me the code of the iircas4 function in C.

Regards,

CSC