i2c0 transfers cause bus errors
#1
Hello,

the rock64 i2c-0 when trying to quick check discover connected devices (quick read, byte read, both), does send on occasions following the NACKed address byte a 2nd start condition and stop immediately, then another 3rd start before next transfer [see the attachment], that starts with the next device address. the additional 2nd start before the stop is bothering a STM32 slave sitting on this bus (additional data point a LPC controller does not get affected). While he STM32 seems sensitive to such errors (BERR) and causes lock-up, I am interested in knowing why does the rock64 do this.

the code looks like this:

for(i=0; i<128; i++)
{
ioctl(I2cSlave, I2C_SLAVE, i);


// i2c_smbus_write_quick(I2cSlave, I2C_SMBUS_WRITE);
rc = i2c_smbus_read_byte_data(I2cSlave, commad_word);

the bus is run at 100KHz, i even tried adding a delay in the loops for 100ms, still does not help. is there a setting in device tree or in rockchip's i2c registers to prevent this from happening? If this is not normal could some other hardware/software muxed on the port pins be causing this?

[attachment: 1 NACKd-address in the capture is a normal one, that ends with a stop and the next start condition starts the next transfer. the 2nd NACKd-address ends with a added 2nd start, then stop, followed by a start for the next transfer]

Thanks,
-Michael.


Attached Files
.png   i2c-inserted 2nd start.png (Size: 116.65 KB / Downloads: 312)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Errors were encountered while processing: initramfs-tools MotoTom 0 2,641 03-03-2019, 11:53 AM
Last Post: MotoTom
  Freeze/reboot/errors when compiling - unable to make - reproducible and not isolated jovval 2 4,449 10-02-2018, 08:10 AM
Last Post: jovval
  USB Errors with ASI camera GuLinux 0 2,047 09-18-2018, 03:48 AM
Last Post: GuLinux
  [split] Buffer I/O and blk_update_request errors i69fstop 5 6,540 06-02-2018, 10:22 PM
Last Post: pfeerick
  weird errors on boot Mentaluproar 9 11,674 03-24-2018, 05:48 AM
Last Post: pfeerick
  bionic upgrade errors 6.25 193 noob 0 2,274 03-17-2018, 01:35 PM
Last Post: noob

Forum Jump:


Users browsing this thread: 1 Guest(s)