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.

TAS2505 codec problem with PLL from BCLK

Other Parts Discussed in Thread: TAS2505, TAS2555

We use the TAS2505 with a AM335x Sitara CPU and Linux:

BLCK and MCLK are linked, PLL is generated from BCLCK (*4 or *8), WCLK is 32kHz, 32bit data length.

The first playback (after configuring the chip) works fine. If we stop the playback and try again to playback a file the sound output is messed up.

If we configure the chip again, everything is ok again.

If playback is stopped something happens within the chip, because BLCK and MCLK will stop as well.

If we use an external BLCK and MCLK and supply this signal the whole time (also during playback stop) everything works fine.

Here is my question:

Is there a smart way to feed the chip with a proper clock source even there is no playback active? Is there a Linux setting for that? Or is there a register setting of the chip?

  • Hi Florian,

    Welcome to E2E.

    I will take a look at you issue.
    I'll come back soon.

    Best regards,
    -Ivan Salazar
    Texas Instruments
  • Hi Florian,

    Could you share the register settings you are using?
    Have you tried different PLL/Clock configurations?

    Best regards,
    -Ivan Salazar
    Texas Instruments
  • Hi Ivan,

    these are our register settings:

    0x00 0x00 # Page Select Register
    0x01 0x00 # Software Reset Register
    0x04 0x03 # Multiplexers
    0x05 0x80 # PLL P&R Values
    0x06 0x04 # PLL J Values
    0x07 0x00 # PLL D Values (MSB)
    0x08 0x00 # PLL D Values (LSB)
    0x0B 0x81 # NDAC Values
    0x0C 0x82 # MDAC Values
    0x0D 0x00 # MSB Value
    0x0E 0x80 # LSB Value
    0x0F 0x02 # miniDSP_D Instruction Control Register 1
    0x10 0x00 # miniDSP_D Instruction Control Register 2
    0x11 0x08 # miniDSP_D Interpolation Factor Setting Register
    0x19 0x00 # Multiplexers
    0x1A 0x01 # CLKOUT M divider value
    0x1B 0x30 # Audio Interface Setting Register 1
    0x1C 0x00 # Audio Interface Setting Register 2
    0x1D 0x08 # Audio Interface Setting Register 3
    0x1E 0x01 # BCLK N Divider
    0x1F 0x00 # Secondary Audio Interface
    0x20 0x00 # Audio Interface Setting Register 5
    0x21 0x00 # Audio Interface Setting Register 6
    0x22 0x00 # Digital Interface Misc. Setting Register
    0x25 0x80 # DAC Flag Register 1
    0x26 0x11 # DAC Flag Register 2
    0x2A 0xE0 # Sticky Flag Register 1
    0x2B 0x80 # Interrupt Flag Register 1
    0x2C 0x00 # Sticky Flag Register 2
    0x2D 0x00 # Sticky Flag Register 3
    0x2E 0x00 # Interrupt Flag Register 2
    0x2F 0x00 # Interrupt Flag Register 3
    0x30 0x00 # INT1 Interrupt Control Register
    0x31 0x00 # INT2 Interrupt Control Register
    0x34 0x00 # GPIO/DOUT Control Register
    0x35 0x12 # DOUT Function Control Register
    0x36 0x02 # DIN Function Control Register
    0x37 0x02 # MISO Function Control Register
    0x38 0x02 # SCLK/DMDIN2 Function Control Register
    0x3C 0x01 # DAC Signal Processing Block Control Register
    0x3E 0x00 # miniDSP_D Configuration Register
    0x3F 0xB0 # DAC Channel Setup Register 1
    0x40 0x04 # DAC Channel Setup Register 2
    0x41 0x00 # Left DAC Channel Digital Volume Control Register
    0x42 0x00 # Right DAC Channel Digital Volume Control Register
    0x47 0x00 # Beep Generator Register 1
    0x49 0x00 # Beep Generator Register 3
    0x4A 0x00 # Beep Generator Register 4
    0x4B 0xEE # Beep Generator Register 5
    0x4C 0x10 # Beep Generator Register 6
    0x4D 0xD8 # Beep Generator Register 7
    0x4E 0x7E # Beep Generator Register 8
    0x4F 0xE3 # Beep Generator Register 9
    0x51 0x00 # Dig_Mic Control Register
    0x00 0x01 # Page Select Register
    0x01 0x10 # POR & LDO BGAP Control Register
    0x02 0x05 # LDO Control Register
    0x03 0x00 # Playback Configuration Register 1
    0x04 0x00 # Playback Configuration Register 2
    0x05 0x00 # DAC DEM Control
    0x08 0x00 # Common Mode Register
    0x09 0x00 # Control Register
    0x0A 0x00 # Common Mode Control Register
    0x0B 0x10 # HP Over Current Protection Configuration Register
    0x0C 0x00 # HP Routing Selection Register
    0x10 0x40 # HP Driver Gain Setting Register
    0x14 0x00 # Headphone Driver Startup Control Register
    0x16 0x00 # HP Volume Control Register
    0x18 0x00 # AINL Volume Control Register
    0x19 0x00 # AINR Volume Control Register
    0x2D 0x02 # Speaker Amplifier Control 1
    0x2E 0x21 # Speaker Volume Control 1
    0x30 0x10 # Speaker Amplifier Volume Control 2
    0x3F 0x00 # DAC Analog Gain Control Flag Register
    0x7A 0x00 # Reference Powerup Delay

    The frequency of BCLK and MCLK is 2048kHz.
    We tried PLL*4, *8 and *16. There is no difference beteween these settings.

    Best regards
    Florian

  • We also tried different data lengths (32 / 16 bit).
    It works a few times, but then something happens in the chip and we have to send a reset command and set all registers again.
    After these steps the cips works again until the problem occurs again.

    With an external clock for the codec this problem will not occur.

  • Hi Ivan,
    Is there any progress on this topic?

    Best regards
    Florian
  • Hi Florian,

    A constant clock signal would be best for TAS2505.
    Clock loss makes the device unstable and lead it to stop working.
    We recommend to provide a constant clock signal for proper operation as the EVM.

    Best regards,
    -Ivan Salazar
    Texas Instruments
  • It would be great if this fact would be mentioned in the datasheet!

  • Stopping the clocks randomly will cause undefined behavior. The TAS2555 must be powered down before the clocks stop and powered up after the clocks start. It is not necessary to re-program all registers from scratch but the DAC, PLL and dividers must be turned off and back on to avoid problems.

    Please see section 2.6 in the application reference guide. It explains the reasoning behind having a controlled power up and down sequence and that stopping clocks randomly is not allowed. 

    power down sequence (before stopping clocks):

    1. mute digital volume control
    2. power down DAC channel
    3. power down output drivers
    4. wait for power status flag in P0R37
    5. power down MDAC divider
    6. power down NDAC divider
    7. power down PLL

    power up sequence (after starting clocks):
    1. power up PLL
    2. wait 10ms for PLL to stabilize
    3. power up NDAC divider
    4. power up MDAC divider
    5. power up output drivers
    6. power up DAC channel
    7. unmute digital volume control