ΣSigmaStudio Ask AI Русский Log in

Grabbing DSP Readback data with a microcontroller

SigmaDSP & SigmaStudio Shahin May 10, 2011 00:00 1 replies Original on forum ↗
Subscribe
Shahin Question
May 10, 2011 00:00

I'm trying to utilize the definitions in the IC_1_Param.h file to take data from a DSP Readback on my ADAU1701. Below is the relevant part of the param.h file:

* Module ReadBack1 - DSP Readback*/
#define MOD_BOARD2_READBACK1_COUNT 2
#define MOD_BOARD2_READBACK1_DEVICE "IC1"
#define MOD_BOARD2_READBACK1_ALG0_VAL1_ADDR 2074
#define MOD_BOARD2_READBACK1_ALG0_VAL1_VALUE SIGMASTUDIOTYPE_5_19_CONVERT(0)
#define MOD_BOARD2_READBACK1_ALG0_VAL1_TYPE SIGMASTUDIOTYPE_5_19
#define MOD_BOARD2_READBACK1_ALG0_VAL0_ADDR 2074
#define MOD_BOARD2_READBACK1_ALG0_VAL0_VALUES SIGMASTUDIOTYPE_SPECIAL(0x0C52)
#define MOD_BOARD2_READBACK1_ALG0_VAL0_TYPE SIGMASTUDIOTYPE_SPECIAL
#define MOD_BOARD2_READBACK1_ALG0_VAL0_READBACK_ADDR 0

To initiate the readback, I have to send the data 0x0C52 to address 2074. In C code, how do I extract 0x0C52 from the parentheses so I can pass it to my function? Do I somehow have to define SIGMASTUDIOTYPE_SPECIAL as a new type in my code? Why can't this #define just be the value rather than wrapping it up inside a new type?

Audio Signal Processors

SigmaDSP Audio Processors

adau1701

ADIApproved Reply
May 11, 2011 00:00

You can define the macro in your code to just return the address:

#define SIGMASTUDIOTYPE_SPECIAL(addr) addr

The "SIGMASTUDIOTYPE_SPECIAL" is defined for legacy reasons and kept to support backward compatibility (some parts allow direct read and some don't, you could define this macro to return a modified address or the entire readback message etc).