Attached zip file contains the example code for using the IIR accelerator module.
I think there is a bug in this code example.
In the file main.c where the TCB's are filled with the data, a value is added as :
This is a pointer to the last value of the next TCB block. Since the TCB block contains 12 elements of type uint32_t, wich are 4 byte words I think the offset should be 12 words, not 12 bytes. The code should be :
IIRA_TCB2=((uint32_t)(IIRA_TCB1+(12*4))>>2)|0xA000000 // CP.
Also for the call to the IIRA_Init function, the second parameter should become (((uint32_t)(IIRA_TCB1+(12*4))>>2)|0xA000000).
This behaviour will change if the IIR call is implemented in a continous circular buffer, where the TCB's are chained.
Am i right ?
The IIRA_TCB variables are defined as 32 bit integer arrays, so the IIRA_TCB + 12 is interpreted as memory location of 12 uint32_t offset from IIRA_TCB