Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5874

Advanced users • Re: Use MIPI image sensor with RPI CM4

$
0
0
Thank you for your time.
I'm currently trying to send i2c commands to see if the sensor is not broken or well connected;
These are the schematics for the sensor
Screenshot 2024-03-06 132256.png
Screenshot 2024-03-06 132428.png
Screenshot 2024-03-06 164935.png
While talking with melexis tech support, he told me this
Definitely you should ensure the proper GPIO control to have a power-up sequence and DC/DC working, as well the RESET pin should be deasserted, otherwise the sensor will not ACK on I2C.
Is there a power up sequence for the CAM1 pins on the CM4? If I remember correctly the main camera pins are CAM1 and the secondary are the CAM0 ones.

i2cdetect -l output this:

Code:

alessandro@unlook:~ $ i2cdetect -li2c-0   i2c             i2c-22-mux (chan_id 0)                  I2C adapteri2c-1   i2c             bcm2835 (i2c@7e804000)                  I2C adapteri2c-10  i2c             i2c-22-mux (chan_id 1)                  I2C adapteri2c-20  i2c             fef04500.i2c                            I2C adapteri2c-21  i2c             fef09500.i2c                            I2C adapteri2c-22  i2c             bcm2835 (i2c@7e205000)                  I2C adapter
Then if i run i2cdetect -f and the bus number (-f is for all the function the i2c bus has)

Code:

alessandro@unlook:~ $ i2cdetect -F 0Functionalities implemented by /dev/i2c-0:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $ i2cdetect -F 1Functionalities implemented by /dev/i2c-1:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $ i2cdetect -F 10Functionalities implemented by /dev/i2c-10:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $ i2cdetect -F 20Functionalities implemented by /dev/i2c-20:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $ i2cdetect -F 21Functionalities implemented by /dev/i2c-21:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $ i2cdetect -F 22Functionalities implemented by /dev/i2c-22:I2C                              yesSMBus Quick Command              yesSMBus Send Byte                  yesSMBus Receive Byte               yesSMBus Write Byte                 yesSMBus Read Byte                  yesSMBus Write Word                 yesSMBus Read Word                  yesSMBus Process Call               yesSMBus Block Write                yesSMBus Block Read                 noSMBus Block Process Call         noSMBus PEC                        yesI2C Block Write                  yesI2C Block Read                   yesalessandro@unlook:~ $
But than if I run i2cdetect -y number of bus I get results only on bus 20 and 21

Code:

alessandro@unlook:~ $ i2cdetect -y 20     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f00:                         08 09 0a 0b 0c 0d 0e 0f10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f70: 70 71 72 73 74 75 76 77alessandro@unlook:~ $ i2cdetect -y 21     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f00:                         08 09 0a 0b 0c 0d 0e 0f10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f70: 70 71 72 73 74 75 76 77
If I try to send any command to all the busses ex.

Code:

 i2cget -y -f -a 22 0x09
I get
Error: Read failed

Statistics: Posted by alessandro.cursoli — Wed Mar 06, 2024 3:52 pm



Viewing all articles
Browse latest Browse all 5874

Trending Articles