Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6411ac4

Browse filesBrowse files
stickbreakerme-no-dev
authored andcommitted
Remove confusing Debug output. (espressif#1574)
If Core Debug Level is at DEBUG, a confusing debug message will be emitted if the I2C transaction takes longer complete than the calculated minimum time. This original debug message was just to prove that this new i2c code could correctly handle SCL stretching or interrupt latency issues. This delay is not a problem, or an error. Usually it is caused by a higher priory interrupt starving the i2c ISR. Usually WiFi is the culprit. As long of this delay is within the configured timeout (by default 50ms, or can be set with Wire.setTimeOut(milliseconds);) no problem will occur and the transaction will successfully complete. Chuck.
1 parent 184bb06 commit 6411ac4
Copy full SHA for 6411ac4

File tree

Expand file treeCollapse file tree

1 file changed

+0
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-9
lines changed

‎cores/esp32/esp32-hal-i2c.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-i2c.c
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -990,15 +990,6 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)
990990
}
991991

992992
if(eBits&EVENT_DONE) { // no gross timeout
993-
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
994-
uint32_t expected =(totalBytes*10*1000)/i2cGetFrequency(i2c);
995-
if((tAfter-tBefore)>(expected+1)) { //used some of the timeout Period
996-
// expected can be zero due to small packets
997-
log_e("TimeoutRecovery: expected=%ums, actual=%ums",expected,(tAfter-tBefore));
998-
i2cDumpI2c(i2c);
999-
i2cDumpInts(i2c->num);
1000-
}
1001-
#endif
1002993
switch(i2c->error) {
1003994
case I2C_OK :
1004995
reason = I2C_ERROR_OK;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.