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

ADAU1452+2xAD1933 multichannel output

SigmaDSP & SigmaStudio Astron Apr 9, 2021 00:00 6 replies Original on forum ↗
Subscribe
Astron Question
Apr 9, 2021 00:00

Good day.

I needed to get 16 channels of audio output from one source. I plan to use ADAU1452 and two AD1933 chips for this. In the datasheet on ADAU1452 I found a "Flexible TDM Otput" section. Can you please tell me if this data output mode is compatible with AD1933 chips? Is it possible to configure two TDM streams from the Sdata_out2 and Sdata_out3 pins of ADAU1452 so that each one sends its eight channels to its own AD1933 chip?
If so, could you please tell me exactly how to set up Flexible TDM in Sigmastudio for the above conditions? Basic example for understanding the principle. I have not found such examples on the internet.
Thanks in advance.
Sorry for the bad english.

Audio Signal Processors

adau1452

Audio Products

ad1933

Audio D/A Converters

SigmaDSP Audio Processors

Show More

Astron Reply
Apr 10, 2021 00:00

Having studied the datasheets on the ADAU1452 and AD1933 more closely, I clarified some points for myself, and now I can formulate my task more clearly.
The first thing I realized was that I didn't need Flex TDM as such for my task.
The mode of operation of the AD1933 can be configured in SigmaStudio in the AD193x Register Controls tab, in the DAC Control section. We are interested in the Sample Rate items, where the signal sampling rate is indicated, and Serial Format, where the DAC operating mode is selected directly. And here I have some questions. Did I understand correctly: in TDM (Daisy Chain) mode, the first chip receives a TDM stream from DSP through the input pin DSDATA1 (and of course the LRCLK, BCLK and MCLK_IN lines in the case of slave mode, common to both chips of the chain). Further, the TDM stream leaves the DSDATA2 pin of the first chip and is fed to the DSDATA1 pin of the second chip. The first chip processes the first 8 channels, the second the remaining 8 channels. Right? What about Dual-line TDM wiring? There are many register tables and timing diagrams in the AD1933 datasheet, but such an important thing as a visual wiring diagram is mentioned in passing. Did I understand correctly that in Dual-line TDM mode, pins DSDATA4 (data out) and DSDATA3 (data in) are used in addition to DSDATA1 and DSDATA2, which are also connected via the data out chip chain of the first chip to the data in of the second? The only difference is that data is transmitted over two lines at the same time instead of one, as implemented in the previous mode of operation? In the datasheet in Figure 13, at the very bottom, there is a tiny indistinct picture that does not reveal the topic at all. From it it is only clear that the chips are connected by two lines, nothing more. I may have been inconsiderate, but I don't understand this section. In any case, the most practical, in my opinion, connection option for my conditions would be the Daisy Chain mode with one DATA line connecting the DSP and two chips.
Further, since the AD1933 does not have a self boot function, does it have to be configured with an external microcontroller every time it is turned on? This in itself is not a problem. But if several chips with the same configuration are used, as in my case, is it possible to use one SPI interface for initialization, connecting the MOSI lines in parallel and sending data simultaneously? Or is it better to initialize the chips one by one?
Now let's move on to ADAU1452. Unfortunately, from the datasheet for this chip, I understood only the general principles of its functioning, but I absolutely do not understand how to properly configure its operation in SigmaStudio. Previously, I only worked with the ADAU1701, and it is much easier to configure. In the case of an greather chip, the eyes run up from the abundance of settings and registers.
So, we use an I2S device and an SPDIF receiver as input sources. Moreover, an I2S device can be either a master or a slave (most of the ready-made modules often have an uncontested master configuration and cannot be switched to slave mode), so it is required to apply ASRC for both sources.
Please help me with an example for this situation. Data stream input: I2S master device and SPDIF receiver. Data stream output: either two separate TDM8 streams, on a separate line for each AD1933 chip, or a Daisy Chain TDM stream on two series-connected AD1933 chips. I do not know which of the options is better or easier to implement. It is not worth saving the DSP pins of the processor. In the "Schematic" section, simple translation of data from signal input to output. Thanks in advance.

Astron Reply
Apr 11, 2021 00:00

