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.

Generate config file for TAS5754M

Other Parts Discussed in Thread: TAS5754M

Hi,

I'm trying to set up a TAS5754M in my own PCB but I don't have any EVM. Do I need it to generate a config file even if I want to upload it manually? Should I hear any sound with the default configuration?

Best regards,

Xabi.

  • Hi Xabi,

    Yes. Normally you need to download a config file via i2c to initialize the TAS5754M device since it has an embedded miniDSP inside. Besides, this device is able to support 10 different process flows (HybridFlow). Are you working on any of those flows? Basically each flow requires different configurations, such as Biquad, DRC and DDE.

    Andy
  • Thanks for the answer.

    Yes, I plan to use a HybridFlow and I am aware that I need to initialize it through I2C. Is there any other way to create this file without the evaluation boards?
  • Hi Xabier-san,

    Unfortunately, you would need to use the TAS5754M evm to generate the configuration file since the detail register settings are'nt disclosed for the hybridflow.

    Best regards,
    Kato

  • Thanks Kato-sensei,

    Have you tried to upload the configuration file through I2C with an external MCU? Have you found any difficulties?

    Best regards,
    Xabi.
  • Hi Xabier,

    I can possibly generate a working C header file for you. However, if you want to fine tune some internal parameter, such as Biquad and DRC coefficients, you'd better have a TAS5754/56 EVM because it will be pretty time-consuming to do all the calculations by yourself. The major purpose of the PPC2 GUI and TAS5754/56 EVM is to shorten the evaluation and development cycle of this device.

    Andy
  • Hi Andy,

    We expect to receive our EVM next week so I'd really appreciate if you can generate a headers file for an HybridFlow 3 to test my PCB this weekend.

    Best,
    Xabi
  • Hi Xabi,

    No problem. I will try to give you a working header file by next Monday.

    Andy
  • Hi Xabi,

    If you just want to test your PCB only, you don't even have to download any configuration to the TAS5754M. After it is powered on, it can be used for basic audio playback. To play audio, simply provide a proper SCK, BCK, LRCK and DIN data. The TAS5764M will automatically configure its internal clocking if a supported SCK, BCK and LRCK combination is used.

    Andy
  • Hi Xabi,

    The header file below has been verified by myself. Basically it is HF3 config file with all the default parameters. 

    HF3_burst1.h

    In addition, the code below shows how I download those configurations via i2c in a Cortex-M3 microcontroller.

    example.c
    transmit_registers(registers, sizeof(registers) / sizeof(registers[0]));
    
    void transmit_registers(const cfg_reg *r, int n)
    {
        int i = 0;
        
        while (i < n) 
        {
            switch (r[i].command) 
            {
            case CFG_META_SWITCH:
                printf("CFG_META_SWITCH\n\r");
                // Used in legacy applications.  Ignored here.
                break;
                
            case CFG_META_DELAY:
                printf("CFG_META_DELAY\n\r");
                delay(r[i].param);
                break;
                
            case CFG_META_BURST:
                printf("CFG_META_BURST\n\r");
                i2c_write((unsigned char *)&r[i+1], r[i].param);
                i +=  (r[i].param + 1)/2;
                break;
                
            default:
                i2c_write((unsigned char *)&r[i], 2);
                delay(10);
                break;
            }
            i++;
        }
    }
    

    Andy

  • Thanks Andy,

    Sorry I didn't answer to your previous response. I was digging into the basic audio playback and I think that we are not hearing any sound because we are using an incompatible MCLK frequency. We are trying to configure the PLL now to generate the right frequency. After that I will try your file.

    Best,

    Xabi.

  • Hi Xabi,

    If you tell me your MCLK, BCLK and LRCLK frequencies, I will verify them using my TAS5754 EVM.

    Andy

  • Hi Andy,

    I have LRCLK = 48 kHz, BCLK = 3.09 MHz. The problem is that since our board doesn't have MCLK output we were using BCLK as MCLK too. Correct me if I am wrong but I think that I need at least MCLK = 128*fs whereas with the current configuration I just have MCLK=64*fs.
  • Hi Xabi,

    The TAS5754M can support 3-wire I2S directly. The script below shows how to initialize the TAS5754M device correctly.

    #Go to Page 0
    w 98 00 00
    #Standby request
    w 98 02 10
    #Ignore MCLK detection, Ignore MCLK halt detection
    #0001_1000
    w 98 25 18
    #PLL clock source => BCLK
    w 98 0D 10
    #Standby release
    w 98 02 00

    Andy
  • Hi Xabi,

    I got quite a few e2e issues today and failed to look into your message.

    The header file I gave to you will only work when the MCLK is present.   That's why you saw the invalid clock error.  

    Did you download the PPC2 software GUI from mySecure software in ti.com? After you unzip the downloaded file, make sure you see the file called "plugin_TAS5754M-56MDCAEVM_v2.1_rev35934.ppc2" in the same folder as the installer.

    If the PPC2 is installed correctly, you should see the "TAS5754M-56MDCAEVM" after you launch the PPC2 (See the screenshot below).  

    Besides, PPCMB (Rev. D) can work with the TA5754MEVM. I can double check tomorrow.

    Andy 

  • Hi Andy,

    The MCLK error is produced with the 3-wires configuration you recommended.

    We need the PPCMB to work with our own PCB, not with an EVM. Is this posible with Rev. D? Righ now we can select TAS5754M-56MDCAEVM in the window  "Manual Target Selection" of PPC. However, after plugging in the PPCMB USB to my computer, PPC automatically selects ConfigRunner.

    Maybe this is failing because we don't have properly connected our PCB and the PPCMB. We have SDA, SCL and GND connections. We've also tried adding I2S but no luck yet. Do we need to connect any other line?

    Best,

    Xabi.

  • Hi Xabi,

    I have not tried to make the PPCMB work with a customer board yet.  One challenge is that PPCMB will always try to detect which board is connected to itself by reading the firmware id from the board connected and every TAS5754MEVM has an eeprom to carry its firmware id.  Your board will not be able to be detected since it doesn't have the right firmware id.

    Most of our customers use an TAS5754MEVM to complete the tuning, convert the tuning file to a C header file and then integrate the header file to their firmware.   I would suggest you follow these steps too.

    Andy

  • Hi Andy,

    Ok. We'll order one to tune it. Nevertheless we cannot make the basic playback to work.

    We've followed your steps but we have noticed that P0-R117 has 0x00 all the time (DSP is booting and poweroff). This is strange because P0-R2 has 0x00 (neither poweroff nor standby mode). How come is this possible? Why is DSP not booting?

    We've also noticed that the pin _SPK_FAULT is low and we think we don't have neither overvoltage, nor undervoltage. Also overcurrent is not possible because the pin is low even without a speaker connected. Could you please give us some advice?

    Best,

    Xabi

  • Hi Xabi,

    Follow the steps below and let me know if you still some issues.
    Step 1: Start your 3-wire I2S. Don't play any music. Just send zero data.

    Step 2: Initialize the TAS5754M device with the following script.
    #Go to Page 0
    w 98 00 00
    #Standby request
    w 98 02 10
    #Ignore MCLK detection, Ignore MCLK halt detection
    #0001_1000
    w 98 25 18
    #PLL clock source => BCLK
    w 98 0D 10
    #Standby release
    w 98 02 00

    Step 3: Play some music via I2S.

    Andy
  • Hi Andy,

    We are doing exactly that but we don't hear any sound.

    That results in the two problems I mentioned in the previous post (SPK_FAULT = 0 and P0-R117 = 0x00).

    Best,
    Xabi.
  • Hi Xabi,

    Let me try to figure out what is wrong in your system.

    Andy
  • Hi Andy,

    We've solved the SPK_FAULT problem. It was caused by a bad resistor. However we are still getting P0-R117 = 0x00 with the setup you've proposed us.

    Best,

    Xabi

  • Hi Xabi,

    Was the /SPK_FAULT low when  you got P0-R117 = 0x00? 

    Andy

  • Hi Andy,

    P0-R117 = 0x00 all the time, whether  /SPK_FAULT is low or high.

    Best,

    Xabi.

  • Hi Xabi,

    How about the /SPK_MUTE pin? If that pin is low, TAS5754M will stay in the power down mode.

    Andy
  • Hi Andy,

    No. That pin is high. We've even  tried to toggle it.

    Best,

    Xabi.

  • Hi Xabi,

    Show me the schematic if possible.

    In addition, have you got the TAS5754MEVM? If yes, I can send you a script to enable the external I2S port on the PPCMB. Try to connect your 3-wire I2S to the external I2S port and see if you can duplicate the same issue.

    Andy
  • Hi Andy,

    We've received the EVM today. Can you tell us how to use send an external I2S signal to the PPCMB? What script do we need?

    Best,
    Xabi.
  • Hi Xabi,

    Below is the script you need.

    Enable PSIA.cfg

    Launch the PPC2 GUI and choose the "ConfigRunner". Paste the script above to the right window and click the "Execute" button on the bottom. If everything is OK, you will see "OK" in the output window on the left. 

  • Hi Xabi,

    You can also execute the script that enables the 3-wire I2S in this "ConfigRunner".

    Andy
  • Hi Andy,

    We can hear audio when the PPCMB and the EVM are connected but not if we replace the EVM with our custom PCB (the schematics are exactly the same as the ones available in the application note section of the TAS5754M's datasheet). I will detail you the steps we are following:

    1. Connect the PurePath MotherBoard to the PC without any TAS5754M EVM attached.
    2. Open PurePath Console. It opens in the ConfigRunner tool.
    3. Execute the following script to enable an external I2C board:
      # Change to GPIO mode
      i gpio
      # Set bank 0
      w 99 04 01
      # Clear bits (command 01) with mask 20 - clears P1.5 of Bank 0
      w 99 01 20
      
      # Go back to I2C mode
      i i2cfast
      # Set pins 21-24 as outputs
      w 44 0E 0F
      # Set pin 23 high (MCLK-MUX = PSIA)
      w 44 06 7F
    4. Connect the I2C pins from the PPCMB to the TAS5754M I2C interface on our custom PCB.
    5. Restart the PPConsole. It opens again the ConfigRunner and it doesn’t detect any TAS5754M. This means that something is already not working at this point.
    6. Connect the external I2S from the PPCMB to our PCB’s I2S interface (no MCLK).
    7. Execute the following script to enable 3-wires I2S:
      #Go to Page 0
      w 98 00 00 
      #Standby request
      w 98 02 10 
      #Ignore MCLK detection, Ignore MCLK halt detection
      #0001_1000
      w 98 25 18 
      #PLL clock source => BCLK
      w 98 0D 10
      #Standby release
      w 98 02 00
    8. Play some music but nothing happens.

    What are we doing wrong?

    Best,

    Xabi.

  • Hi Xabi,

    Did you find anything wrong with the i2c communication between PPCMB and your PCB?

    Andy
  • Actually we have. We are using a Raspberry Pi as a I2C master. If we just connect the I2C interface and execute i2cdetect command, we can see the address in the output. If we connect both the I2C and the I2S, the command returns UU for that address meaning the resource is busy.

    Best,
    Xabi
  • Hi Xabi,

    I think I know why now. PPCMB is not supposed to work alone. If you disconnect the TAS5754MEVM and only connect a USB cable to the PPCMB, most of the devices on the PPCMB will not be powered.

    Andy
  • Hi Andy,

    How do we make sure the PPCMB uses our amplifier? Should we connect the EVM to the motherboard in step 1 and continue with the next steps? Does our board need to have the same I2C address than the EVM then?

    Xabi.
  • Hi Xabi,

    You have to keep the TAS5754M connected to the PPCMB in all the steps to make sure PPCMB is powered properly. Choose a different i2c address for your own TAS5754M device if possible, like 0x9C or 9E because 0x98 and 0x9A are used by the two devices in the TAS5754MEVM and then you should be able to talk to your device in the Config Runner.

    If you cannot change the i2c address, another approach is to remove one of the TAS5754M devices on the TAS5754MEVM, but I would not suggest you do that since you need the TAS5754MEVM for tuning.