Skip to content

I2C fail and crashe ATMEGA4809 when i2cdetect linux command is launched #26

@goodchip

Description

@goodchip

I've a Raspberry 3 board in I2C master configuration, wired at 3 arduino boards :

  • 2 arduino pro mini (as control sample device) at 0x03 and 0x04 slave i2c address
  • 1 arduino Uno WiFi rev 2 (as 4809 test device) at 0x11 slave i2c address

NB: the crypto chip on the Uno WiFi Rev 2 has been desolded to remove any potential influence and does not appear in the addresses

The 3 boards have the same demo i2c sketch in his EEPROM :

#include <Wire.h>

void setup() {
  Wire.begin(0x~thisSlaveAddr~);
  Wire.onRequest(reqIRQ);
}

void loop() {
  delay(1000);
}

void reqIRQ() {
  Wire.write(0x01);
}

IMPORTANT : I use the Wire.h library I submitted in pull request to make the sketch working : #22

I use the following command on Pi3 to list the slaves presents on the bus:

i2cdetect -y 0

When I launch this command for the 1st time, it's happening: (normal condition)

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- 11 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

But, at the 2nd launch, the 4809 chip disappear:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

And, at the 3th launch, the i2c BUS freeze totally for undetermined time:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

A simple reset of the Uno WiFi rev 2 board, restore the freeze.

Interestingly, the following command does NOT cause the problem:

i2cdetect -r -y 0

The problem only concerns the i2cdetect command, the other master / slave communications seem to work properly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions