This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TAS5707: I2C Init sequence

Part Number: TAS5707

Hello everybody,

i'm trying to setup my TAS5707 board without the PSIA interface board from the eval kit.

By now, i'm struggeling to initialise the TAS5707 from an AVR via I2C. The I2C is tested working, so sending bytes should work. The device address is set to 0x36.

I implemented the init sequence from the datasheet, so that is my simplified code:

//wait 50ms
delay_ms(50);
	
//Trim oscillator (write 0x00 to register 0x1B)
out_buffer[0] = TRIM_OSC;
out_buffer[1] = 0x00;
i2c_write(DEVICE_ADDRESS, out_buffer);
	
//wait 100ms
delay_ms(100);
	
//Exit shutdown sequence (write 0x00 to register 0x05)
out_buffer [0] = SYSCTRLREG2;
out_buffer [1] = 0x00;
i2c_write(DEVICE_ADDRESS, out_buffer);

//wait 50ms
delay_ms(50);

//Set master volume (write 0x00 to register 0x07)
out_buffer [0] = MASTER_VOL;
out_buffer [1] = 0x00;
i2c_write(DEVICE_ADDRESS, out_buffer);
	
//wait 50ms
delay_ms(50);

Before I go on debugging the system, can you please verify if that procedure is sufficient for playing audio. The data format, clock setting etc. are the same as the default values which are set.

Greets Markus

  • Hi Markus,

    Did you measure the PWM output on device? If the PWM is switching, the device is iniatiazed successfully. You could use TAS5707 EVM to generate the cfg file during power-up initialization, and use it for your MCU programming. After the initialization, you can find the cfg file in this location X:\Program Files (x86)\Texas Instruments Inc\TAS570X GDE\ProcessFlows\TAS5707\diagnostics.cfg. Don't forget to enlarge the volume after the initialization.

    Another thing you need to check is the status of digital control pins(e.g. PDN, RESET...). Please make sure they are following the Figure 36 in the datasheet during the power-up sequence.

    Best regards,

    Shawn Zheng

  • Hi Shawn,

    I checked the PWM output yet. There is nothing happening, that's why I concluded it has to be an initialisation problem.

    I'm getting power and I2S audio data from the Interface-Eval Board (MC57xxPSIA). If I connect the pinheaders 1:1 everything is working fine. But if I connect the SCL, SDA and a GND to my microcontroller board to do the selfprogrammed init it's not working (pull-ups for the I2C bus are installed).

    I tried the config file (export from the TAS570X GDE after initialising the board) as well, but in those files quite a few registers are set to the default values, which is just senseless additional work. So I tried to filter which steps of the init are important. That led me to ask the question of the first post, if the init sequence showed in this peace of code is enough. When I understood the datasheet right, the code fulfills all required steps as described in the chapter "Initialization Sequence". Actually something must be missing in the init process, otherwise it would be working.

    Short example files for initialising those devices would not be much work for TI, but a big help for everyone working with the amp chips.

    Kind regards,

    Markus

  • Hi Shawn,

    it's me again. I solved the problem on my own.

    I implemented the init sequence on an Arduino Uno for easy testing and did some try&error.

    There is a big problem in the I2C world: often datasheets speak from a 7-bit address. Of course the address is one byte (so 8 bit) long. This leads to problems automatically. Also it's often unclear if the I2C driver on your system does a shift to the right or not.

    Example:
    The datasheet of the TAS5707 says: "The 7-bit address for TAS5707 is 0011 011 (0x36)." 
    0011 011 = 0x1B
    0x36 = 0011 0110
    I think you see what I'm getting at.
    That would be the correct formulation: The 7-bit address for TAS5707 is 0011 011 or the 8-bit address is 0x36.

    The init sequence I showed as code in the first post is correct. It's just necessary to initialise those 3 registers (OSC trim, Sys CTRL 2 and Master Volume (all with 0x00)). The rest stays on default config.

    Well, problem is solved, thanks for your quick support.

    Kind regards,

    Markus

  • Hi Markus,

    Great! I'm glad that your borad is working normally now. Some other customers also have this concern about I2C address, I will think about revising the datasheet.

    Best regards,

    Shawn Zheng