• 0

Genesys-2 Pcam 5C I2C communication


Dear All,

I am having problem communication with Pcam 5C from Genesys-2 board. There is also FMC Pcam Adapter in between. I can set I2C switch, enable A and B channels, attach logic analyzer to channel B and Pcam 5C on channel B. Pcam 5C is inserted properly - I can measurem VCC3V3 on pin 15.

There is Microblaze in FPGA controlling Xilinx AXI IIC (2.0) with following code:

sendData[0]= 0x31;
sendData[1]= 0x00;
SentByteCount = XIic_Send(IIC_BASE_ADDRESS, CAM_ID, sendData, 2, XIIC_STOP);	
ReceivedByteCount = XIic_Recv(IIC_BASE_ADDRESS, CAM_ID, rxBuffer, 1, XIIC_STOP);

I want to read register 0x3100 of the camera on I2C address 0x78, but it fails , there is no ACK (as in attached picture). Same functions work well controlling I2C switch, so I assume there should be ACK problem. Must Pcam 5C send ACK back or it is completely ignored in Serial Camera Control Bus protocol causing I2C core failure?






Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello, thank you for your fast reply. Attached is my main file, it's made from Xilinx xiic_low_level_eeprom_example.c file. No interrupts, very low level. I think, my address was wrong, it should be 0x3C since Xilinx IP adds bit for read or write operation. But it still does not work. I also attached a picture how my AXI IIC block is being generated.

Next experiment: write I2C bit banging Microblaze version without ACK/NACK ckeck.



Link to post
Share on other sites
  • 0
9 minutes ago, elodg said:

Make sure CAM_PWUP is driven high as per https://reference.digilentinc.com/reference/add-ons/pcam-5c/reference-manual#power-up_and_reset.

Also, the OV5640 address is 0x78/0x79 as listed in the Omnivision datasheet. This includes the write/read bit. Therefore, the address you are looking for in binary is 0b0111100. You are not sending this address.

CAM_PWUP is 3.3V, just checked with multimeter. I think, if it would be low I couldn't communicate with I2C switch, since CAM_PWUP is connected to it's reset pin.

And yes, you are right about address, but still does not work after fixing that.

Link to post
Share on other sites
  • 0
Posted (edited)
1 hour ago, BogdanVanca said:

Do you have PULLUP TRUE on both I2C lines in your xdc file? 

Not yet, implementing it right now.


Edit: I added PULLUPs on both I2C lines, but it also does not work. I suspect Xilinx IP waiting for ACK/NACK and failing to get it. And I am very curious if the camera uses I2C with ACK/NACK, or normal Serial Camera Control Bus ignoring 9th byte.

Edited by linasr
Additional information
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now