I found a couple more examples on the web. It turns out that it is not necessary to use an external microcontroller for the initial configuration of the AD1933, it can be done by controlling the DSP chip and the memory connected to it. To do this, we use the Master Control Port function in the SigmaStudio project. First, we create a project with AD1933, configure its registers in the "hardware configuration", then create an XML file via the "add to sequence" function in the Capture window. Next, we create a new project with ADAU1452, add the “Master Control Port IO” algorithm to the working field, and connect the previously created XML file to it. Now it will be possible to connect the AD1933 via SPI in parallel with the SPI ADAU1452, using the MOSI and SCLK lines common with the EEPROM chip (we do not need the MISO line, since we only write data to the AD1933, but do not read it, right?) We will also need to configure any of the free MPx pins as a Chip Select output in the Multipurpose / AUXADC section. In the MPx pin function settings item, select "Multipurpose function (MPx)" and in the MPx pin mode item, select "Slave select for the master SPI port". After the rest of the project is created, and the firmware is uploaded to the EEPROM, we need to connect the AD1933 via SPI with three MOSI, SCLK and SS lines (the MPx pin that we chose as it), and now after starting the DSP chip, the DAC chip will also initialize, right? The question remains whether it is possible to connect multiple AD1933s to the SPI in parallel. In theory, it is possible, since we only write data, and the data is the same, and separation into separate chips is not required.
I apologize for writing a lot, I'm just trying to figure out and put all the knowledge on the shelves.

Astron Reply
Apr 12, 2021 00:00

I created a test project to make it clear what exactly I need. Please help to correctly configure the inputs and outputs of the circuit.

Sorry for external links, the function of attaching images and files still does not work on this resource.

unknown.png-320x50.png
unknown.png-320x50.png
DaveThib Reply
Apr 12, 2021 00:00

Hello Astron,

I do not know why the attaching of the project and the PDF is giving you trouble. You did zip up the project but let's continue from here. I did not download the project at the moment. I had an example file that was close and I made an update for you.

This file has an I2S input and SPDIF input. The SPDIF goes through the ASRC. This project is setup to look at the lock register of the SPDIF and mute the audio if it is not locked. You do not have to do this. What this is avoiding is the DC output that the ASRC will output when it has never been locked or when it looses lock. You can replace this with a DC block and that will also work.

Then I setup the two TDM8 outputs.

You are correct that you do not need to use flexible TDM. You also do not need to use the daisy chain feature of the DACs. using that feature would force you to use TDM16 and that will just bring in issues with transmitting the data on your PCB. It can be done but it is more complicated. TDM-8 is much easier to maintain good timing margins of the serial data.

I setup the TDM to be a clock master.

The I2S is also setup to be a clock master. I was not 100% certain when you said you had an I2S master as to which part is the master? So that is just a simple register change that I can walk you through if needed.

Now, one other important details. This I2S device, what master clock is it using? I am talking about the system master clock. Is it the same clock at the 1452? Is the 1452 CLKOUT driving this I2S source?

If the I2S source is on its own master clock then you will need to set the DSP start pulse to be the serial input port. The only little detail if you do that is to understand that if those clocks go away the DSP stops in its tracks until the clock comes back.

Enough for now,

Dave T

ADAU1452 SPDIF Lock Detect TDM8 x2 output.zip

Astron Reply
Apr 12, 2021 00:00

Hello Dave.
Thank you so much for the project file!
I will try to study it thoroughly and ask questions if they appear (for sure it will be so)
About attaching files. There is a small problem with this, and as I understand it, not all users have it. The problem is described here: https://ez.analog.com/how-to-use-engineerzone/f/q-a/535243/how-to-upload-a-picture-in-the-post and as I understand it, its solution while in the process.
As for the source of the I2S signal, I use a debug board based on an STM32 microcontroller, which emulates the operation of a simple USB sound card with a stream output via I2S. This device can operate in several modes: as a master with external and internal synchronization and as a slave. However, in the future, I hoped to try to connect a Bluetooth module as a source of I2S, which has a hard-set output mode as a master with output of own MCLK signal. I was let down by the desire to make a universal project capable of working with input signals in any of these modes. I decided that ASRC is a kind of "magic wand" that can enable the DSP chip to receive and recognize any signal. Now I understand that this is not the case.
Thanks again for the project, I have to ponder this information for a while.
Best regards, Astron

DaveThib Reply
Apr 12, 2021 00:00

Hello Astron,

Most of those sources do not allow having all signals on the same master clock. So you have two choices. One would be to use the "magic wand" ASRC or to have the DSP program run at the rate of the incoming serial port. As I said before the issue is if the clocks go away the DSP stops running the program. I wish there was a way to capture this and change the setting of the DSP Start Pulse but if the DSP is not running then the DSP cannot make changes. Now, your micro can do this but it gets bit more complicated. You would need to setup a heartbeat from the DSP that the micro can sense. Then if the heartbeat stops the micro can change the register setting to an internal clock source. This only needs to be done if you do not want to use the ASRC.

Regarding the upload problem. The management of the forum is aware and is working on it.

Dave T