Post Go back to editing

Using ESP32 as control interface for ADAU1466.

Thread Summary

The user is setting up an ESP32-WROOM to control an ADAU1466 DSP via SPI for parameter updates like volume and EQ. The solution involves connecting the ESP32 to the DSP's slave control port (SS to Pin 33, SCLK to 31, MOSI to 32, MISO to 30) and toggling SS three times at startup to enter SPI mode. For parameter control, the user should use the subaddress from SigmaStudio's Capture Window and ensure the correct memory page is selected. The user confirmed successful volume control after stabilizing the SPI connection and switching to the correct set of pins on the board.
AI Generated Content
Category: Software
Product Number: ADAU1466
Software Version: SigmaStudio 4.7

Hi all,

I’m trying to set up an ESP32-WROOM as a microcontroller interface to my ADAU1466 so I can send parameter updates (volume, EQ, etc.) and eventually add rotary encoders and a display.

I’m unsure how to properly wire the control port and configure the Master Control Port block in SigmaStudio for ESP32 communication.

Current setup:

  • DSP: ADAU1466 (MediaWorx dev board)

  • Audio in: XMOS XU316 (USB → I²S)

  • Audio out: dual PCM5102A DACs

  • MCU: ESP32-WROOM (3.3 V logic, USB to PC for now)

  • Goal: MCU to send control data (e.g. volume, filters) via I²C or SPI

Questions:

  1. What are the exact wiring connections for I²C or SPI between ESP32 and ADAU1466 (SDA/SCL or MOSI/MISO/SCLK/CS, plus any required WP/ADDR pins)?

  2. How do I configure the Master Control Port block in SigmaStudio so the ADAU1466 accepts control from the ESP32 instead of the USBi?

  3. Once wired, what’s the correct register write flow (addressing, safe-load, or direct parameter write) for simple control changes?

  4. Any known working examples (recent) of an MCU or ESP32 writing to ADAU1466 parameters via I²C or SPI?

Any wiring diagrams, SigmaStudio setup screenshots would be a huge help.

Thanks,
Zac

  • Hello Zac,

    I don't think you need master control port configuration with your application, The master control port is used to program other peripherals like DAC, ADC, self-boot EEPROM, SPI flash etc. The master control port will always be master to its peripheral devices.

    The MCU will be connected to the slave control port of the DSP where the DSP is always slave.

    To program/control the DSP or to access the DSP parameters in runtime, you have to use the slave control port. The USBi (sigma studio) or MCU will use the slave control port for accessing the DSP parameters. I hope the difference is clear now.

    What are the exact wiring connections for I²C or SPI between ESP32 and ADAU1466 (SDA/SCL or MOSI/MISO/SCLK/CS, plus any required WP/ADDR pins)?

    You will have to connect your MCU to the same port where your USBi module was connected. I hope you will be using the same protocol, which is either I2C or SPI.

    pin 30-33.

    The SPI and I2C pins are muxed. When powering up, the slave control port is in I2C by default. If you want SPI, then you will have to toggle the SS line three times to put the slave port into SPI (refer the slave control port for more info)

    If you are using SPI, then connect four SPI pins from your MCU to the DSP's SPI pins (just like how your USBi is pysically connected to the DSP in SPI)

    If you are using I2C, then connect the SCL and SDA pins from your MCU to the DSP's SCL and SDA pins  (just like how your USBi is pysically connected to the DSP in I2C)

    If you are using I2C, then the ADDR0 and ADDR1 will decide the device address. By grounding or connecting them to IOVDD will give you different address combinations. Refer I2C addressing page in the datasheet for more info. Make sure you have a 2.2K pull up resistors on the I2C line.

    How do I configure the Master Control Port block in SigmaStudio so the ADAU1466 accepts control from the ESP32 instead of the USBi?

    As I mentioned above, you will be connecting to the slave control port.

    Once wired, what’s the correct register write flow (addressing, safe-load, or direct parameter write) for simple control changes?

    So, you are going to boot the DSP from the MCU or the USBi will program the DSP from Sigma studio first, and then once the DSP is running, you will connect the MCU and have to control it from the MCU (adjusting filter parameters etc.)?

    To control gain (volume or mutes) in runtime doesn't need any safeload procedure with these sigma3xx DSPs, but if you are changing a filter parameter then you will have to safeload the filter coefficients.

    1. Any known working examples (recent) of an MCU or ESP32 writing to ADAU1466 parameters via I²C or SPI?

    Any wiring diagrams, SigmaStudio setup screenshots would be a huge help.

    This page will give you some more info on how to interface MCU with sigmaDSPs.

    I will also send you some example codes in a while. Please let me know which protocol you are using.

    If I have missed something or if my explanation is not clear, then feel free to reach out.

    Regards,

    Harish

  • Thanks, Harish.

    I’m on SPI. Wiring is SS→Pin 33, SCLK→31, MOSI→32, MISO→30 on the ADAU1466 (3.3 V logic). I toggle SS three times at startup to force SPI mode.

    Problem: I can’t hit the correct parameter address for my volume knob. Every read of that parameter returns 00 00 00 00, even while turning the encoder. The same control moves audio correctly from SigmaStudio, so the block works. Bus reads/writes to other registers succeed, so SPI comms are fine. This looks like an address or page-mapping issue.

    Can you confirm the correct workflow?

    1. In SigmaStudio, move the knob and capture the transaction in Capture Window. Is the subaddress shown there the exact one my MCU should use 1:1?

    2. For parameters in the upper memory page, should I set SECONDPAGE_ENABLE (0xF899) before the write and clear it after?

    3. For gain/mute, is it valid to write the raw 32-bit value directly (MSB first) without using safeload?

    4. Are the exported addresses in the *.params or *_PARAM.h files core addresses that need to be translated, or already the final slave-port subaddresses?

    5. Any SPI timing details that could cause consistent 00 00 00 00 reads?

    This is what I read in the Param File for the Volume Slider I am trying to adjust. 

    /* Module Master Volume - Single Volume*/
    #define MOD_MASTERVOLUME_COUNT                         2
    #define MOD_MASTERVOLUME_DEVICE                        "IC1"
    #define MOD_MASTERVOLUME_ALG0_TARGET_ADDR              65
    #define MOD_MASTERVOLUME_ALG0_TARGET_VALUE             SIGMASTUDIOTYPE_8_24_CONVERT(1)
    #define MOD_MASTERVOLUME_ALG0_TARGET_TYPE              SIGMASTUDIOTYPE_8_24
    #define MOD_MASTERVOLUME_ALG0_TARGET_MEMORYPAGE        0
    #define MOD_MASTERVOLUME_ALG0_SLEW_MODE_ADDR           66
    #define MOD_MASTERVOLUME_ALG0_SLEW_MODE_FIXPT          0x0000208A
    #define MOD_MASTERVOLUME_ALG0_SLEW_MODE_VALUE          SIGMASTUDIOTYPE_INTEGER_CONVERT(8330)
    #define MOD_MASTERVOLUME_ALG0_SLEW_MODE_TYPE           SIGMASTUDIOTYPE_INTEGER
    #define MOD_MASTERVOLUME_ALG0_SLEW_MODE_MEMORYPAGE     0


    If helpful, I can post the Capture Window sequence for that knob change to compare.

    Thanks,
    Zac

  • After spending most of the day stabilizing my SPI connection, I realized my board has a separate set of MOSI, MISO, SCLK, and CS pins. As soon as I switched to those, the SPI link verified successfully, and I now have full volume control working smoothly from the ESP32 to the ADAU1466.

    Next, I plan to add more rotary encoders to control highs, mids, and lows, and to A/B test crossover configurations. If anyone has suggestions for other practical ways to use the MCU to expand real-time control of the ADAU1466, I’d appreciate your input.

  • Hello Zbotnik

    I am working with similar requirement, could you help me in providing more details on how t mange volume/mite controls from external MCU ?