I've got a problem. I have a program for ADAU1701 including FIR filter with big amount of coefficients (like 900 or more). Also I have to use few sets of fir coefficients that cannot fit into the processor memory. It means that I have no possibility to use different FIR blocks and switch them using GPIO tools. How could I implement this functionality? I suppose the key is to use a microcontroller but I'm not sure.
The FIR sets would be changed over I2C or SPI.
We have a page which describes how to boot the DSP from a microcontroller. It has Arduino example code available. The code initializes the hardware registers…
A microcontroller could be a good solution here. However 900 coefficients is much too large for a safeload write, so you may wish to mute the output while new coefficients are loaded. This would probably be <50ms per coefficient update. And then the filter needs to stabilize, which would take 900 samples in your example.
Would this be ok in your system?
The time of full transaction and stabilization doesn't matter a lot, it is more important to have a possibility to choose FIR sets. I've noticed that ADAU1701 has 3 ways to download and change program: safeload, I2C and SPI. I have a microcontroller from stm32f103 series that obviously is able to handle even difficult I2C transactions but I am bothered by another problem: connecting processor with microcontroller. As I understood, a master device uploads to ADAU1701 separately program data, parameter data and hardware config data. I suppose I can only store sets of parameter data in uC and upload them via I2C, but I am not sure. Should I upload full program data generated by SigmaStudio using my uC, or I can use one EEPROM chip with my program (so ADAU1701 downloads it with safeload procedure) and only change concrete parameters with uC? And also how to get exact addresses of FIR coefficients to change them?
We have a page which describes how to boot the DSP from a microcontroller. It has Arduino example code available. The code initializes the hardware registers, program memory, and parameter memory; everything you need to start up the chip. You would need to adjust the I2C Write implementation, among other things, to be compatible with the ST microcontroller.
Your microcontroller might not have enough memory to hold the entire program. So you may wish to boot the DSP by EEPROM and then change the FIR coefficients from your microcontroller. This has been discussed in various places on the forum. One popular option is to have a GPIO from the SigmaDSP signal the microcontroller once the program is loaded from EEPROM, so that there is no contention on the I2C bus.
As for the FIR coefficient addresses, they are included in the *PARAM.h file exported by SigmaStudio. There is example code on this page which shows how these are accessed:
Does this help?
Yes, it is the things I was looking for. Thanks a lot!