AnsweredAssumed Answered

TFA9879 How to enable amplifier?

Question asked by Kasper Leonhardt on May 14, 2019
Latest reply on May 22, 2019 by Kasper Leonhardt

Hi

 

We got a problem enabling the amplifier.

 

After configuration (and before) the status register reads 0x7007. This indicated that the Amplifier mode is off. But how can it be off when the device is powered on and enabled in register 0x00? 

 

Here is the initialisation code:

 

// Reset
out[0] = 0x00; // 0000 0000 - 0000 0010 Device control register: SW Reset
out[1] = 0x02;
I2C_WriteBlock(0x00, out, sizeof(out));


// Config serial
out[0] = 0x00; // 0000 0000 - 0001 1000 Serial interface control: Left Channel, 8 kHz + I2S data + I2S mode
out[1] = 0x18;
I2C_WriteBlock(0x01, out, sizeof(out));


osDelay(10);

// Power on
out[0] = 0x00; // 0000 0000 - 0000 0001 Device control register: Operating mode
out[1] = 0x01;
I2C_WriteBlock(0x01, out, sizeof(out));

if (I2C_ReadBlock(0, in, sizeof(in)) == 0) {
TRACE_BLK(TRC_TA_PLF, "SoundInit After: ", in, sizeof(in));
}

 

// Config clipping
out[0] = 0x00; // 0000 0000 0000 1000 Bypass control: clip control off
out[1] = 0x08;
I2C_WriteBlock(0x01, out, sizeof(out));

 

// Config Dynamic range compressor
out[0] = 0x92; // 1001 0010 1011 1010 Dynamic range compressor: clip control off
out[1] = 0xBA;
I2C_WriteBlock(0x01, out, sizeof(out));

// Config volume
out[0] = 0x10; // 0001 0000 0011 0000 Volume control register: 0dB
out[1] = 0x30;
I2C_WriteBlock(0x01, out, sizeof(out));

 

// Config power limiting
out[0] = 0x00; // 0000 0000 0000 0000 De-emphasis, soft/hard mute and power limiter: 0dB
out[1] = 0x00;
I2C_WriteBlock(0x01, out, sizeof(out));

// audio output enable
out[0] = 0x00; // 0000 0000 - 0000 1001 Device control register: Amplifier mode + Operating mode
out[1] = 0x09;
I2C_WriteBlock(0x01, out, sizeof(out));


if (I2C_ReadBlock(0, in, sizeof(in)) == 0) {
TRACE_BLK(TRC_TA_PLF, "SoundInit: ", in, sizeof(in));
}

 

And here is the read-back of all the registers:

SoundInit: 

0009 0018 0007 0a18 0007 59dd c63e 651a 
e53e 4616 d33e 4df3 ea3e 5ee0 f93e 0008 
92ba 12a5 0004 1030 0000 7007 

 

A sample of the serial data:

 

The schematic (Note: The TEST pins is grounded, however the NC pins are NC.):

Help needed. Both outputs are a 0V at all time, and no sound in the 4ohm speaker, not even a click.

 

Thanks

Kasper

Outcomes