This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] TLV320AIC CODECs and ADCs: How to change a coefficient dynamically without MCU interaction

Is it possible to dynamically change coefficients without MCU interaction?

  • You can indirectly address a coefficient location by using the Basic DSP > AddCoef component.

    Example: it is desired to use a signal in the process flow to control an FIR filter tap.

    1. Convert the signal data from data memory (D-RAM) into coefficient memory (C-RAM) using Basic DSP > Data to Coef component.
    2. Place a Basic DSP > Constant Coef component and set its value to 0.
    3. In AddCoef component, set InputCoefName1 as D_to_C_1_Coefval. Note that the prefix depends on the name of the component you placed.
    4. In AddCoef component, set InputCoefName2 as C_1_Coefval. The prefix depends on the name of the component.
    5. In AddCoef component, set OutputCoefName as FIR_1_Coeff0. The last number corresponds to the tap #. Note that the prefix is the component name.

    If not sure about the coefficient names, save and compile the process flow. The newest PPS version allows you to obtain coefficient names by selecting View > Source Code. This window will provide names that can be used for indirect addressing. 

    miniDSP_D Exported Coefficients

    ===============================
    Name Address I2C 
    ---------------------------------------- ------- ------------------
    C_1_Coefval 0x0011 [0x50][0x01][0x4C] 
    D_to_C_1_Coefval 0x0010 [0x50][0x01][0x48] 
    FIR_1_Coeff0 0x0000 [0x50][0x01][0x08] 
    FIR_1_Coeff1 0x0001 [0x50][0x01][0x0C] 
    FIR_1_Coeff10 0x000A [0x50][0x01][0x30] 
    FIR_1_Coeff11 0x000B [0x50][0x01][0x34] 
    FIR_1_Coeff12 0x000C [0x50][0x01][0x38] 
    FIR_1_Coeff13 0x000D [0x50][0x01][0x3C] 
    FIR_1_Coeff14 0x000E [0x50][0x01][0x40] 
    FIR_1_Coeff15 0x000F [0x50][0x01][0x44] 
    FIR_1_Coeff2 0x0002 [0x50][0x01][0x10] 
    FIR_1_Coeff3 0x0003 [0x50][0x01][0x14] 
    FIR_1_Coeff4 0x0004 [0x50][0x01][0x18] 
    FIR_1_Coeff5 0x0005 [0x50][0x01][0x1C] 
    FIR_1_Coeff6 0x0006 [0x50][0x01][0x20] 
    FIR_1_Coeff7 0x0007 [0x50][0x01][0x24] 
    FIR_1_Coeff8 0x0008 [0x50][0x01][0x28] 
    FIR_1_Coeff9 0x0009 [0x50][0x01][0x2C]