AnsweredAssumed Answered

ADAU1452 Filter control/parameters

Question asked by holoadri on Aug 22, 2016
Latest reply on Aug 24, 2016 by holoadri

I'm using a general 2nd order filter (with automaticcalculated coefficients) block on Sigmastudio 3.13. On this block I'm able to select the filter type. Among filter types of interest for my project I have Parametric, since I want to build a parametric EQ controled via software UI updating the required parameters (Q, frequency, gain, etc.) . I have following questions /comments/ bugs reports. 

  1. It is not quite clear which filter types are accepted into the filter block "General 2nd Order with Coefficient Calculation". According to this Wiki link, only LowPass/Highpass/BandPass/BandStop filters are accepted, but according to this other one, all possible types of general 2nd order filter are accepted (Parametric, Shelving, General High-Pass, General Low-Pass, General Band-Pass, General Band-Stop, Butterworth Low-Pass / High-Pass, Bessel Low-Pass / High-Pass, All-pass, Peaking and Notch)
  2. Compiling and downloading the project to the DSP is successfully done, nevertheless the module does not seems to work properly, since changes on gain does not update gain on the filter. Considering the parameters window of the 2nd order filter, which are also common to General 2nd Order with Coefficient Calculation block:

    Behavior on 2nd order filter is following:

    - left slider controls filter gain
    - left input box controls center frequency of the filter
    - dial controls Q factor, as well as under-right input box
    - so called "Gain" input box on the uppder right side controls the boost of the filter

    Well, using the General 2nd Order with Coefficient Calculation block and taking a look at the output in capture window I see following registers are updated/controlled: 

    FREQ_DSP_CALC1__

    Q_DSP_CALC1__
    GAIN_DSP_CALC1__
    ONE_BY_FS_DSP_CALC1__
    FILTER_TYPE1__
    INVERT1__
    MEM_SELECTION_DSP_CALC1__
    ADDRESS_DSP_CALC1__

    Behavior of General 2nd Order with Coefficient Calculation block UI controls are following:
    - left slider does nothing, all register remain with same values
    - left input box controls center frequency of the filter via FREQ_DSP_CALC1__ register
    - dial controls Q factor, as well as under-right input box via Q_DSP_CALC1__
    - so called "Gain" input box on the uppder right side controls the boost of the filter via GAIN_DSP_CALC1__. 
    Seems like some naming and concepts were mixed up on the implementation of the UI and the register algorithms. There not seems to be a boost register value and with the  current implementation it is not possible to control filter gain at all. Is there any way to control it? 
  3. Stimuli/Probe Simulation are not working using them on a General 2nd Order with Coefficient Calculation block.
  4. Exporting the project, the generated register names on file *_IC_1_PARAM.h for the General 2nd Oder with Coefficient Calculation block have the same name, and not the proper names displayed on the output console window, which makes it quite inconvenient for including the file on the software (uC) controlling the DSPs. 

    /* Module Master EQ1 - General (2nd order)*/
    #define MOD_MASTEREQ1_COUNT 8
    #define MOD_MASTEREQ1_DEVICE "IC1"
    #define MOD_MASTEREQ1_ALG0_INCREMENT_ADDR 19705
    #define MOD_MASTEREQ1_ALG0_INCREMENT_FIXPT 0x00000040
    #define MOD_MASTEREQ1_ALG0_INCREMENT_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(64)
    #define MOD_MASTEREQ1_ALG0_INCREMENT_TYPE SIGMASTUDIOTYPE_INTEGER
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19706
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_8_24_CONVERT(1)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_8_24
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19707
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_8_24_CONVERT(0)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_8_24
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19708
    #define MOD_MASTEREQ1_ALG0_ON_FIXPT 0x00004B42
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(19266)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_INTEGER
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19709
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_8_24_CONVERT(2.08333333333333E-05)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_8_24
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19710
    #define MOD_MASTEREQ1_ALG0_ON_FIXPT 0x00000001
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(1)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_INTEGER
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19761
    #define MOD_MASTEREQ1_ALG0_ON_FIXPT 0x00000000
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(0)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_INTEGER
    #define MOD_MASTEREQ1_ALG0_ON_ADDR 19762
    #define MOD_MASTEREQ1_ALG0_ON_FIXPT 0x00000000
    #define MOD_MASTEREQ1_ALG0_ON_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(0)
    #define MOD_MASTEREQ1_ALG0_ON_TYPE SIGMASTUDIOTYPE_INTEGER

I hope this was some useful information and please let me know if there is something I'm not using properly. 

Greetings, 

Adrian

Outcomes