Post Go back to editing

Changing DC input entry value from MCU (ADAU1451)

Hi, 

I am new to using DSP, so sorry if my terms are not correct.
I can not get a selectable index filter two work, when running the DSP program from the MCU. 
When I run the DSP program through the debugger it works fine. 
I have no problem changing switches and adjusting gain from the MCU. 

Below you see a part of the program. 

The code I use on the MCU is something like this:

uint8_t data[4] = {0, 0, 0, value};
dsp_WriteDataI2C(ADAU145X_LFBLOCKSELECT_ADDRESS[0], data, sizeof(data));

When I read back, the value on the address ADAU145X_LFBLOCKSELECT_ADDRESS[0] is correct and corresponds to what I read back, when using the PC to run the program.

What am I missing?

  • Hi Molgaard,

    It is helpful to know that you can already change switches and gain cells from the MCU, this rules out a variety of hardware issues.

    First I would like to double check that you are using a USBi as the debugger, is that correct?

    Without seeing the rest of your microcontroller code it is difficult to debug what may be happening here. It looks like you may be dereferencing the address incorrectly. I would think you want to use this instead:

    dsp_WriteDataI2C(ADAU145X_LFBLOCKSELECT_ADDRESS, data, sizeof(data));

    Best regards,

    Joshua

  • Hi JoshueaB

    Thanks for your reply. 
    I actually thought, that i succeeded in deleting the topic.
    I figured out the issue. I was not downloading the memory section DM1, where the filter coefficients supposedly resides. When I also downloaded that, it runs the same perfectly. 
    The 'ADAU145X_LFBLOCKSELECT_ADDRESS' is actually an array of addresses (bad naming), so that is why I do need to dereference the way I do. 
    I do not believe it has a lot of relevance for others, that is why I tried to delete the topic.

    Best regards