Electrical – I2C ADV7511 communication

armcfpgai2cxilinx

I am currently trying to communicate via I2C to HDMI transmitter ADV7511 from Zynq 7000 Soc, I used this example as a reference for start, but yet without success, program get stuck in function XIicPs_MasterSendPolled() at this lines of code

    /*
     * Check for completion of transfer.
     */
    while ((IntrStatusReg & XIICPS_IXR_COMP_MASK) != XIICPS_IXR_COMP_MASK){

        IntrStatusReg = XIicPs_ReadReg(BaseAddr, XIICPS_ISR_OFFSET);
        /*
         * If there is an error, tell the caller.
         */
        if ((IntrStatusReg & Intrs) != 0U) {
            return (s32)XST_FAILURE;
        }
    }

It never exits from this while loop, what are possible reasons, or advices what to check?

Thanks!

Best Answer

There are many things that could go wrong. If this is at boot time, the ADV7511 may not yet be ready, it may need more boot time.

Or, its clock pumping it too fast. Nothing like real probes to look at the signals. Lacking that, then Cadence IP, may be able to show a model of the communication.

Or as simple as your default pull ups and pull downs on the ADV7511 not being set right, for your method of communication to it.

Or just for grins, way slow down the communication clock to the ADV. My quick look at your code tells me you are using the system default clock. That's probably in the 20MHz to 100MHz plus range..? When a set up comm port on a chip like a ADV is expecting much slower comm. I2C is in clock ranges like 100KHz.

Related Topic