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.

TAS5558 PWM output shutdown problem

Other Parts Discussed in Thread: TAS5558

The customer wants to realize the below functions using TAS5558:

(1) When there is music to play, enable corresponding PWM channels.

(2) When there is no music to play, disable corresponding PWM channels to save power consumption.

The detailed configuration for PWM output is illustrated as below:

(1) DATA1 --> PWM1 & PWM2

(2) DATA2 --> PWM3 & PWM4

(3) DATA3 --> PWM7 & PWM8

 

That is to say, if there is no output for DATA1, they want to disable PWM1 & PWM2. And if there is output for DATA1, they want to enable PWM1 & PWM2 again.

 

Below is the code (a function, programmed by C language). They find if they use only register 0x27, they could not shutdown corresponding PWM channels. They have also tried using register 0x03 to shut down all channels first and using register 0x27 to open corresponding channels, but failed again.

The related register must be configured at initialization stage?

Could you please help with that?

void Set_Channel_Enable(Libre_MarkCode_typedef mark, unsigned char enable)

{

         static uint8_t enable_state[2]={0xff,0xff};

         unsigned char  write_byte;

         const AmpAddr_SubStruct_Typedef* addr;    

        

         if(mark>=MarkCode_LibreA)

         {                

                   addr=&AmpAddr.LibreList[mark-1];

                   write_byte=enable_state[(mark>=MarkCode_LibreD)?1:0];

                   if(((write_byte&addr->MuteMsk_L)==0)!=(enable!=0))

                   {

                            if(enable)write_byte&=~(addr->MuteMsk_L|addr->MuteMsk_R);

                            else write_byte|=(addr->MuteMsk_L|addr->MuteMsk_R);

                           

                            AMP_I2C_Write_Byte(addr->Dev,0x03,0xB0);

                            //DelayMs(2);

                            AMP_I2C_Write_Byte(addr->Dev,0x27,write_byte);                         

                            //DelayMs(2);

                            //AMP_I2C_Write_Byte(addr->Dev,0x03,0xA0);

                           

                            enable_state[(mark>=MarkCode_LibreD)?1:0]=write_byte;   

                           

                            #if _DEBUG_PRI

                                     ClassDebugDrv.MyPrintf("CH[%d] enable sta:[%d]\r\n",mark,enable);

                            #endif      

                   }

         }

}

  • Hi Robin,

    If the Channel Group bit is enabled in register 0x04, individual shutdown of the PWMs is not possible. If you disable Channel Group you will be able to shutdown individual PWM channels.

    Justin
  • Hi Justin,

    Actually, the Channel Group bit is disabled in before test, shown as below.

    Thank you.

    Robin Yu

  • Hi Justin,

    Any suggestion? Thank you,

    Robin
  • Hi Robin,

    Is it possible to get a register dump from the part when this problem is occurring?

    Justin

  • Hi Justin,

    Sorry, don't fully understand your meaning. 

    Or could you please give some example code which have been verified?

    Thank you.

    Robin

  • Hello Robin,

    I get the impression that the TAS5558 is on a customer pcb and they are not using the EVM, is that correct?

    I believe that Justin was interested in getting a register dump from Pure path console. so that we could see the .cfg file.

    I will continue looking into this matter. I've sent you a friend request so that I can get some background info regarding your customer.

    thank you for your continued patience.

    Best regards,

    -Steve
  • Hi Steve,

    Great thanks. The customer is using their own PCB, not our EVM.
    All the others have been ready except the shutdown function.
    Thank you again.

    Robin
  • Hello Robin,

    I appreciate your patience with this problem.  I have some information that may be helpful. 

    please refer to page 72 of the Datasheet,  and you will see the Individual Channel shutdown register described in Table 34.  below the table is written "Individual channel shutdown register should be written prior to bringing system out of shutdown using reg 0x03 (Exit Shutdown)" 

    My understanding of this sentence is that you must write to this register only while the device is in shutdown,  if you try to write to it while it is running, no changes will be made. Additionally, the Soft mute will not shut off the PWM switching, so using the soft-mute register (0x0F) will not help us.   

    To test this,  your customer could shutdown the device, then write to the individual channel shutdown register,  and then exit shutdown (0x03 = A0)  if this does work,  then we would know.  

    I hope this is helpful to your customer,  I will continue to look for a solution, however with the holiday i have not been able to obtain a TAS5558 EVM. Please keep me posted. 

    Best regards, 

    -Steve Wilson

  • Hi Steve,

    Thank you for your suggestion.

    Actually, the customer has tested below code, but it doesn't work.

                                AMP_I2C_Write_Byte(addr->Dev,0x03,0xB0);                        

                                //DelayMs(2);

                                AMP_I2C_Write_Byte(addr->Dev,0x27,write_byte);               

                                //DelayMs(2);

                                //AMP_I2C_Write_Byte(addr->Dev,0x03,0xA0);                 

     

    Robin       

  • One new issue, the customer sets volume at a fixed value (0x0000004d), when changing the input voltage, the gain will change correspondingly. How to solve this problem?

    The customer also did the below test, and got the same result.

     

    addr = TAS5558_ADDRESSH;

    AMP_I2C_Write_Byte(addr,0x12,0));

    AMP_I2C_Write_Byte(addr,0x03,0xA0);

    AMP_I2C_Write_Byte(addr,0x04,0x12));

    Thank you

    Robin

  • Robin,  

    I will look into this, but I am out of the office until this coming Wednesday.  I will get back to you as soon as I can.  

    thank you for your patience.

    -Steve Wilson

  • Robin, 

    Is it possible that Write_Byte is not receiving the proper value?   Can they read register 0x27 after they write to it to confirm that it is indeed receiving the proper value? 

    best regards, 

    -Steve

  • Hi Robin,  

    Thanks for your patience. Let me make sure I understand the problem.  It appears as through as the customer increases their input,  the gain increases?   

    Is the customer using the DRC?  

    Best Regards,

    -Steve

  • Hi Steve,

    The costumer reflects that the register value is proper.
    For another issue about gain, it has been solved and they find it's their own fault.
    Thanks for your support.

    Robin
  • Hi Robin,

    I am glad to hear the gain issue has been solved.

    Regarding register 0X27, I am curious if your customer can set the initial value (when the device is first turned on) to 0xF0 and if that succeeds in turning the half of the channels off.

    -steve
  • Hello Robin,

    I have been able to confirm in the Lab that once channel grouping is disabled (register 0X04 bit5 =0) I can put the device in shutdown, turn off an individual channel, and then bring the device out of shutdown, and I have no PWM. If your customer is unable to see that behavior, we would really like them to dump their memory into a .cfg file, so we can see what they are doing.

    best regards,
    -Steve
  • Hi Steve,

    Take an example, as you said, if the customer executes below code, it should be OK.

    AMP_I2C_Write_Byte(addr->Dev,0x04,0x00);    //disable channel group

    AMP_I2C_Write_Byte(addr->Dev,0x03,0xB0);    //shutdown the device                    

    AMP_I2C_Write_Byte(addr->Dev,0x27,0xF0);      //enable individual channel  

    AMP_I2C_Write_Byte(addr->Dev,0x03,0xA0);    //bring the device out of shutdown

    If he wants to modify the enabled channel, he should continue execute below  code    

    AMP_I2C_Write_Byte(addr->Dev,0x03,0xB0);    //shutdown the device                    

    AMP_I2C_Write_Byte(addr->Dev,0x27,0x0F);      //enable individual channel  

    AMP_I2C_Write_Byte(addr->Dev,0x03,0xA0);    //bring the device out of shutdown

    I don't know if my understanding is right?

    Thanks for your support!

    Robin

  • Hello Robin,

    yes, the groups can be disabled during the initial startup.  

    the first block of code should disable (shutdown) channels 5-8,  your second block of code should enable 5-8 and disable (shutdown) 1-4.  

    if that isn't working for them,  see if they can add a longer delay between the shutdown command and the inable/disable individual channel command. i would expect the delay they have to be sufficient,  but perhaps it would be worth a try to see if there is a small chance that they are writing to the individual channel shutdown register before the device is fully in shutdown.

    As I have said,  this sequence of commands works for me in the lab,  I send them one at a time, the only difference I can see is that there are seconds between each command as I am doing this manually on Pure path console. 

    Best regards,

    -Steve Wilson

  • Hi Steve,

    Thanks for your continuous support.

    I have give your advice to the customer, but the engineer is too busy to have time to do the test.

    Any feedback from the customer, I will tell you.

    Thank you, again.

    Robin

  • Robin,

    I am happy to help. If your customer would like some lab documentation from my work above, I can generate some.

    best regards,

    -Steve Wilson