I have an RPi3b (Master) wired up to an MCU (Slave) communicating via I2C. I did have an RPi1b wired up and upon which I did my first development (cheaper to accidentally fry). Suddenly I'm getting a problem. There are three communications where this happens and it seems to be the first byte 'read'.
I'm expecting 1 or 0 in a uint8_t. I'm getting 129 or 128.
On another communication I'm expecting 20 but I'm getting 148.
In another I read the bits of the first byte as flags and the most significant is always 1.
All occasions 128 higher, the most significant bit is 1. So far only seen on the first byte to be read.
I've checked the wire and the correct HEX value is read (0x14). Somehow between the wire and my
read(fd, &RxBuf, 1) it gets changed into 148.
I've marked the problem bit and I notice that it is squashed.
The other problematic communication again the bit is squashed:
It might be that despite my analyser reading this a 0 the Pi is reading it as a 1. I have no idea how to correct this. It only became a problem when I switched to the RPi3. Is there something I'm missing?
Other things that might make a difference:
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
Static hostname: octopi2
Icon name: computer
Machine ID: d38dfc478d9b4f6b9dd12af98867d7c1
Boot ID: c7c35223be9846fda7907464a622284d
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 4.19.75-v7+
Many thanks in advance.