Skip to content
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

Spurious Interrupts Temporary fix 20180711 #1625

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

stickbreaker
Copy link
Contributor

@stickbreaker stickbreaker commented Jul 12, 2018

the 'eject' ERROR is and indication of an interrupt triggering without an source. I am working to eliminate these unserviceable interrupts. This update increase stability on a HelTek Wifi Lora 32 board. with a SSD1306 OLED. This update fixes a glaring error in the interrupt allocation code, the Interrupt mask was wrong. I also dynamically adjust the FiFo thresholds based on Bus clockrate. The change to FiFo thresholds has reduced the number for 'eject' events. I also change 'eject' from and ERROR to DEBUG. An 'eject' event does not compromise i2c transmissions. It happens after a transaction has completed.

Chuck.

the 'eject' ERROR is and indication of an interrupt triggering without an source.  I am working to eliminate these serviceable interrupt.  This update increase stability on a HelTek Wifi Lora 32 board. with a SSD1306 OLED.  This update fixes a glaring error in the interrupt allocation code, the Interrupt mask was wrong.  I also dynamically adjust the FiFo thresholds based on Bus clockrate. The change to FiFo thresholds has reduced the number for 'eject' events.  I also change 'eject' from and ERROR to DEBUG.  An 'eject' event does not compromise i2c transmissions. It happens after a transaction has completed. 

Chuck.
@me-no-dev
Copy link
Member

Merged :)

@helmut64
Copy link

Hi Chuck, can it be that something serious got wrong lately with the I2C support, I updated Arduino ESP32 support and my I2C devices (e.g. ds3231, SI7021) don’t work anymore.

@helmut64
Copy link

Just a side node, instead of the Heltec ESP32 Board it is way better use our ECO Power Board, see www.radioshuttle.de.

@stickbreaker
Copy link
Contributor Author

@helmut64 me-no-dev merged in my interrupt code #1539 Jun 27.
This problem is overactive debug message. the underlying spurious interrupts can be handled by ignoring them. I am working on adjusting the driver so that it does not create circumstances were spurious interrupts are generated.

There is one major difference between my code and the original code: Any ReSTART operation will be queued until the next STOP operation:

Wire.beginTransmission(i2caddr);
Wire.write(highbyte); // setup read addres for EEPROM
Wire.write(lowbyte);
uint8_t err = Wire.endTransmission(false);  //ReSTART
 if(err!=0 ){
   Serial.printf("Error setting read addess in EEPROM =%d (%s)\n",Wire.lastError(),Wire.getErrorText(Wire.lastError()));
// err will always return 7 in this circumstance to identify this operation is queued (I2C_ERROR_CONTINUE)
} else {
  Wire.requestFrom(i2caddr,10); 
  while(Wire.available()){
    Serial.printf("0x02x ",Wire.read());
    }
  Serial.println();
  }

So, this code will not correctly display the EEPROM contents the (err != 0) needs to be (err !=7). Any ReSTART operation will return 7, so any code that uses ReSTART needs to be adjusted.

Chuck.

Curclamas pushed a commit to Curclamas/arduino-esp32 that referenced this pull request Aug 21, 2018
the 'eject' ERROR is and indication of an interrupt triggering without an source.  I am working to eliminate these serviceable interrupt.  This update increase stability on a HelTek Wifi Lora 32 board. with a SSD1306 OLED.  This update fixes a glaring error in the interrupt allocation code, the Interrupt mask was wrong.  I also dynamically adjust the FiFo thresholds based on Bus clockrate. The change to FiFo thresholds has reduced the number for 'eject' events.  I also change 'eject' from and ERROR to DEBUG.  An 'eject' event does not compromise i2c transmissions. It happens after a transaction has completed. 

Chuck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants