既知 ID EEPROM 接在 I2C-0 BUS 之上,且讓我們以樹莓派 3B 機版為例 ,關閉所有 I2C BUS ,作為 HATs 初探的原點。
pi@raspberrypi:~
pi@raspberrypi:~
使用 dtparam 指令,動態啟動 I2C-0 匯流排,
pi@raspberrypi:~ i2cdetect -l i2c-0 i2c 3f205000.i2c I2C adapter pi@raspberrypi:~ ls i2c-0 pi@raspberrypi:/sys/class/i2c-adapter
查看系統訊息,
pi@raspberrypi:/sys/class/i2c-adapter
發現竟然已有兩個裝置在上頭。
據聞其一用於樹莓派鏡頭的控制,
RasPiCam Hot plug
When raspberry pi bootup with piCamera attach to it, I can use “raspistill” to take a picture.
I have 2 questions about this:
1. If raspberry pi bootup without piCamera attach, then I plug piCamera to raspberry pi. In this case, I can not use “raspistill” to take a picture
2. If raspberry pi bootup with piCamera attach to it, After use “raspistill” to take a picture, I plug out piCamera and then plug in a new piCamera to raspberry pi, I also can not use “raspistill” to take a picture.
Any body know the reason and how to solve it.
……
Hi Jamesh
I notice that the GPU part of the Raspi is closed source.
And seems the RasPiCam is controlled by I2C, does the I2C driver for RasPiCam is also closed source or I can see it from github?
Thanks a lot!
……
liuxin_john wrote:Hi Jamesh
I notice that the GPU part of the Raspi is closed source.
And seems the RasPiCam is controlled by I2C, does the I2C driver for RasPiCam is also closed source or I can see it from github?
Thanks a lot!
All the communication from the Raspi to the camera and from camera to Raspi is done from the GPU and is therefore closed source.
由於是 closed source ,故而欲作樹莓派 CSI 相容之鏡頭,不易也。
另一提供樹莓派 7″ 顯示器的觸控螢幕
I followed this https://www.raspberrypi.org/blog/the-ea … i-display/ to get the display up and running. I used the GPIO option to power the RPi, connecting the 5V & GND on the display’s I2C connector over to pins #4 and #6 on the RPI. But the blog only shows the power pins in use, with no connection to SDA, SCL.
I had assumed that the I2C connections on the display interface were for the touch screen, so I went ahead and connected them up at first. But I have found that touch works whether they are connected or not. I currently have SDA and SCL unplugged and everything seems to work the same.
So should they be connected, or are they for some feature I haven’t yet discovered?
……
Using other-i2c-devices with the Official 7″ Touchscreen
If my understanding is correct, then the Touch-Input of the Official 7″ Touchscreen uses i2c to communicate touches to the Raspberry Pi.
In the RasPi-2B and RasPi-3B (at least), the Official 7″ Touchscreen seems to use i2c-0, which is passed through the ribbon “Display Connector”. Thus is appears that i2c-1 on these versions of the RasPi is still available on the GPIO pins for other use: I have successfully connected a DS3231-RTC to the GPIO_i2c-1 on my RasPi-2B and RasPi-3B, and the touch-functions of the Touchscreen continue to work fine.
[I would postulate that on the original RasPi-A and RasPi-B that the Touchscreen still uses i2c-0, but on these original RasPi’s this is the same i2c-0 which is on Pins #3 & #5 on the GPIO (to which on these original models you have to use jumper-wires on the GPIO SDA & SCL to connect to the Touchscreen). Which means that you can’t use this GPIO i2c for anything else on these original RasPi-A & -B, UNLESS (perhaps) you disable the touch-functions of the Touchscreen (eg. by putting “disable_touchscreen=1” in config.txt, and also disconnecting the i2c-jumper-cables) – which MIGHT allow you to then use the GPIO i2c for something else on these original RasPi’s??]
If anyone could confirm the above is correct, it would be appreciated!?!
Update (23Mar): Many thanks for concise reply!
……
Yes, your understanding is correct.
A+, B+, 2, and 3 all use i2c0 for configuring the display and touchscreen. I2c1 is still available for other uses.
A and B need to use the other i2c bus for the display via additional wires – whether that is 0 or 1 I think varies between revisions.
想來亦是閉源軟體的了。
雖曉系統裡並無 ID EEPROM ,何妨趁機驗證 eepflash 讀取錯誤時之狀況乎!!??
pi@raspberrypi:~/hats/eepromutils
pi@raspberrypi:~/hats/eepromutils cd /sys/class/i2c-adapter/ pi@raspberrypi:/sys/class/i2c-adapter i2cdetect -y 3 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- pi@raspberrypi:/sys/class/i2c-adapter ls 3-0050 device name of_node subsystem delete_device i2c-dev new_device power uevent pi@raspberrypi:/sys/class/i2c-adapter/i2c-3 ls driver eeprom modalias name power subsystem uevent pi@raspberrypi:/sys/class/i2c-adapter/i2c-3/3-0050 sudo cat eeprom cat: eeprom: 連線超過時間 pi@raspberrypi:/sys/class/i2c-adapter/i2c-3/3-0050 gpio readall +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | | | 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | | | 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 0 | IN | TxD | 15 | 14 | | | | 0v | | | 9 || 10 | 1 | IN | RxD | 16 | 15 | | 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 | | 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | | | 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 | | | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 | | 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | | | 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | | 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 | | | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 | | 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 | | 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | | | 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 | | 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | | | 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 | | 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 | | | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+ pi@raspberrypi:~ $