Difference between revisions of "RaspberryPI I2C confilct problem"

From wiki_veye
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 12: Line 12:
 
To be able to use this I2C interface on CPU, we use the ''camera_i2c_config'' script to expose VC-I2C to CPU which creates a problem:
 
To be able to use this I2C interface on CPU, we use the ''camera_i2c_config'' script to expose VC-I2C to CPU which creates a problem:
  
'''When using our CSI-2 camera module and  screen of the DSI-2 interface at the same time, CPU controls the camera module through VC-I2C as the master, and GPUcontrols the LCD screen through VC-I2C  as the master too. There is a certain probability that there will be I2C access conflicts, which will lead to possible I2C miscodes and misconfigurations.'''
+
'''When using our CSI-2 camera module and  screen of the DSI-2 interface at the same time, the CPU controls the camera module through VC-I2C as the master, and the GPU controls the LCD screen through VC-I2C  as the master too. There is a certain probability that there will be I2C access conflicts, which will lead to possible I2C miscodes and misconfigurations.'''
  
 
=== Solution ===
 
=== Solution ===
Line 19: Line 19:
 
In order to avoid conflicts, when you need to use our MIPI camera module and LCD screen in the product at the same time, it is recommended to use i2C on 40-pin GPIO header to control the camera.
 
In order to avoid conflicts, when you need to use our MIPI camera module and LCD screen in the product at the same time, it is recommended to use i2C on 40-pin GPIO header to control the camera.
  
*VEYE-MIPI-327、CS-MIPI-IMX307、CS-MIPI-SC132
+
*VEYE-MIPI-327 CS-MIPI-IMX307 CS-MIPI-SC132
  
 
It is recommended to make an adapter board to export the i2c pin of the camera to a separate connector and disconnect it from the Raspberry Pi FFC cable.
 
It is recommended to make an adapter board to export the i2c pin of the camera to a separate connector and disconnect it from the Raspberry Pi FFC cable.
  
*VEYE-MIPI-327S
+
*VEYE-MIPI-327S VEYE-MIPI-IMX462 VEYE-MIPI-IMX385
  
 
We have supported the independent I2C interface function, and there is no need to make a separate adapter board.
 
We have supported the independent I2C interface function, and there is no need to make a separate adapter board.
  
 +
http://wiki.veye.cc/index.php/VEYE-MIPI-290/327_i2c/zh#i2cauxenable
 
==== Software solution (ways to avoid it) ====
 
==== Software solution (ways to avoid it) ====
  

Latest revision as of 20:23, 3 June 2021

查看中文

The problem of I2C conflict between VEYE MIPI CSI-2 camera module and MIPI DSI-2 LCD screen on Raspberry Pi

1 Problem description

On Raspberry Pi 3B, 3B+, 4B and CM4, MIPI CSI-2 and DSI-2 use the same I2C bus (VC-I2C). In the hardware schematic, the pins are short-circuited.

Please refer to Schematics for the various Raspberry Pi board versions for more details.

In general, in the Raspberry Pi main chip(BCM chip), the VC-I2C is controlled by GPU and cannot be accessed by CPU. The GPU of Raspberry Pi is not open, while the programs on the CPU side are open source.

To be able to use this I2C interface on CPU, we use the camera_i2c_config script to expose VC-I2C to CPU which creates a problem:

When using our CSI-2 camera module and screen of the DSI-2 interface at the same time, the CPU controls the camera module through VC-I2C as the master, and the GPU controls the LCD screen through VC-I2C as the master too. There is a certain probability that there will be I2C access conflicts, which will lead to possible I2C miscodes and misconfigurations.

2 Solution

2.1 Hardware solution (recommended)

In order to avoid conflicts, when you need to use our MIPI camera module and LCD screen in the product at the same time, it is recommended to use i2C on 40-pin GPIO header to control the camera.

  • VEYE-MIPI-327 CS-MIPI-IMX307 CS-MIPI-SC132

It is recommended to make an adapter board to export the i2c pin of the camera to a separate connector and disconnect it from the Raspberry Pi FFC cable.

  • VEYE-MIPI-327S VEYE-MIPI-IMX462 VEYE-MIPI-IMX385

We have supported the independent I2C interface function, and there is no need to make a separate adapter board.

http://wiki.veye.cc/index.php/VEYE-MIPI-290/327_i2c/zh#i2cauxenable

2.2 Software solution (ways to avoid it)

  • For VEYE Series

The collision can be avoided by turning off the i2C response of the camera.

./i2c_write $I2C_DEV $I2C_ADDR 0x07 0xFF

  • For CS series

Firmware upgrading...

3 More

If you have a better solution or need to consult, please contact xumm#csoneplus.com.