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

ADAU1761 - Feedback module causes problem in Microcontroller integration

SigmaDSP & SigmaStudio vnadon_B_ING May 14, 2015 00:00 6 replies Original on forum ↗
Subscribe
vnadon_B_ING Question
May 14, 2015 00:00

Hi,

I have a problem with the Feedback module. I get some weird behavior of my algorithm only when I integrate it in my microcontroller. When I test it in SigmaStudio everything is fine.

I have 3 Feedback modules in this DSP, only 1 of them causes real problems (see Fb4 in the following post https://ez.analog.com/message/186955#186955). When this Feedback module is in the design the value I read using a DSP readback is wrong, even if this DSP readback is not directly connected to the Feedback module.

I really need the Feedback module causing the problem since it is crucial in my algorithm design...

Audio Signal Processors

adau17xx

micro controller

feedback_loop

SigmaDSP Audio Processors

adau1761

Show More

ADIApproved Reply
May 14, 2015 00:00

HI Vincent:

I have a feeling that you might not be clearing the memory on the part when you first initialize the part and the feedback is causing for the algorithm to blow up. Please consider writing 0 to all memories in the parameter space before running the code.

Regards

Miguel

vnadon_B_ING Reply
May 19, 2015 00:00

Hi,

I don't understand how to do this. Do you mean writing 0x00, ..., 0x00... to all addresses in my DSP, and then write the good parameter values back in for each block? Using the SIGMA_WRITE_REGISTER?

example:

ADI_REG_TYPE Nx4_0[4] = {0x00, 0x00, 0x00, 0x00};

SIGMA_WRITE_REGISTER_BLOCK(DEVICE_ADDR_IC_3, MOD_EXTRACT_ALGO_NX1_3_2_ALG0_STAGE0_MONOSWITCHNOSLEW_ADDR, 4, Nx4_0);

...

I noticed that my Division block (which is located in one of the Feedback paths) has some values = 15.99 which could make the Feedback blow up...

Could you explain me what is these values mean? Do they represent an input value of the division or just some coefficient inside the division block?

/* Module x/y 2 - Divide*/

#define MOD_BOARD3_XY2_COUNT 33

#define MOD_BOARD3_XY2_DEVICE "IC3"

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB20_ADDR 84

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB20_FIXPT 0x07FFDF3B

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB20_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(15.999)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB20_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB21_ADDR 85

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB21_FIXPT 0x07FFDF3B

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB21_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(15.999)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB21_TYPE SIGMASTUDIOTYPE_FIXPOINT

...

...

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB218_ADDR 102

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB218_FIXPT 0x07FFDF3B

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB218_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(15.999)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB218_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB219_ADDR 103

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB219_FIXPT 0x04000000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB219_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(8)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB219_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB220_ADDR 104

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB220_FIXPT 0x02000000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB220_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(4)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB220_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB221_ADDR 105

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB221_FIXPT 0x01000000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB221_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(2)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB221_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB222_ADDR 106

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB222_FIXPT 0x00800000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB222_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB222_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB223_ADDR 107

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB223_FIXPT 0x00400000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB223_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.5)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB223_TYPE SIGMASTUDIOTYPE_FIXPOINT

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB224_ADDR 108

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB224_FIXPT 0x00200000

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB224_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.25)

#define MOD_BOARD3_XY2_ALG0_DIVISIONALGDB224_TYPE SIGMASTUDIOTYPE_FIXPOINT

...

...

Thanks for helping!

ADIApproved Reply
May 19, 2015 00:00

HI Vincent:

It's just a coefficient. I guess you are right. Before clearing the memory, try reading back the parameter values to see if all the values are correctly written when using the uC.

In other words, Write the parameters and programs from the uC. Disconnect the uC (if possible). Connect USBi and read back all content.

This will most likely tell you what's different.

You probably already tried this right?

Miguel

vnadon_B_ING Reply
May 19, 2015 00:00

Hi Miguel,

You probably already tried this right?

No actually I didn't. I cannot really disconnect the uC per say, but I do can switch the SDA and SCL pins so that the USBi has control after programming the DSP. But then will SigmaStudio read the values from the DSP without recompiling+Downloading?

I will try to see.

Thanks,

Vincent

vnadon_B_ING Reply
May 19, 2015 00:00

Okay so I tried your trick (thanks a lot BTW it is very useful and I never thought of it...)

Here are my results, they match the behavior I get when downloading the code from the uC and using the uC solely. I also tried downloading with SigmaStudio and then reading with the uC and everything reads well. So the problem really comes from when I download the code from uC to DSP.

Here is a figure to explain a bit:

63b2de2d510acfa0c35faf41aa007e1e.png
63b2de2d510acfa0c35faf41aa007e1e.png
63b2de2d510acfa0c35faf41aa007e1e.png-620x399.png
63b2de2d510acfa0c35faf41aa007e1e.png-620x399.png
EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin