I use the ADAU1172 to connect with 4 analog/digital microphones. Both ADC_SDATA0 and DAC_SDAT are connected to a DSP and are operated in TDM4 mode. Is it necessary to download program and paramater into the ADAU1772 or is simply to configure the control registers only?
In addition, how to read/write thoese control registers in burst mode?
I wrote a simple program to sequecially read thoese control registers via I2C bus but I could only read one register once.
#define ACK (0)
#define NACK (0)
#define SLAVE_ADDR (0x3c<<1)
unsigned char i2c_tx1byte(unsigned char txData);
unsigned char i2c_rx1byte(unsigned char Ack);
unsigned char ack;
unsigned char rcv;
/* set address = 0x0041 */
ack = i2c_tx1byte(SLAVE_ADDR); // return ACK
ack = i2c_tx1byte(0x00); // return ACK
ack = i2c_tx1byte(0x41); // return ACK
/* read two word */
i2c_start(); //repeat start
ack = i2c_tx1byte(SLAVE_ADDR|0x01); //return ACK
rcv = i2c_tx1byte(ACK); // return 0x05, same as the reset value
rcv = i2c_tx1byte(ACK); // return 0xff, shoud be 0x00
rcv = i2c_tx1byte(ACK); // return 0xff, should be 0x0f
rcv = i2c_tx1byte(NACK); // return 0xff, should be 0x00