cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,503 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
Highlighted
Moderator
Moderator
2,463 Views
Registered: ‎10-30-2017

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
Highlighted
Visitor
Visitor
2,437 Views
Registered: ‎04-26-2018

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
Highlighted
Moderator
Moderator
2,424 Views
Registered: ‎07-31-2012

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