1. The MPU and MCU on the UNO Q appear to have an internal I²C connection between them. However, I am not certain which I²C controller (I2C0, I2C1, or I2C2) on the Master MPU is mapped to which I²C interface (I2C0, I2C1, or I2C2) on the Slave MCU.
2. On the MCU side, there is an I²C bus exposed on the header using the traditional SDA and SCL signals. This interface behaves similarly to that of an Arduino UNO R3, so I assume that it corresponds to I2C0.
3. In addition, there is another I²C interface available on the Qwiic connector. I am not sure whether this corresponds to I2C1 or I2C2. If it is I2C1, then it is likely that I2C2 is used internally for MPU–MCU communication.
4. On the MPU side, I observed the existence of three I²C devices by issuing the following command from the shell terminal:
ls /dev/i2c*
Response: /dev/i2c-0 /dev/i2c-1 /dev/i2c-2
5. According to information obtained from Google searches, i2c-2 on the Linux (MPU) side is typically the master interface.
6. I uploaded the following I²C slave sketch (Step-7) to the MCU. The MCU is configured with the slave address 0x08, with the expectation that this address would be detected by the Master MPU during an I²C bus scan.
7. I²C sketch for the Slave MCU:
#include <Wire.h>
volatile bool flag = false;
byte data;
void setup()
{
Wire2.begin(0x08);
pinMode(LED_BUILTIN, OUTPUT);
Wire2.onReceive(receiveFromLinux);
}
void loop()
{
if (flag == true)
{
for (int i = 0; i < data; i++)
{
digitalWrite(LED_BUILTIN, LOW); // LED ON
delay(1000);
digitalWrite(LED_BUILTIN, HIGH); // LED OFF
delay(1000);
}
flag = false;
}
}
void receiveFromLinux(int howMany)
{
data = Wire2.read();
flag = true;
}
8. I have isued the following command from the Shell Terminal to stop the Router Bridge service so that there would be no background bridge-related interrupts and the system would remain comparatively cool:
sudo systemctl stop arduino-router
esponse: non-ending LED Matrix animation Arduino logo comes
9. I then issued the following command from the shell terminal to scan for I²C devices:
sudo i2cdetect -y 2
Response:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
10. The I²C slave address 0x08 appears to have been detected in the above scan result (Step-9). However, many unexpected “ghost” addresses are also shown, which ideally should not appear.
11. I issued the following command so that the MPU triggers the flash-resident sketch of the slave MCU to blink the LED_BUILTIN for three times:
sudo i2cset -y 2 0x08 0x03
12. The command in Step-11 appears to have been accepted, but the LED_BUILTIN does not blink. This may possibly be related to the presence of the ghost addresses in the scan result, potentially indicating an abnormal or stuck I²C bus condition.
13. How can I eliminate the ghost addresses shown in Step-9 so that only the valid slave address 0x08 appears in the scan result?