cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
badFITimage
Explorer
Explorer
219 Views
Registered: ‎09-06-2019

I2C never completes transfer

Hi,

I'm having issues writing to an I2C device using the PS I2C0 of a Zynq-7000 on a custom board. The XIICPS_ISR_OFFSET value returns 0x00000000 which causes XIicPs_MasterSendPolled() to spin infinitely. I'm not exactly sure what is causing this since the ISR register does not report any error statuses (i.e. NACK, arbitration loss, etc.) the only problem is that the Transmit complete bit never gets set. Has anyone encountered this issue?

badFITimage_0-1607390326635.png

 

Here is the while loop that I'm getting caught in:

	/*
	 * Check for completion of transfer.
	 */
	while ((IntrStatusReg & XIICPS_IXR_COMP_MASK) != XIICPS_IXR_COMP_MASK){
        // IntrStatusReg only ever returns 0x00000000
		IntrStatusReg = XIicPs_ReadReg(BaseAddr, XIICPS_ISR_OFFSET);
		/*
		 * If there is an error, tell the caller.
		 */
		if ((IntrStatusReg & Intrs) != 0U) {
			return (s32)XST_FAILURE;
		}
	}

 

Thanks!

0 Kudos
Reply
0 Replies