Post Go back to editing

External BCLK, Frame Sync and Data to DAC

Category: Software
Product Number: ADAU1962
Software Version: CCES 2.10.1

Hello everyone,

I m trying to run the example project 'Audio_Talkthrough_TDM', in Analog Devices\EV-SC59x_EZ-KIT-Rel3.2.0\EV-SC59x_EZ-KIT\Examples\drivers\adc\Audio_Talkthrough_TDM

I am connecting EV-SOMCRR-BROUT between SC21594 and SOMCCR-EZKIT

My question is:

I would like to give DAC (ADAU1962) my own Bit clock, frame sync and data via pins on EV-SOMCRR-BROUT, 

with SRU and DAC config setting as below :

struct Config_Table Config_array_DAC[28] = {
{ ADAU1962_PDN_CTRL_1, 0x00},
{ ADAU1962_PDN_CTRL_2, 0xff},
{ ADAU1962_PDN_CTRL_3, 0x0f},
{ ADAU1962_DAC_CTRL0, 0x01},
{ ADAU1962_DAC_CTRL1, 0x44},
{ ADAU1962_DAC_CTRL2, 0x04},
{ ADAU1962_DAC_MUTE1, 0x0},
{ ADAU1962_DAC_MUTE2, 0x00},
{ ADAU1962_MSTR_VOL, 0x00},
{ ADAU1962_DAC1_VOL, 0x00},
{ ADAU1962_DAC2_VOL, 0x00},
{ ADAU1962_DAC3_VOL, 0x00},
{ ADAU1962_DAC4_VOL, 0x00},
{ ADAU1962_DAC5_VOL, 0x00},
{ ADAU1962_DAC6_VOL, 0x00},
{ ADAU1962_DAC7_VOL, 0x00},
{ ADAU1962_DAC8_VOL, 0x00},
{ ADAU1962_DAC9_VOL, 0x00},
{ ADAU1962_DAC10_VOL, 0x00},
{ ADAU1962_DAC11_VOL, 0x00},
{ ADAU1962_DAC12_VOL, 0x00},
{ ADAU1962_PAD_STRGTH, 0x00},
{ ADAU1962_DAC_PWR1, 0xaa},
{ ADAU1962_DAC_PWR2, 0xaa},
{ ADAU1962_DAC_PWR3, 0xaa},
{ ADAU1962_PDN_CTRL_2, 0x00},
{ ADAU1962_PDN_CTRL_3, 0x00},
{ ADAU1962_DAC_CTRL0, 0x18}

void SRU_Init()
{
*pREG_PADS0_DAI0_IE=0xfffff;
*pREG_PADS0_DAI1_IE=0xfffff;

//--------------------------------try------------------------------------------

// external BCLK on pin 16

// external FS on pin 17

// data on pin 18

SRU2(HIGH, DAI1_PBEN05_I);
SRU2(HIGH, DAI1_PBEN04_I);
SRU2(HIGH, DAI1_PBEN01_I);

SRU2(DAI1_PB16_O, DAI1_PB05_I); /*send clock to DAC */
SRU2(LOW, DAI1_PBEN16_I);


SRU2(DAI1_PB17_O, DAI1_PB04_I); /*send FS to DAC */
SRU2(LOW, DAI1_PBEN17_I);


SRU2(DAI1_PB18_O, DAI1_PB01_I); /*send data to DAC without SPORTA*/
SRU2(LOW, DAI1_PBEN18_I);

}

I got audio output on J17 but with periodic pop noise.

Is there anything wrong in my SRU route or ADAU1962 config ?

Thank you very much.

  • Sorry I got it, need to config PLL_CLK_CTRL1 to used PLL to avoid jitter

  • Hello Ziit,

    I cannot help you too much with the SHARC part of your project but I can help with the ADAU1962A DAC. 

    The pin numbers you mentioned must be for the SHARC because it does not make sense to have BCLK on pin 16.

    That is a power pin.

    I do want to ask you what are you sending into the master clock MCLKI pin of the DAC? 

    This needs to be locked to the LRCLK and BCLK signals. They need to be derived from the same master clock. 

    That would cause clicks and pops for sure. Or just the audio muting from time to time. 

    Dave T

  • Hi Dave,

    Thank you for your reply. 

