cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
7,542 Views
Registered: ‎12-09-2014

AXI IIC Adddress Issue

Hi All

 

I was trying to make the Zynq(Microzed) communicate with the Tegra Processor using I2C. The Tegra will be my master. The master is sending data but the slave doesnt detect it. The master is working fine. I feel the problem is with the Slave address and the memory address in Slave. I am currently using 0x70 as the Slave address and 0x41600000 is the memory address register in the Slave. I found this in one of the examples given by XIlinx. I am also using a Interrupt Controller for the interrupts. I have attached the screenshot of block diagram and the xparameters.h file belowblock_design.PNG

 

 

 

xparameters.PNG

 

Please Help me if you have any knowledge about this.

0 Kudos
Reply
5 Replies
Highlighted
Teacher
Teacher
7,485 Views
Registered: ‎03-31-2012

I don't have a solution but some suggestions to check: if you have a scope make sure that you are getting the i2c transaction you think you should receive on the wire. There is a chance the master is sending something you don't expect; especially verify the frame & the address used. Then check that the slave is configured properly, with the right address size and value and enable interrupts on receive. One thing you can do is to generate the bit stream you see on the wire in a simulation and see if the slave responds correctly.
Finally check your C code to make sure you are initializing the i2c device. If you are not getting an interrupt when the host sends a packet, you can keep polling the receive status register and see if anything pops up there.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply
Highlighted
7,381 Views
Registered: ‎12-09-2014

Thanks for the reply. It helped. The master was not sending something that i was expecting. 

 

I have a small problem though. When the master sends a wrong command the I2c Bus is going into Busy state and it never recovers without having to restart the Zynq. How do i get the bus back from busy mode. 


@muzaffer wrote:
I don't have a solution but some suggestions to check: if you have a scope make sure that you are getting the i2c transaction you think you should receive on the wire. There is a chance the master is sending something you don't expect; especially verify the frame & the address used. Then check that the slave is configured properly, with the right address size and value and enable interrupts on receive. One thing you can do is to generate the bit stream you see on the wire in a simulation and see if the slave responds correctly.
Finally check your C code to make sure you are initializing the i2c device. If you are not getting an interrupt when the host sends a packet, you can keep polling the receive status register and see if anything pops up there.

 

0 Kudos
Reply
Highlighted
Teacher
Teacher
7,364 Views
Registered: ‎03-31-2012

what exactly is the busy state? if the slave doesn't ack the host is supposed to time-out, retry etc. is your slave holding the clock low or something like that? if so you need to fix your slave so that it releases the wires and lets the master continue.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply
Highlighted
7,357 Views
Registered: ‎12-09-2014

The Slave is holding the bus high. For the I2c in PS, is there a software reset. I tried using XIicPs_Reset() . This is not working. 


@muzaffer wrote:
what exactly is the busy state? if the slave doesn't ack the host is supposed to time-out, retry etc. is your slave holding the clock low or something like that? if so you need to fix your slave so that it releases the wires and lets the master continue.

 

0 Kudos
Reply
Highlighted
Teacher
Teacher
7,338 Views
Registered: ‎03-31-2012

did you read section 20.2.4 in ug585?
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply