-
-
Notifications
You must be signed in to change notification settings - Fork 64
I2C fail and crashe ATMEGA4809 when i2cdetect linux command is launched #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@goodchip I'll try to reproduce the issue later this week; are you able to reproduce the issue without a Rpi3 , only using arduinos? (maybe running an i2cscan sketch) |
hi @facchinm, yes, I'm trying to do this this afternoon. PS: I also have problems of reliability with the I2C in slave mode: after a few hours of operation, the BUS falls, whereas I do not have this problem with the ATMEGA328p, I have the feeling that it could there have a connection to the i2cdetect problem, but I remain cautious for the moment. |
hi @facchinm, I've results today: I've reproduce the issue only with 1 arduino Nano and my Arduino Uno WiFi Rev2:
After the 1st scan, the BUS crashes: SDA is continuous at the level 0V and SCL too. NB: the ATMEGA328P emulation is off at the compilation. Sketch on Arduino Nano : (MASTER, I2C scanner)
Sketch on Arduino Uno WiFi Rev2: (SLAVE, I2C RECEIVER)
|
Great, thanks., I'll take a look immediately. |
@goodchip I found the problem but I'd love some help to make sure the fix doesn't hurt other stuff 😄 The offending line is
Commenting it the scan doesn't stop (it makes sense since the interrupts are not being disabled 🙂 ) |
Yes, we'll have to look at the edge effects. |
@facchinm, I tell you about my progress in my investigations:
I will continue my tests with several slaves on the BUS to give you a stronger feedback. This week. Many thanks for your reactivity! ;) |
Test always running fine this morning, totalize now 80 hours ( 1 master RPi, 1 slave 328p not interrogated for the moment, 1 slave 4809 interrogated every 200ms ). |
I think it can be safely merged then, doing it now |
I've a Raspberry 3 board in I2C master configuration, wired at 3 arduino boards :
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 :
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:
When I launch this command for the 1st time, it's happening: (normal condition)
But, at the 2nd launch, the 4809 chip disappear:
And, at the 3th launch, the i2c BUS freeze totally for undetermined time:
A simple reset of the Uno WiFi rev 2 board, restore the freeze.
Interestingly, the following command does NOT cause the problem:
The problem only concerns the i2cdetect command, the other master / slave communications seem to work properly.
The text was updated successfully, but these errors were encountered: