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

Using the the ADAU1401 with an I2C Master

SigmaDSP & SigmaStudio Sarmadh Feb 11, 2010 00:00 5 replies Original on forum ↗
Subscribe
Sarmadh Question
Feb 11, 2010 00:00

I'm really new to Sigma DSP! I'm researching the possibility of using the ADAU1401 in an application where the ADAU1401 is booted and controlled by a microcontroller utilizing the I2C control port.

I'm a little foggy on how to configure the system such that the ADAU1401 program RAM is booted from the micro through the I2C port. The available documentation seems to describe Self-boot operation from an EEPROM adequately, including how to generate a production ready file and load it on the Self-boot EEPROM. However, I couldn't find much info in regard to booting from an I2C host micro. The ADAU1401 datasheet shows an I2C control schematic, And I know how to build an application using the Sigma DSP software and download an Executable to the ADAU1401, but I'm not really clear on how to generate a production ready file and load it to the host micro EEPROM.

Can you provide me with guidance (App notes, etc.) on this subject!

Audio Signal Processors

adau1401

SigmaDSP Audio Processors

ScottM Reply
Feb 12, 2010 00:00

Programming and controlling the SigmaDSP with a uC (microcontroller) is not a simple task. That's what the self boot mode is for.

A hybrid approach where you self boot, then use a uC to modify parameters as needed, is the next easiest way to go. Full control by a uC requires lots of programming inside the uC. I believe I saw here, Analog is attempting to offer some further help on the uC side. But with many, many options in uC and software, what they may eventually offer, will still be quite limited.

I believe most all uC companies do provide some software frameworks for device drivers for their parts. Microchip, Atmel, etc. But lots of software is still required to get a working system.

The self boot mode, with the use of the GPIO's for control, is still quite capable and doesn't require 100's+ hours of programming.

Good luck!

ADIApproved Reply
Feb 12, 2010 00:00

SigmaStudio includes a few tools and functions to ease the transition of your design from the project file to your microcontroller implementation. First of all, every time you compile your project, SigmaStudio generates hex files that include your program data. These files can be included in your microcontroller code development to be loaded at run time. You can also use the "Export System Files" function to generate files of the project's parameter settings, which can again be used by your micro.

The sequence window is another tool that's useful for generating a sequence of register, program, and parameter writes to the SigmaDSP target board. It's operation is well-described in another thread on this forum: https://ez.analog.com/message/4122#4122

Finally, SigmaStudio can generate C header files that you can use to get started with your microcontroller code. These are useful to ease the transition in development to assign useful names to parameter values and registers.

rong Reply
Feb 15, 2010 00:00

That's how we use our ADAU1445, i.e. having a MIPS cpu as a I2C master to initialise and load the DSP. I even did a SPI version for AD1940 but the idea is quite similar. I remember I started from the SigmaStudio Help file, the chapter is "Using SigmaStudio", in particular "System Implementation" is exactly what you are after. It's about using the SPI interface, but again the idea is same.

There are a few other things you need to watch out for. First all of, you need to initialise ADAU1401 yourself, i.e. all the registers. The SigmaStudio GUI can help you generate all these, but you need to load them all into proper locations. I did it in a hard way - initialise all the interfaces, e.g. serial I/O, clock setting, routing, ASRC and etc. one by one as described in the data sheet. It took me more time, but it did give me a thorough overview how each interface is configured and how they are related to each other, which was also how I discovered a few discrepancies between the data sheet and the real device. To do so, you need to implement I2C read/write function that is capable of handling different register lengths.

Then you need to load proper program file and parameter file in to the dsp, which you can get by doing “Export System Files” in SigmaStudio. I wrote a user application to allow me load those files at any time, which is quite handy. If you use clickless version (slew) components in your dsp projects, you may also need to initialise the DSP DATA RAM as oppose to just clearing it. This wasn't required for AD1940 when I was using the old SigmaStudio version, but apparently required in the current SigmaStudio version.

You will also need application to adjust DSP parameters, such as volume control, mute and etc. You need to look up the parameter addresses in the exported c header file. Some components need more than one parameter, for which you may need to implement safeload function to load the parameters. The data sheet has all the information about it should be implemented. One annoying thing when you doing so is the DSP parameter addresses are not fixed, if you make some change to the dsp project, all the addresses become different, which means you can't hard-code those addresses in your application. Storing them into a configuration file might be one solution for it.

Hope this would be helpful.

Sarmadh Reply
Feb 15, 2010 00:00

Thanks everyone, that's very helpful. I think what I may elect to do is build the system architecture so that I can do Self-boot from an EEPROM and direct GPIO control in the short run, but also be able to implement full I2C control down the road. It certainly seems doable, but I can probably cut down development overhead significantly by resorting to self-boot and allowing myself enough time to implement I2C Master control later on.

oceam2 Reply
Feb 22, 2020 00:00

When use ADAU1701 or ADAU1401 (at software level identical) use this I2C address

/* 7-bit i2c addresses */
#define DSP_I2C_ADDRESS (0x68 >> 1) & 0xFE
#define EEPROM_I2C_ADDRESS (0xA0 >> 1) & 0xFE

to communicate externally. I recomend Sigma-DSP Master library.

Regards