    Yes, the pin16 that I mentioned in my SRU routine is a pin for SHARC.

    Actually, I have my own bit clock, frame sync and data, I sent them physically to some available pin in DAI1 zone via BRKOUT.

    bit clock  to pin 16

    frame sync to pin 17

    data to pin 18

    So now I have bit clock, frame sync and data on Pin 16, Pin 17 and Pin 18,

    Then, I was using SRU2 function to give bit clock, frame sync and data to DAC trough corresponding pins for DAC. (Pin 05 for bit clock, Pin 04 for frame sync and Pin 01 for data ). It means that different from the original SRU routine in the example code, DAC is on Target mode to receive bit clock sent by me and data for DAC input is now no more from SPORT4A but directly from me (by using SRU2(DAI1_PB18_O, DAI1_PB01_I); /*send data to DAC without SPORTA*/) .

    To make this, I change some value in ADAU1962 configuration to let AC be in Target mode. 

    Normally I will hear my signal output from J17 Jack on SOMCRR. I actually did but there is jitters in output signal. 

    I check many documents on ADAU1962, SC459 and SOMCRR, find out that on Bit 0 of ADAU1962_PLL_CTL_CTRL1, we could coose 0 or 1 to let DAC clock select MCLK from PLL or from MCLKI. Known that one of the advantage of  MCLK from PLL is to avoiding jitters, so I set this value to 0 (it was 1 in original example code). And indeed, with this value being 0, I have no more jitters in my output signal (with the same SRU routine).

     

    If you have any comments, don't hesitate Slight smile

    Thank you very much Dave

  • Hi Dave,

    Thank you for your reply. 

    Yes, the pin16 that I mentioned in my SRU routine is a pin for SHARC.

    Actually, I have my own bit clock, frame sync and data, I sent them physically to some available pin in DAI1 zone via BRKOUT.

    bit clock  to pin 16

    frame sync to pin 17

    data to pin 18

    So now I have bit clock, frame sync and data on Pin 16, Pin 17 and Pin 18,

    Then, I was using SRU2 function to give bit clock, frame sync and data to DAC trough corresponding pins for DAC. (Pin 05 for bit clock, Pin 04 for frame sync and Pin 01 for data ). It means that different from the original SRU routine in the example code, DAC is on Target mode to receive bit clock sent by me and data for DAC input is now no more from SPORT4A but directly from me (by using SRU2(DAI1_PB18_O, DAI1_PB01_I); /*send data to DAC without SPORTA*/) .

    To make this, I change some value in ADAU1962 configuration to let AC be in Target mode. 

    Normally I will hear my signal output from J17 Jack on SOMCRR. I actually did but there is jitters in output signal. 

    I check many documents on ADAU1962, SC459 and SOMCRR, find out that on Bit 0 of ADAU1962_PLL_CTL_CTRL1, we could coose 0 or 1 to let DAC clock select MCLK from PLL or from MCLKI. Known that one of the advantage of  MCLK from PLL is to avoiding jitters, so I set this value to 0 (it was 1 in original example code). And indeed, with this value being 0, I have no more jitters in my output signal (with the same SRU routine).

     

    If you have any comments, don't hesitate Slight smile

    Thank you very much Dave

  • Hello Ziit,

    I need to know what are you sending into the MCLKI pin of the DAC? 

    What frequency?

    Is that clock being divided down to also produce the BCLK and Frame Sync by the SHARC? 

    If you bypass the PLL then the signal coming into the MCLKI pin needs to be 512x fs. 

    Dave T

  • Hello Dave,

    I'm sending 

    Bit Clock to PIN16 then 12,288,000Hz

    Frame sync to PIN17 48KHz

    Then I send them to DAC and SPORT by using my SRU routine

    Than you very much,

    Ziit

  • Hello Ziit,

    Can you please refer to pin numbers of the DAC. I do not support ANY of the SHARC products. So I have no idea what an SRU routine is. I need to know what signals are on the DAC pins and I need you to use the DAC pin numbers. 

    If you are sending bitclock to pin 16 then that is very wrong. Pin 16 is the power pin for the PLL.

    It needs to be 2.5V DC. 

    If you are sending frame sync to pin 17? What is the format of the frame sync? 50/50 duty cycle or pulse? 

    What components are you using for the loop filter connected to the LF pin?

    Dave T