cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ivanfan
Adventurer
Adventurer
1,051 Views
Registered: ‎06-05-2019

iic send data failed in csi rx example

Hi,

I'm a fresh user trying to get acquainted with FPGA/ZYNQ programming. I wanted to translate the csi rx example project desgined for zcu102 to my zcu104. 

In the xmipi_example program, i already changed the external clock generator to the 8T49N24 on zcu104 instead of the Si5324 on zcu102. And I can got the hdmi output and saw the colorbar produced by the program itself on the monitor.

However, i counldn't set up the imx274 camera sensor because the program stuck in sending data to the sensor through iic.

微信截图_20190915195854.png

 

微信截图_20190915194505.png

Sending data through iic didn't call the callback function and the transmitcomplete flag remained 1.

I have not made any changes to the program except using the 8T49N24 instead of the Si5324.

微信截图_20190915200001.png

Tags (2)
0 Kudos
Reply
10 Replies
karnanl
Xilinx Employee
Xilinx Employee
1,010 Views
Registered: ‎03-30-2016

Hello @ivanfan 

Could you please check your IIC clock and data lines on your board ? 
Are they pull-up at "1" when there is no transaction occurs ?
Can you show me the oscilloscope waveform capture of your IIC lines ?

regards
Leo

ivanfan
Adventurer
Adventurer
962 Views
Registered: ‎06-05-2019

Thank you for your reply.

I got the waveform from ila.

微信截图_20190917191914.png

They pull-up at "1" all the time and didn't have any change when the transaction occured.

0 Kudos
Reply
florentw
Moderator
Moderator
872 Views
Registered: ‎11-09-2015

HI @ivanfan 

You might want to add a trigger to your ILA on a falling edge. Else, if you just try to capture randomly, you will probably not see anything happening.

You might want to check my Video Series 31 – Debugging a Video System using an ILA for the basics of using an ILA.

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
aoifem
Moderator
Moderator
842 Views
Registered: ‎11-21-2018

Hi @ivanfan 

If your question is answered or your issue is solved, please kindly mark the response which helped as a solution (click on "Accept as solution" button below the reply).

 

If this is not solved/answered, please reply in the topic giving more information on your current status.

 

Thanks and Regards,

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Reply
ivanfan
Adventurer
Adventurer
775 Views
Registered: ‎06-05-2019

I use the iic of ps instead and use the function XIicPs_MasterSendPolled() to send the data. I used pmod pins to output the iic signal. But XIicPs_MasterSendPolled() still return sending data fail. 

微信截图_20191028160923.png微信截图_20191028161109.png

I add a trigger to the ILA and can capture two types of waveform. It looks a bit strange. SDA stays 0 and does not change back to 1.

微信截图_20191028155712.png微信截图_20191028155743.png

0 Kudos
Reply
ivanfan
Adventurer
Adventurer
753 Views
Registered: ‎06-05-2019

If I use th pl's iic as the xmipi.c do, the waveforms are shown as follow:

微信截图_20191028212552.png

And the program still stuck in the loop while ((TransmitComplete) || (XIic_IsIicBusy(&IicSensor) == TRUE)) {...}, and TransmitComplete always stays 1.

0 Kudos
Reply
florentw
Moderator
Moderator
742 Views
Registered: ‎11-09-2015

HI @ivanfan 

Why are you using the EMIO (going through the PL) and not using the PS IIC interface?

As both are connected to the same, I am not sure how that will act.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
ivanfan
Adventurer
Adventurer
715 Views
Registered: ‎06-05-2019

I have tried to send the I2C signal through the I2C0 socket interface on the zcu102 board, but it also failed. I want to capture the waveform of the I2C signal so I use the EMIO instead and insert an ILA to it.

The IIC signal sent from I2C IP core seems to be corret. My judgment may be wrong. Are there any problem in the waveform of I2C I posted above?

Any help regarding the issue will be appreciated.

0 Kudos
Reply
florentw
Moderator
Moderator
620 Views
Registered: ‎11-09-2015

Hi @ivanfan 

I guess there is also a switch for the iic bus. Is there a way you could probe to see if the data is going through the iic switch?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
vivien_bit
Visitor
Visitor
222 Views
Registered: ‎06-27-2013

hi, I encounter the same problem with you ,have you solved this problem? if so, how to solve? 

0 Kudos
Reply