UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor naeemahmad
Visitor
264 Views
Registered: ‎04-26-2018

IIC Example Designs in Xilinx SDK (for SRF02 Rangefinder )

Hello Respected Members,

I am new to Xilinx SDK and looking for guide to run SRF02 ultrasonic range measurement sensor. In Vivado, block diagram, I added "AXI IIC" ip to connect my sensor. It is mapped on MicroBlaze processor and hardware is exported to SDK. After launching SDK, I created "Hello-World" example and planned to modify it for using IIC. The sensor requires continuous Write and Read transaction from IIC master for operation.

I have implemented the same sensor in Arduino successfully, but in Xilinx SDK it is a bit complicated for me. Can anybody please guide me from where to start?

Thank you in advance for the help!

Tags (5)
0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
234 Views
Registered: ‎10-30-2017

Re: IIC Example Designs in Xilinx SDK (for SRF02 Rangefinder )

Hi @naeemahmad,

 

we have some example projects for the AXI IICwhich you can use for your project. Please go through the below examples:

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/iic/examples

 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- 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
Visitor naeemahmad
Visitor
208 Views
Registered: ‎04-26-2018

Re: IIC Example Designs in Xilinx SDK (for SRF02 Rangefinder )

Hi @savula,
Thank you for the reply:)
I am using xiic_repeated_start_example.c example to communicate with sensor. AXI IIC IP has read and write buffers and also this code contains buffers. But if i write to WriteBuffer to send data, for example
WriteBuffer[0] = 0x07;
The data is not transmitted over I2C bus and code is stuck in a while loop that checks that transmission is completed or not. The sensor address is correct.

If i am right, I think the issue may be to handle FIFO buffers correctly, and i am looking for a resource that make me able to understand FIFO buffers practically in SDK for FPGA design. Can you please guide me, if this is the issue.
Thank you in advance!
Kind regards
Naeem
0 Kudos
Moderator
Moderator
195 Views
Registered: ‎07-31-2012

Re: IIC Example Designs in Xilinx SDK (for SRF02 Rangefinder )

Hi @naeemahmad,

Use polled mode example which is the simple read write transactions.

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos