Hi,
I'm trying to set up the ADAU1761 Audio Codec on the Zedboard with Vivado 2013.4. I want to use the I2C (IIC) interface available on the ADAU1761 to do this. To communicate, I need an IIC interface on the Zynq, so I added one connected to my Zynq PS through the AXI bus.
Then I selected the "make external" option by right-clicking the port on I2C IP core present on my block digram view. I connected the created port to the correct pins (On zedboard, ADAU1761 I2C signal pins are connecter to AB4 and AB5
pins of Zynq chip) with Pin Planner. Then I exported the project to Xilinx SDK and ran the example project Peripherals Test, which works (step by step execution in debug mode passed the IIC peripheral test).
Now I'm trying to write on I2C line to communicate with the audio codec. For that I add lines in the xiic_selftest_exemple.c used by the main function of the example. After reading the doc, I added theses lines :
unsigned char Msg[3]; tt//Array of bytes
Msg[0] = 0x40; tttt//Subadress of the ADAU1761
Msg[1] = 0x00;tttt//It corresponds to Register R0 (Clock Control)
Msg[2] = 0x0E;tttt//The value I want to write in the register.
unsigned char *MsgPtr = Msg;//A pointer to my array
XIic_SetAddress(&Iic,XII_ADDR_TO_SEND_TYPE,0x76); t//Driver function to set up the adress of the slave we want to communicate with. On the Zedboard, this adress is 0b01110110 or 0x76 for write operations
XIic_MasterSend(&Iic,MsgPtr,3);tttttt//This function is supposed to send the three bytes of my buffer Msg.
Checking with the oscilloscope, the two pins of the ADAU used for SDA and SCL are LOW, and stay LOW. The ready state for I2C is HIGH, and I don't understand why I don't event have a I2C line whith a HIGH state. What am I missing ?