PYNQ: PYTHON PRODUCTIVITY

Ultra96, axi iic cause crash

I use ultra96v2 board, and pynq v2.5 img. I want to use axi iic to drive my camera. But when I use AxiIIC, the system will crash and can’t connect to Jupyter. This is the output on Jupyter.

Could it be a problem with my vivado project?

Do you have the ability to connect to the serial connection on the board - either through the Avnet JTAG card or a separate USB->UART converter?

If the system is becoming completely unresponsive that’s usually an indication of a clocking or reset issue. I can’t see enough of the block diagram to work out exactly how it’s all wired up but you seem to be generating multiple clocks going in to the AXI interconnect. It’s worth ensuring that all the clocks are stable and the resets are deasserted if possible.

Are you able to access any of the other AXI peripherals hanging off that interconnect?

Peter

I’ll also add that you shouldn’t need to invoke the AxiIIC class directly - cv_ov5640.axi_iic_0 will create one for you.

Thank you for your reply. Now I can use the Axi IIC, but it seems that the result is incorrect. My iic slave device address is 0x20, so I use iic.send like below to send message.

Then I use an oscilloscope to capture the IIC waveform.

I send iic message, but bit 7 is high,and bit 0-6 is not 0x10,after I send the message, even if I click the stop button on Jupyter, the program won’t stop, so I have to click the restart button on Jupyter to restart the kernel.
How can I find out my problem? Is it the problem of the vivado project?

This is my block design. I found that no matter what the slave address is, the waveform is same.

If Jupyter can be restarted then it’s not a clocking/reset issue. What port widths are your M_AXI_* ports on the PS? WIth 2.5 I believe that the *FPD ones should 128 bits and *LPD one 32 bits. If you upgrade to 2.6 then they can be arbitrary.

Peter

Thank you for your reply. I checked my configuration and it’s right.

Could it be the interruption that cause the problem?

Now the SCL pin will have pulse output until I press the restart button.
Can I send my project to you for a look?
I used the official DPU project and add my design. Vivado is 2019.2 in Ubuntu. PYNQ is 2.5 and upgrade the image to support dpu.

Can I use the iic of ps? How can I drive it in pynq?

We don’t have a PYNQ-specific way of driving the PS I2C but you can use a library like smbus2 to drive it from Python.

Peter