Closed human890209 closed 6 years ago
@human890209 compile this code to see which Wire()
version you are using:
#include "Wire.h"
void setup(){
char ch[]=STICKBREAKER;
}
void loop(){}
It will generate a compiler error that displays the Version, such as:
C:\Users\user\Documents\Arduino\hardware\espressif\esp32\libraries\Wire\src/Wire.h:33:24: error: too many decimal points in number
define STICKBREAKER V1.0.1
And I will need to see the code you are using to communicate with the Device, and I need to know which device you are trying to access.
Also, realize the Wire()
library is single threaded. This means you cannot use the I2C bus from multiple tasks simultaneously. You must coordinate all access such that there is no overlap.
Chuck.
Try this:
#include <Wire.h>
static int taskCore = 0;
unsigned long previousMillis = 0;
void scan() {
Serial.println("\n Scanning I2C Addresses");
uint8_t cnt = 0;
for (uint8_t i = 0; i < 0x7F; i++) {
Wire.beginTransmission(i);
uint8_t ec = Wire.endTransmission(true);
if (ec == 0) { // Device ACK'd
if (i < 16)Serial.print('0');
Serial.print(i, HEX);
cnt++;
}
else Serial.print("..");
Serial.print(' ');
if ((i & 0x0f) == 0x0f)Serial.println();
}
Serial.print("Scan Completed, ");
Serial.print(cnt);
Serial.println(" I2C Devices found.");
}
void coreTask( void * pvParameters ) {
Wire.begin();
while (true) {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= 1000) {
previousMillis = currentMillis;
scan();
}
}
}
void setup() {
Serial.begin(112500);
delay(1000);
Serial.print("Starting to create task on core ");
Serial.println(taskCore);
xTaskCreatePinnedToCore(
coreTask, /* Function to implement the task */
"coreTask", /* Name of the task */
10000, /* Stack size in words */
NULL, /* Task input parameter */
0, /* Priority of the task */
NULL, /* Task handle. */
taskCore); /* Core where the task should run */
Serial.println("Task created...");
}
void loop() {
delay(100);
}
Hi, @stickbreaker
I find the version is #define STICKBREAKER V1.0.1
in Wire.h
A simpler code is
// YANG add for process on Core 0
void I2CGeneralMaster::processCore0()
{
// Not Processing or Processing2, return
if (static_status != Processing && static_status != Processing2) return;
TwoWireMOD* tw;
switch (static_data[0])
{
default:
//case 0:
tw = &WireMOD;
break;
case 1:
tw = &WireMOD2;
break;
}
byte address = static_data[1];
// Check if BUS is busy
if (!tw->contactSlave(address))
{
return;
}
if (static_length > 0 && static_status == Processing)
{
tw->beginTransmission(address);
for (byte i = 0; i < static_length; i++)
{
tw->write(static_buffer[i]);
}
byte result = tw->endTransmission();
//spf("endTransmission result: ");
//spl(result);
// YANG add begin to recover hung bus on Core 0
tw->begin();
// Check result state
if (result == I2C_ERROR_OK)
{
// Success
static_status = Processing2;
}else{
// Failed
return;
}
}
byte output_quentity = static_data[4];
if (output_quentity > 0)
{
// Request
if (tw->requestFrom(address, output_quentity) == 0)
{
// YANG add begin to recover hung bus on Core 0
tw->begin();
return;
}
// Store the received data into buffer
byte index = 0;
for (byte i = 0; i < output_quentity; i++)
{
static_buffer[index] = tw->read();
index++;
}
// YANG add begin to recover hung bus on Core 0
tw->begin();
}
// Set status to Finish
static_status = Finish;
}
TwoWireMOD adds some flags and custom functions and inherits Wire. This is to communicate with an Arduino which is set up as an I2C Client to do some test. I find the bugs with this. You could notice I add some tw->begin() to fix the bug for now. But that is not stable, I'm still testing this fix.
And I'm working on the extEEPROM library, trying to get it working on Core 0 with this fix, but it doesn't work 100% or now. So I post to ask for help.
Thought I2C tasks are on both my core. But I don't fire them at the same time. I'm not using a lot of sensor of I2C for now. Only this self-made general master and extEEPROM. And the test I do only use one of them. But the wire initialization is done with Setup on Core 1. something like WireMOD.begin(xxx), WireMOD.setFrequency(xxx)...
Hi, @chinswain. Thank you for your example.
@human890209 the i2c subsystem has extensive debugging controls, start by uncommenting ENABLE_I2C_DEBUG_BUFFER
here: enable debug buffer
then set the ESP32 debug level to VERBOSE
Any Errors will appear on the Serial Monitor.
You can manually force the I2C subsytem to output diagnostic data with
Wire.setDebugFlags( uint32_t setBits, uint32_t resetBits);
the values of setBits
and resetBits
are:
Debug actions have 3 currently defined locus 0xXX------ : at entry of ProcQueue, before peripheral ISR starts moving data 0x--XX---- : at exit of ProcQueue, after peripheral ISR, has completed 0x------XX : at entry of Flush
bit 0 causes DumpI2c to execute , shows global i2c control record bit 1 causes DumpInts to execute, list all interrupts serviced during this request bit 2 causes DumpCmdqueue to execute, lists each i2c queue (action) element bit 3 causes DumpStatus to execute, shows current i2c Peripheral status word bit 4 causes DumpFifo to execute, shows all data that is sent out through peripheral
I would identify where you see Wire()
failing and turn on debuging before the failing Wire()
call.
You said the Wire.requestFrom()
was returning bad data, so add
tw->setDebugFlags(0x00070000,0); // set debug to output at completion of i2c action
if (tw->requestFrom(address, output_quentity) == 0)
{
tw->setDebugFlags(0,0x00070000); // turn off debug
// .....
return;
}
tw->setDebugFlags(0,0x00070000); // turn off debug
chuck.
Hi, @stickbreaker. I add the debug in to my code and comment out my tw->begin() fix to reproduce the bugs. Things are complecated. I should explain more to help you understand my bug. This is my Arduino I2C Test Slave's Sketch:
#include "Arduino.h"
#include "Wire.h"
#define ADDRESS 0x30
#define FREQUANCY 400000
volatile byte buffer[32] = {8};
volatile byte buffer_pos = 1;
volatile bool updated = false;
volatile bool sent = false;
void setup()
{
Serial.begin(115200);
Serial.println("Start");
Wire.begin(ADDRESS);
Wire.setClock(FREQUANCY);
Wire.onReceive(receiveCommand);
Wire.onRequest(messageRequested);
}
void receiveCommand(int howMany)
{
for (byte i = 0; i < howMany; i++)
{
buffer[i] = Wire.read();
}
buffer_pos = howMany;
updated = true;
}
void messageRequested()
{
Wire.write((byte*)buffer,buffer_pos);
sent = true;
}
void loop()
{
if (updated)
{
updated = false;
Serial.print(F("Receive: "));
for (byte i = 0; i < buffer_pos; i++)
{
if (i != 0)
{
Serial.print(' ');
}
Serial.print(buffer[i]);
}
Serial.println();
}
if (sent)
{
sent = false;
Serial.print(F("Sent: "));
for (byte i = 0; i < buffer_pos; i++)
{
if (i != 0)
{
Serial.print(' ');
}
Serial.print(buffer[i]);
}
Serial.println();
}
}
It print the received and sent data in Serial Monitor, that's how I test my General Master Result.
Step 1, I comment out all my tw->begin() fix to reproduce the bug. I use GeneralMaster transmit a Long 10000, which is encoded into 16 39 0 0 by my code and transmit with GeneralMaster on Core 0, and than request the 4 bytes. And the Serial Monitor of Arduino Test Slave print:
Receive: 16 39 255 255
Receive: 255 255 255 255
I fire this with a button, so I press more times. The result:
Receive: 16 39 255 255
Receive: 255 255 255 255(Last one)
Sent: 255 255 255 255
Receive: 255 255 255 255(press again)
Sent: 255 255 255 255
Receive: 255 255 255 255(press again)
Sent: 255 255 255 255
Receive: 255 255 255 255(press again)
And I reset my Master ESP32 and redo again.
Receive: 16 39 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Receive: 16 39 255 255(After reset first press)
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
And I turned on the debug for I2C as you told me todo. I can't reproduce the bug.... I2C works normally. That's why I need to explain more
Receive: 16 39 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Receive: 16 39 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Receive: 16 39 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Receive: 16 39 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 255 255 255 255(Debug Off)
Receive: 16 39 0 0 (Debug ON)
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
Receive: 16 39 0 0
Sent: 16 39 0 0
I add debug before
tw->beginTransmission(address);
and reset it before each return and the last one, cause the transmission got bug, too.
The I2C debug log. Sorry it's a bit messy cause it's not from Serial Monitor.
09:58:31.122 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:31.123 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:31.125 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:31.126 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:31.127 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:31.128 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:31.128 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:31.130 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:31.131 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:31.134 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:31.135 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:31.136 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:31.138 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:31.139 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:31.140 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:31.141 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:31.145 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:58:31.148 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:31.150 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:31.150 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0000ff24
09:58:31.151 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0000ff24
09:58:31.153 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x0000ff25
09:58:31.154 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.155 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:31.156 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:58:31.157 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:31.157 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:31.158 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.159 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.160 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.161 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.161 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.162 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.163 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.163 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.165 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.165 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.167 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.167 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:31.168 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:31.169 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:31.169 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:31.171 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:31.171 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:31.172 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:31.172 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:31.173 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:31.174 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:31.175 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:31.176 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:31.177 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:31.195 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:31.196 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:31.205 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:31.206 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
09:58:31.206 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:31.207 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:31.207 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x0000ff42
09:58:31.208 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0000ff42
09:58:31.208 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0004 0x0000ff42
09:58:31.208 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.209 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:31.209 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
09:58:31.210 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
09:58:31.211 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:31.211 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.211 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.212 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.212 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.212 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.213 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.213 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.213 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.214 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.214 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:31.215 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.506 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:32.506 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:32.508 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:32.508 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:32.509 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:32.510 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:32.511 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:32.512 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:32.514 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:32.515 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:32.516 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:32.517 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:32.518 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:32.519 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:32.519 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:32.520 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:32.521 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:58:32.523 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:32.525 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:32.525 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0001048a
09:58:32.526 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0001048a
09:58:32.528 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x0001048a
09:58:32.529 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.531 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:32.532 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:58:32.533 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:32.534 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:32.535 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.535 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.536 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.537 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.537 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.538 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.539 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.540 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.541 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.541 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.543 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.543 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:32.544 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:32.545 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:32.545 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:32.547 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:32.548 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:32.548 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:32.549 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:32.550 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:32.551 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:32.552 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:32.552 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:32.553 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:32.554 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:32.555 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:32.556 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:32.556 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
09:58:32.557 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:32.558 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:32.559 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x000104a7
09:58:32.561 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x000104a7
09:58:32.562 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0004 0x000104a8
09:58:32.563 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.563 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:32.564 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
09:58:32.565 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
09:58:32.567 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:32.568 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.569 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.569 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.570 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.571 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.572 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.573 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.573 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.574 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.575 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:32.576 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.721 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:33.722 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:33.723 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:33.725 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:33.725 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:33.726 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:33.727 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:33.728 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:33.729 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:33.731 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:33.732 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:33.732 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:33.733 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:33.735 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:33.735 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:33.737 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:33.737 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:58:33.739 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:33.739 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:33.740 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0001094b
09:58:33.742 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0001094b
09:58:33.742 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x0001094b
09:58:33.743 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.745 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:33.747 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:58:33.748 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:33.749 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:33.749 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.751 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.753 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.753 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.754 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.755 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.756 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.757 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.759 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.760 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.761 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.762 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:58:33.763 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:58:33.764 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:58:33.765 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:58:33.766 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:58:33.766 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:58:33.767 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:58:33.768 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:58:33.769 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:58:33.770 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:58:33.770 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3cf0
09:58:33.771 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:58:33.772 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:58:33.773 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:58:33.774 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:58:33.775 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
09:58:33.776 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
09:58:33.776 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:58:33.777 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:58:33.778 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x00010969
09:58:33.780 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x00010969
09:58:33.781 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0004 0x00010969
09:58:33.783 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.783 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:58:33.784 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
09:58:33.785 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
09:58:33.787 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:58:33.788 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.788 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.789 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.790 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.790 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.792 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.792 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.793 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.794 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.795 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:58:33.796 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
I guess may be the debug print slow things down. Arduino Slave's Result is correct. And thess I2C debug is beyond my knowledge, I don't know if the I2C got bug now. Hope the infomation is helpful for you. @stickbreaker
And I can't leave the log on to solve this problem, cause the debug log will get mess with my Serial Communication. Hope there will be a better solution.
@human890209
09:58:31.145 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111 09:58:31.148 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00 09:58:31.150 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick 09:58:31.150 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0000ff24 09:58:31.151 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0000ff24 09:58:31.153 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x0000ff25
Ok, this first block show a Write to device a 0x30 of 4 characters: 0x10 0x27 0x00 0x00 The ISR was activated 3 times. the first at tick=0x0000ff24, intr source 0x0002(TX Fifo Empty), and it added 5 bytes to the output FiFo(tx) the next activation was at tick 0x0000ff24, intr Source 0x0200(StartTransaction) the final activation was at tick 0x0000ff25, intr Source 0x0080(STOP) everything looks ok, 4 bytes transferred with no errors reported.
Next Block:
09:58:31.206 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111 09:58:31.206 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00 09:58:31.207 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick 09:58:31.207 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x0000ff42 09:58:31.208 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x0000ff42 09:58:31.208 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0004 0x0000ff42
Ok, the above data show 4 bytes were Read from device at: 0x30. Data: 0x10 0x27 0x00 0x00 The ISR was activated 3 times. the first at tick=0x0000ff42, intr source 0x0002(TX Fifo Empty), and it added 1 byte to the output FiFo(tx) the next activation was at tick 0x0000ff42, intr Source 0x0200(StartTransaction) the final activation was at tick 0x0000ff42, intr Source 0x0080(STOP) and it emptied 4 bytes from the RXFifo No problems, everything looks ok, 4 bytes transferred with no errors reported.
How fast are you sending and receiving to the Arduino?
Put a delay between operations on the ESP32 side. The Arduino cannot service a i2c interrupt while
the onReceive()
or onRequest()
callback are executing. The Arduino is only operating on a 20mhz clock.
Can you show me the exact code you are using on the ESP32? I would recommend you check the return codes:
uint8_t err = Wire.endTransmission();
/* error codes are zero based
const char ERRORTEXT[] =
"OK\0"
"DEVICE\0"
"ACK\0"
"TIMEOUT\0"
"BUS\0"
"BUSY\0"
"MEMORY\0"
"CONTINUE\0"
"NO_BEGIN\0"
"\0";
*/
uint8_t count = Wire.requestFrom(id,inCount);
if(count!=inCount){ // then use lastError() to retrieve the error
err = Wire.lastError();
} else err = 0;
if(err != 0) {
Serial.printf("Wire had a problem: %d(%s)\n",err,Wire.getErrorText(err));
}
Chuck.
Hi, @stickbreaker
How fast are you sending and receiving to the Arduino?
The I2C clock is 400,000. And the send frequency is controlled by a button, I add a deley(200) after the task to debounce, I press it again after about 1 second, even I hold the button, it will be fired at 200ms interval. And I tried to add a delay(200) before Transmit and Request.
And this time I enable the Debug withtw->setDebugFlags(0x00070000,0)
and reproduce the bug.
---Press Button
Receive: 16 39 0 0
Receive: 255 255 255 255
---Press Button
Sent: 255 255 255 255
Receive: 96 16 39 0
Receive: 255 255 255 255
---Press Button
Sent: 255 255 255 255
Receive: 96 16 39 0
Receive: 255 255 255 255
My Code:
// YANG add for process on Core 0
void I2CGeneralMaster::processCore0()
{
// Not Processing or Processing2, return
if (static_status != Processing && static_status != Processing2) return;
TwoWireMOD* tw;
switch (static_data[0])
{
default:
//case 0:
tw = &WireMOD;
break;
case 1:
tw = &WireMOD2;
break;
}
byte address = static_data[1];
// Check if BUS is busy
if (!tw->contactSlave(address))
{
return;
}
tw->setDebugFlags(0x00070000,0); // set debug to output at completion of i2c action
if (static_length > 0 && static_status == Processing)
{
delay(200);
tw->beginTransmission(address);
for (byte i = 0; i < static_length; i++)
{
tw->write(static_buffer[i]);
}
byte result = tw->endTransmission();
// YANG add begin to recover hung bus on Core 0
//tw->begin();
// Check result state
if (result == I2C_ERROR_OK)
{
// Success
static_status = Processing2;
}else{
// Failed
tw->setDebugFlags(0,0x00070000); // turn off debug
spf("endTransmission result: ");
spl(tw->getErrorText(result));
return;
}
}
byte output_quentity = static_data[4];
if (output_quentity > 0)
{
// Request
delay(200);
if (tw->requestFrom(address, output_quentity) != output_quentity)
{
// YANG add begin to recover hung bus on Core 0
//tw->begin();
tw->setDebugFlags(0,0x00070000); // turn off debug
spf("requestFrom result: ");
spl(tw->getErrorText(tw->lastError()));
return;
}
// Store the received data into buffer
byte index = 0;
for (byte i = 0; i < output_quentity; i++)
{
static_buffer[index] = tw->read();
index++;
}
// YANG add begin to recover hung bus on Core 0
//tw->begin();
}
// Set status to Finish
static_status = Finish;
tw->setDebugFlags(0,0x00070000); // turn off debug
}
The I2C log:
14:56:52.183 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:52.183 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:52.184 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:52.184 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:52.185 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:52.186 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:52.186 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:52.187 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:52.187 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:52.189 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:52.189 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:52.190 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:52.190 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:52.192 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:52.192 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:52.193 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:52.194 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
14:56:52.196 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
14:56:52.197 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:52.197 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x000039f4
14:56:52.198 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x000039f4
14:56:52.199 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x000039f4
14:56:52.200 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.202 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:52.203 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
14:56:52.203 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:52.204 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.205 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.205 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.207 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.208 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.208 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.209 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.210 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.211 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.212 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.212 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.213 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.413 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:52.415 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:52.417 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:52.420 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:52.422 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:52.424 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:52.426 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:52.426 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:52.427 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:52.429 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:52.430 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:52.431 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:52.432 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:52.433 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:52.434 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:52.435 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:52.437 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
14:56:52.438 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .... ff ff ff ff
14:56:52.439 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:52.440 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0001 0x0000 0x00003ad9
14:56:52.441 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0080 0x0000 0x0004 0x00003ad9
14:56:52.442 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:52.443 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:52.445 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
14:56:52.446 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
14:56:52.447 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:52.449 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.414 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:54.419 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:54.421 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:54.426 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:54.430 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:54.432 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:54.435 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:54.437 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=3
14:56:54.438 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=13
14:56:54.440 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:54.442 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:54.443 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:54.445 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:54.445 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=-1
14:56:54.446 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:54.447 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:54.448 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
14:56:54.450 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
14:56:54.451 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:54.452 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0005 0x0000 0x000042a7
14:56:54.454 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0400 0x0000 0x0000 0x000042a7
14:56:54.455 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.457 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:54.459 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] N WRITE val[0] exp[0] en[1] bytes[4]
14:56:54.461 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] N STOP val[0] exp[0] en[0] bytes[0]
14:56:54.462 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:54.464 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.465 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.466 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.467 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.468 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.469 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.469 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.470 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.471 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.472 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.472 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.473 websocket.js:192 <--endTransmission result: ACK
14:56:54.636 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:54.637 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:54.638 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:54.638 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:54.639 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:54.640 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:54.641 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:54.641 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:54.642 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:54.644 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:54.644 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:54.645 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:54.646 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:54.646 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:54.646 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:54.647 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:54.648 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
14:56:54.649 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
14:56:54.649 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:54.651 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0005 0x0000 0x0000438b
14:56:54.652 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0080 0x0000 0x0000 0x0000438b
14:56:54.652 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.652 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:54.657 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
14:56:54.657 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:54.657 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:54.658 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.658 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.665 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.666 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.666 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.667 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.667 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.667 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.667 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.668 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.668 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.897 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:54.899 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:54.900 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:54.902 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:54.902 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:54.903 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:54.904 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:54.905 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:54.906 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:54.906 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:54.914 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:54.915 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:54.916 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:54.916 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:54.917 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:54.917 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:54.918 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
14:56:54.919 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .... ff ff ff ff
14:56:54.920 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:54.921 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0001 0x0000 0x0000446f
14:56:54.921 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0080 0x0000 0x0004 0x0000446f
14:56:54.922 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.922 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:54.923 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
14:56:54.923 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
14:56:54.924 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:54.924 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.924 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.925 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.925 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.926 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.927 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.928 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.929 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.929 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.931 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:54.932 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.540 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:56.541 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:56.541 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:56.542 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:56.542 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:56.543 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:56.545 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:56.545 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=3
14:56:56.545 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=13
14:56:56.547 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:56.547 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:56.548 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:56.549 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:56.551 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=-1
14:56:56.551 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:56.551 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:56.552 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
14:56:56.554 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
14:56:56.555 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:56.556 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0005 0x0000 0x00004afb
14:56:56.556 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0400 0x0000 0x0000 0x00004afb
14:56:56.557 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.558 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:56.559 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] N WRITE val[0] exp[0] en[1] bytes[4]
14:56:56.561 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] N STOP val[0] exp[0] en[0] bytes[0]
14:56:56.561 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:56.562 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.563 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.564 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.565 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.565 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.566 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.567 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.567 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.568 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.569 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.570 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.570 websocket.js:192 <--endTransmission result: ACK
14:56:56.771 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:56.772 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:56.775 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:56.776 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:56.777 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:56.777 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:56.778 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:56.778 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:56.779 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:56.781 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:56.789 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:56.790 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:56.790 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:56.790 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:56.791 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:56.792 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:56.793 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
14:56:56.793 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
14:56:56.794 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:56.794 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0005 0x0000 0x00004bdf
14:56:56.795 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0080 0x0000 0x0000 0x00004bdf
14:56:56.796 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.797 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:56.798 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
14:56:56.799 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:56.799 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:56.800 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.801 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.802 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.810 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.811 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.811 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.811 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.812 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.812 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.813 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.814 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:56.996 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
14:56:56.997 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
14:56:56.999 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
14:56:57.000 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
14:56:57.001 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
14:56:57.002 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
14:56:57.003 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
14:56:57.004 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
14:56:57.005 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
14:56:57.007 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
14:56:57.008 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb3b84
14:56:57.009 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
14:56:57.010 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
14:56:57.012 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
14:56:57.012 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
14:56:57.015 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x00070000
14:56:57.016 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=4, ctrl=11111
14:56:57.017 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .... ff ff ff ff
14:56:57.018 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
14:56:57.018 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0202 0x0001 0x0000 0x00004cc3
14:56:57.019 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0080 0x0000 0x0004 0x00004cc3
14:56:57.020 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.021 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
14:56:57.023 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
14:56:57.023 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
14:56:57.024 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
14:56:57.025 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.025 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.027 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.028 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.028 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.029 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.030 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.030 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.031 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.032 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
14:56:57.033 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
There are 4 extra 255 be received by the Slave. And the later Received data's first byte is 96. Got ACK error when transmitting.
I use a logic analyzer to check the signal.
I disabled everything include tw->setDebugFlags(0x00070000,0)
and tw->begin()
and set the delay between transmit and request to 100ms. The interval between my I2CGeneralMaster::processCore0() set to 300ms, that the phase could be identify by time easily.
// YANG add for process on Core 0
void I2CGeneralMaster::processCore0()
{
// Not Processing or Processing2, return
if (static_status != Processing && static_status != Processing2) return;
TwoWireMOD* tw;
switch (static_data[0])
{
default:
//case 0:
tw = &WireMOD;
break;
case 1:
tw = &WireMOD2;
break;
}
byte address = static_data[1];
// Check if BUS is busy
if (!tw->contactSlave(address))
{
return;
}
//tw->setDebugFlags(0x00070000,0); // set debug to output at completion of i2c action
if (static_length > 0 && static_status == Processing)
{
tw->beginTransmission(address);
for (byte i = 0; i < static_length; i++)
{
tw->write(static_buffer[i]);
}
byte result = tw->endTransmission();
delay(100);
// YANG add begin to recover hung bus on Core 0
//delayMicroseconds(500);
//tw->begin();
// Check result state
if (result == I2C_ERROR_OK)
{
// Success
static_status = Processing2;
}else{
// Failed
//tw->setDebugFlags(0,0x00070000); // turn off debug
//spf("endTransmission result: ");
//spl(tw->getErrorText(result));
return;
}
}
byte output_quentity = static_data[4];
if (output_quentity > 0)
{
// Request
if (tw->requestFrom(address, output_quentity) != output_quentity)
{
// YANG add begin to recover hung bus on Core 0
//tw->begin();
//tw->setDebugFlags(0,0x00070000); // turn off debug
//spf("requestFrom result: ");
//spl(tw->getErrorText(tw->lastError()));
return;
}
// Store the received data into buffer
byte index = 0;
for (byte i = 0; i < output_quentity; i++)
{
static_buffer[index] = tw->read();
index++;
}
// YANG add begin to recover hung bus on Core 0
//tw->begin();
}
// Set status to Finish
static_status = Finish;
//tw->setDebugFlags(0,0x00070000); // turn off debug
}
Overall: There are 10 groups divided by 300ms gap. I name the first group Group1. Group1 got 2 messages, so Messages will be called 1-1 and 1-2. The latter groups got 3 messages each. Messages will be called 2-1, 2-2, 2-3, 3-1, 3-2, 3-3,....
Group 1 Message 1-1 I guess this is a correct 16 39 0 0 Transmit Message
Message 1-2 I think the 255 255 255 255 message is this. It's wired that the first group doesn't send Request Message.
Group 2 Message 2-1 The second group begins with a Request Message, it's wired. Should be sent in Group 1.
Message 2-2 This is a 96 16 39 0 message. What's this? Is it send by ESP32 Master or an answer to the Request?
Message 2-3 Another 255 255 255 255 message. I don't know what this is.
Group 3 Message 3-1 Same as Group2, started with a Request. Same question...
Message 3-2 Just like Message 2-2
Message 3-3 Another 255 255 255 255 message. Just like Message 2-3
Group 4-10 are same as Group 2 or 3.
Arduino Slave's Log
Receive: 16 39 0 0
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 96 16 39 0
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 96 16 39 0
Receive: 255 255 255 255
Sent: 255 255 255 255
Receive: 96 16 39 0
Receive: 255 255 255 255
Transaction at 56.540 shows ACK ERROR on address byte. 56.551 ERROR_BYTE = -1 address byte in queue 0 56.561 DUMPCMDQUEUE N means peripheral did not execute command(write of 4 data bytes) 56.556 DUMPINTS 0x0400 ACK ERROR
54.414 Shows ACK ERROR also
Hi, @stickbreaker I update more evidence. How to deal with this bug?
Not bug, slave did not answer.
When you see ACK ERROR(which means Not Acknowledge) retry command.
Slave was Busy, not listening to bus.
Chuck.
Just saw scope pictures.
Group 1 decode is invalid Change scope to analog capture
Do you have pullups on SDA, SCL? Need 2.4k and esp32 is 3.3v Arduino Uno is 5v Need level shifters between. ESP32 CANNOT handle 5v pullups. And Uno wont work with 3.3v pullups.
Chuck
Hi, @stickbreaker I'm using a Level shifter(5v - 3.3v for I2C) module between Arduino Nano and ESP32, and it got Pullup resister on it. I don't know if the resister is 2.4k. My logic scope doesn't get an analog mode. I think the scope pictures match Arduino's Serial Monitor log. I start the logic scope manually and start the process of I2C, not trigger by Rising Or Falling.
See little triangles on SCL signal? They mark rising Edge detection by scope, cannot have two in a row, need negative edge between.
Signal is glitchy, need to see raw signal. Set scope to 2v/div 10ms/div
Chuck.
What scope?
An old model of Saleae
Describe level shifter, should have pullups on both sides, usually 10k to 3.3v and 10k to 5v
Saleae usb? I think it does have analog mode. Need to see raw signal.
Before I switch the I2C to Core 0, I used it on Core 1 before. And tested with this Arduino, too. Everything works fine before. And I2C works fine with ExtEEPROM and MPU on Core 1. New Saleae got analog. Mine is an old model. I will take a picture of my shifter.
How many channels on scope?
I2c doesnt show any bugs, problem outside esp32
How many channels on scope?
16 Logic Channels
Try to slow down Esp32 100k or 50k If bus electrical pullups weak, slower better/
Shifter
I2c doesnt show any bugs, problem outside esp32
Is the 255 255 255 255 and 96 16 39 0 normal? I don't know if this is a part of the protocol of I2C.
Ok, I will try a lower frequency. But if the speed is too slow, I have to use it on Core 1 again... I'm wondering if Core 0 is different from Core 1? Did I miss some settings for the Task of Core 0?
No, not correct. Group 3.3 write 255, 255, 255, 255 3.2 write 0x60 0x10 0x27 0x00
Actually 3.2 is weird.
Output is 0x60 (address 0x30 + write) 0x60 0x10 0x27 0x00
Looks like merge of NAK Write and next Write?
Lower frequency worked. Thanks, @stickbreaker. Maybe I used 100k before... Seems I become more greed about the time consumption when the project carried on...
Looks like issue with peripheral fifo, old address from NAK failure still in fifo. New data appended. So peripheral sent 0x60, 0x60(96 dec), 0x10(16 dec), 0x27(39 dec), 0x0 The last zero never left fifo.
Change debug cmd to 0x001f0000
So should I use 400k as frequency and test again? Or using 100k or lower?
Pullups on level shifter only 10k (103 markings)
Thanks, @stickbreaker I will clean up my codes and make some more test on 100k, If the error is reproduced, I will use the new debug flag and paste my code and I2C log here.
How long are the wires?
Hi, @chinswain 20cm lines on both sides of the Shifter Module.
Hi, @stickbreaker I've used my logic scope to test the I2C work under 50k and 100 frequency. I see a different pattern from 400k. 100k the results are right. No error. 400k the results are wrong. Get ACK errors.
The delay setting is the same Transmit-100ms-Request-300ms-Transmit-100ms-Request-300ms...
Code:
// YANG add for process on Core 0
void I2CGeneralMaster::processCore0()
{
// Not Processing, return
if (static_status != Processing) return;
TwoWireMOD* tw;
switch (static_data[0])
{
default:
//case 0:
tw = &WireMOD;
break;
case 1:
tw = &WireMOD2;
break;
}
byte address = static_data[1];
byte output_quentity = static_data[4];
byte result;
// YANG updated this with updateCore
// Check if BUS is busy
if (!tw->contactSlave(address))
{
return;
}
#ifdef I2C_DEBUG_FLAG
// set debug to output at completion of i2c action
tw->setDebugFlags(I2C_DEBUG_FLAG,0);
#endif // I2C_DEBUG_FLAG
if (static_length > 0 && static_status == Processing)
{
tw->beginTransmission(address);
for (byte i = 0; i < static_length; i++)
{
tw->write(static_buffer[i]);
}
result = tw->endTransmission();
delay(100);
// if (output_quentity == 0)
// {
// // No request later
// result = tw->endTransmission();
// }else{
// // Request later
// result = tw->endTransmission(false);
// }
// Check result state
if ( result != I2C_ERROR_OK && result != I2C_ERROR_CONTINUE)
{
// Failed
#ifdef I2C_DEBUG_FLAG
// turn off debug
tw->setDebugFlags(0,I2C_DEBUG_FLAG);
#endif // I2C_DEBUG_FLAG
spf("endTransmission result: ");
spl(tw->getErrorText(result));
return;
}
}
if (output_quentity > 0)
{
// Request
if (tw->requestFrom(address, output_quentity) != output_quentity)
{
#ifdef I2C_DEBUG_FLAG
// turn off debug
tw->setDebugFlags(0,I2C_DEBUG_FLAG);
#endif // I2C_DEBUG_FLAG
spf("requestFrom result: ");
spl(tw->getErrorText(tw->lastError()));
return;
}
// Store the received data into buffer
byte index = 0;
for (byte i = 0; i < output_quentity; i++)
{
static_buffer[index] = tw->read();
index++;
}
}
// Set status to Finish
static_status = Finish;
#ifdef I2C_DEBUG_FLAG
// turn off debug
tw->setDebugFlags(0,I2C_DEBUG_FLAG);
#endif // I2C_DEBUG_FLAG
}
The scope pattern of 50k and 100k are almost the same, so I use 100k's screenshot.
Test1 I2C Frequency: 100,000 Overall: 11 Groups divided by 300ms interval, each Group got 2 Messages Group 1, Group 2,... Message 1-1, Message 1-2, Message 2-1, Message 2-2...
Group 1 Message 1-1
Message 2-1
Group 2 Message 2-1
Message 2-2
I notice that there are thin signals, these thing signals also exists when the Frequency is 50k
Test2 I2C Frequency: 400,000 Overall: 11 Groups divided by 300ms interval You could notice the 2 3 3 3 pattern, different from the 2 2 2 2 pattern of 100k
Group 1 Message 1-1 Same as last 400k test's screenshot.
Message 1-2 Same as last 400k test's screenshot. Why send 255 255 255 255?
Group 2 Message 2-1 Same as last 400k test's screenshot. Request Message?
Message 2-2 Same as last 400k test's screenshot.
Message 2-3 Same as last 400k test's screenshot.
I don't know if this strange 2333 pattern is caused by Physical RC problems. I will use the new debug flag to get the I2C Log later.
Hi, @stickbreaker I use the new debug flag 0x001f0000 to get the I2C log.
It's wired the I2C keep transmitting and don't stop. The return of endTransmit is TimeOut, and process0() is been retried again and again. I try to set the frequency to 100k and 50k. I still get Timeout Error.
The operation is changed by setting debug on. I think the error isn't reproduced, this could be something else.
Overall: No Group just keep retrying.
Message 1
Message 2
Message 3
Message 4
Message 5
I2C Log:
09:22:22.055 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.066 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.067 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.067 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.068 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.069 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.071 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.072 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.072 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=10
09:22:22.073 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.074 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.074 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.075 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.075 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.076 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=0
09:22:22.077 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.078 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.078 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.079 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.079 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005d49
09:22:22.081 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [02] 0x0001 0x0200 0x0000 0x0000 0x00005d49
09:22:22.082 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [03] 0x0001 0x0080 0x0000 0x0000 0x00005d49
09:22:22.085 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.086 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.087 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:22:22.088 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.088 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.089 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.090 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.091 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.092 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.093 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.094 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.094 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.095 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.096 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.097 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.098 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.100 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(0) tx(0) sclMain(6) scl(6)
09:22:22.101 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): WRITE 0x300010 0027 0000 0000
09:22:22.257 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x5dcd, end=0x5dff, =50, max=50 error=1
09:22:22.257 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.258 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.258 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.258 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.259 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.260 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.261 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.261 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.263 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.264 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.265 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.265 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.266 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.267 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.268 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.269 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=0, ctrl=11111
09:22:22.269 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .... 00 00 00 00
09:22:22.270 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.271 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x00005dcd
09:22:22.271 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.272 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.274 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.274 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.277 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.278 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.279 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.280 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.281 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.282 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.284 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.285 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.286 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.289 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.289 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.290 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.291 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 R STOP buf@=0x3ffc4ef8, len=4, pos=0, ctrl=11111
09:22:22.291 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .... 00 00 00 00
09:22:22.292 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.293 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x00005dcd
09:22:22.295 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.295 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.296 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3]
09:22:22.297 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1]
09:22:22.297 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.298 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.300 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.301 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.302 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.302 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.303 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.304 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.305 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.306 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.306 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.307 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.308 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(4) tx(0) sclMain(5) scl(6)
09:22:22.309 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): READ 0x30
09:22:22.310 websocket.js:192 <--requestFrom result: TIMEOUT
09:22:22.330 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x5e2a, end=0x5e5c, =50, max=50 error=1
09:22:22.330 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.331 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.331 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.332 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.332 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.333 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.334 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.336 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.336 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.338 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.338 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.339 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.339 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.340 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.341 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.342 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.343 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.344 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.346 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005e2a
09:22:22.346 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.347 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.347 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.348 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.348 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.349 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.350 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.350 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.351 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.351 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.352 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.353 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.354 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.355 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.356 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.356 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.357 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.358 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.359 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.359 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005e2a
09:22:22.361 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.361 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.362 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:22:22.363 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.364 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.365 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.366 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.367 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.368 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.369 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.370 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.371 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.373 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.374 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.375 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.375 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.376 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(0) tx(0) sclMain(6) scl(6)
09:22:22.377 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): WRITE 0x300010 0027 0000 0000
09:22:22.466 websocket.js:192 <--endTransmission result: TIMEOUT
09:22:22.521 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x5eeb, end=0x5f1d, =50, max=50 error=1
09:22:22.524 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.525 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.526 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.527 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.527 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.528 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.530 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.531 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.532 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.532 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.533 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.533 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.538 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.538 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.539 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.545 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.545 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.545 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.546 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005eeb
09:22:22.546 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.546 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.546 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.559 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.559 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.560 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.560 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.561 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.561 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.561 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.562 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.562 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.563 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.563 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.563 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.564 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.564 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.564 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.566 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.566 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005eeb
09:22:22.567 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.567 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.568 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:22:22.569 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.570 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.571 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.573 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.573 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.574 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.575 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.576 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.578 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.579 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.580 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.581 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.582 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.583 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(0) tx(0) sclMain(6) scl(6)
09:22:22.585 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): WRITE 0x300010 0027 0000 0000
09:22:22.659 websocket.js:192 <--endTransmission result: TIMEOUT
09:22:22.715 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x5fac, end=0x5fde, =50, max=50 error=1
09:22:22.715 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.716 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.716 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.717 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.718 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.719 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.720 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.720 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.721 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.721 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.722 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.723 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.723 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.724 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.725 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.725 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.726 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.727 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.727 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005fac
09:22:22.728 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.728 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.729 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.730 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.731 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.732 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.733 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.733 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.734 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.739 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.740 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.740 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.741 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.741 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.741 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.742 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.742 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.743 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.751 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.752 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x00005fac
09:22:22.752 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.753 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.753 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:22:22.754 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.754 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.755 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.755 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.755 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.756 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.758 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.758 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.760 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.760 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.761 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.762 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.762 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.763 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(0) tx(0) sclMain(6) scl(6)
09:22:22.764 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): WRITE 0x300010 0027 0000 0000
09:22:22.857 websocket.js:192 <--endTransmission result: TIMEOUT
09:22:22.908 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x606d, end=0x609f, =50, max=50 error=1
09:22:22.909 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.909 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.910 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.911 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.912 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.912 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.913 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.916 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.916 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.918 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.918 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.919 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.920 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.921 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.921 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.924 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.924 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.925 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.926 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0000606d
09:22:22.927 websocket.js:192 <--[I][esp32-hal-i2c.c:431] i2cTriggerDumps(): after ProcQueue
09:22:22.928 websocket.js:192 <--[E][esp32-hal-i2c.c:314] i2cDumpI2c(): i2c=0x3ffc1260
09:22:22.929 websocket.js:192 <--[I][esp32-hal-i2c.c:315] i2cDumpI2c(): dev=0x60013000 date=0x16042000
09:22:22.929 websocket.js:192 <--[I][esp32-hal-i2c.c:317] i2cDumpI2c(): lock=0x3ffd7528
09:22:22.932 websocket.js:192 <--[I][esp32-hal-i2c.c:319] i2cDumpI2c(): num=0
09:22:22.933 websocket.js:192 <--[I][esp32-hal-i2c.c:320] i2cDumpI2c(): mode=1
09:22:22.934 websocket.js:192 <--[I][esp32-hal-i2c.c:321] i2cDumpI2c(): stage=3
09:22:22.935 websocket.js:192 <--[I][esp32-hal-i2c.c:322] i2cDumpI2c(): error=1
09:22:22.935 websocket.js:192 <--[I][esp32-hal-i2c.c:323] i2cDumpI2c(): event=0x3ffd7608 bits=0
09:22:22.937 websocket.js:192 <--[I][esp32-hal-i2c.c:324] i2cDumpI2c(): intr_handle=0x3ffd7638
09:22:22.937 websocket.js:192 <--[I][esp32-hal-i2c.c:325] i2cDumpI2c(): dq=0x3ffb12f0
09:22:22.938 websocket.js:192 <--[I][esp32-hal-i2c.c:326] i2cDumpI2c(): queueCount=1
09:22:22.939 websocket.js:192 <--[I][esp32-hal-i2c.c:327] i2cDumpI2c(): queuePos=0
09:22:22.941 websocket.js:192 <--[I][esp32-hal-i2c.c:328] i2cDumpI2c(): errorByteCnt=0
09:22:22.942 websocket.js:192 <--[I][esp32-hal-i2c.c:329] i2cDumpI2c(): errorQueue=1
09:22:22.943 websocket.js:192 <--[I][esp32-hal-i2c.c:330] i2cDumpI2c(): debugFlags=0x001F0000
09:22:22.944 websocket.js:192 <--[I][esp32-hal-i2c.c:287] i2cDumpDqData(): [0] 7bit 30 W STOP buf@=0x3ffc4f7e, len=4, pos=4, ctrl=11111
09:22:22.946 websocket.js:192 <--[I][esp32-hal-i2c.c:305] i2cDumpDqData(): 0x0000: .'.. 10 27 00 00
09:22:22.946 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick
09:22:22.946 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0005 0x0000 0x0000606d
09:22:22.947 websocket.js:192 <--VS,[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.952 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1]
09:22:22.953 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y WRITE val[0] exp[0] en[1] bytes[4]
09:22:22.953 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.953 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
09:22:22.953 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 5] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.960 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 6] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.960 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 7] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.961 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 8] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.961 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 9] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.962 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [10] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.962 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [11] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.963 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [12] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.963 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [13] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.964 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [14] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.965 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [15] N RSTART val[0] exp[0] en[0] bytes[0]
09:22:22.966 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(0) tx(0) sclMain(6) scl(6)
09:22:22.966 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): WRITE 0x300010 0027 0000 0000
09:22:23.072 websocket.js:192 <--endTransmission result: TIMEOUT
Hi, @stickbreaker I doubt that the Frequency Limit is relative to Cores.
Though I did get the correct results by lowering the I2C frequency. But the frequency limits seems very different between different Cores. I use an external EEPROM module with I2C set frequency to 400k get me correct results of hundreds of bytes by Core 1. I'm using this for weeks, never find weird results. And I test other I2C sensors like MPU with 400k frequency by my Default. Never got strange results. But now I read or write 4 bytes with the external EEPROM by Core 0, I got 10% wrong result at 100k. I have to use 50k to get 100% correct results. The difference between 400k and 50k is very big.
I'm wondering if there are some logic difference should be taken cared by codes? Or is there any difference between Core 0 and Core 1 I should be concerned? I just start to use core 0 lately. Just try to move the time-consuming task to Core 0, make Core 1 a good parallel task processor and manager.
@human890209 The way the ESP32 handles interrupts is to allocate the ISR to a specific core. When the interrupt is allocated, (during the first transaction, not Wire.begin()
, but Wire.endTransmission()
or Wire.requestFrom()
), all subsequent interrupts are handled by that core. Interrupts are prioritized, the I2C priority is Low/Medium, If it is allocated on Core 0 with WiFi (priority, high (assembly code)), the I2C ISR may be starving. But, if this starvation is long enough to cause an issue there should be some detectable errors generated.
You can allocate the interrupt on Core 1 just my making the first transaction from setup()
void setup(){
Wire.begin(SDA,SCL,freq);
Wire.beginTransmission(0x30);
Wire.endTransmission(); // this is where the interrupt is allocated, since setup is pinned to core1 the ISR will run on core1 always.
/* currently you have to release the interrupt from the same core you allocated it, newer ESP-IDF will
handled releasing for wrong core by itself. so if you Want to switch which core the ISR is handled by
remember to release it from the correct core.
*/
// to release interrupt
~Wire();
// to re init it,
Wire(0); // assign peripheral I2C0 to Wire()
Wire.begin(sda,scl,freq);
Wire.setTimeOut(1000);
//the next `endTransmission()` or `requestFrom()` will allocate the interrupt on the current core.
Those skinny lines you have circled are during the ACK pulses. you are seeing the SDA being released by the ESP32 and the SLAVE then pulling it low to form the ACK. SDA is allowed to change state while SCL is low. SDA is measured about 1/4 into the HIGH period of SCL. If SDA changes when SCL is HIGH, it is a control signal. if SDA goes low it is START, if it goes HIGH it is STOP.
What does tw->contactSlave()
do? What is the i2c command sequence?
This debug shows a 50ms timeout happened waiting for the ISR to complete:
09:22:22.257 websocket.js:192 <--[D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0x5dcd, end=0x5dff, =50, max=50 error=1
The I2c procQueue expired before the ISR ran. I think the WiFi blocked the ISR.
Try increasing the GrossTimeOut:
Wire.setTimeOut(uint16_t timeOutMillis);
it defaults to 50ms jump it to 1000ms (1sec) see how it responds.
If you look at 9:22:22.257 where timeout is reported (an error) and 09:22:22:271 (debug, after procQueue()) you can see that the I2C peripheral actually moved the data successfully, but the Gross timeout resulted in procQueue shutting down the ISR. so the data got stuck in the RXFifo of the peripheral
:22:22.292 websocket.js:192 <--[I][esp32-hal-i2c.c:341] i2cDumpInts(): 0 row count INTR TX RX Tick 09:22:22.293 websocket.js:192 <--[I][esp32-hal-i2c.c:345] i2cDumpInts(): [01] 0x0001 0x0002 0x0001 0x0000 0x00005dcd
interrupts shut down by procQueue because of 50ms timeout, so only one interrupt handled.
09:22:22.295 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 0] Y RSTART val[0] exp[0] en[0] bytes[0] 09:22:22.295 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 1] Y WRITE val[0] exp[0] en[1] bytes[1] 09:22:22.296 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 2] Y READ val[0] exp[0] en[0] bytes[3] 09:22:22.297 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 3] Y READ val[1] exp[0] en[0] bytes[1] 09:22:22.297 websocket.js:192 <--[E][esp32-hal-i2c.c:243] i2cDumpCmdQueue(): [ 4] Y STOP val[0] exp[0] en[0] bytes[0]
This is a list of the operations handled by the peripheral, the complete READ cycle was correctly handled. Send START signal Send one byte (slaveid + read bit) Read three bytes with ACK Read last byte with NAK(marks end of read) Send STOP
09:22:22.308 websocket.js:192 <--[I][esp32-hal-i2c.c:379] i2cDumpStatus(): ack(0) sl_rw(0) to(0) arb(0) busy(0) sl(1) trans(0) rx(4) tx(0) sclMain(5) scl(6)
This shows final status word of peripheral, rx(4) shows that 4 bytes of data are still in the RXFifo(because procQueue gave up because its 50ms timeout expired)
09:22:22.309 websocket.js:192 <--[I][esp32-hal-i2c.c:418] i2cDumpFifo(): READ 0x30
This shows that the only outgoing byte transmitted was a READ command to device id 0x30. (correct)
Increase the timeout and see if 400k works
Wire.setTimeOut(1000);
Chuck.
Thanks, @stickbreaker I just finish a simple test sketch to prove your theory and my experience. Core 1 prove that there is no Physical RC curcuit problem. Core 0 need to use a lower frequency to success.
ESP32 Master Sketch
// A Test Sketch to prove that Core 0's I2C is not as good as Core 1
// Use Serial Command:
// 0:Test I2C on Core 0
// 1:Test I2C on Core 1
// A(a): Set Frequency to 50,000
// B(b): Set Frequency to 100,000
// R(r): Set Frequency to 400,000
#include "Arduino.h"
// Add to avoid watch dog timeout on Core0
#include "soc/timer_group_struct.h"
#include "soc/timer_group_reg.h"
#include "Wire.h"
#define I2C_SLA_PIN 27
#define I2C_SDA_PIN 25
#define I2C_FREQUENCY 400000
#define I2C_SLAVE_ADDRESS 0x30
byte message[] = {1,2,3,4,5,6,7,8,9,0};
byte message_length = 10;
bool test0 = false;
bool test1 = false;
void core0( void * parameter )
{
setup2();
while (true)
{
// Add to avoid watch dog timeout on Core0
TIMERG0.wdt_wprotect=TIMG_WDT_WKEY_VALUE;
TIMERG0.wdt_feed=1;
TIMERG0.wdt_wprotect=0;
loop2();
}
}
void setup()
{
xTaskCreatePinnedToCore(core0, "Core0Task", 10000, NULL, 1, NULL, 0);
Serial.begin(115200);
Wire.begin(I2C_SDA_PIN, I2C_SLA_PIN, I2C_FREQUENCY);
Serial.print("Frequency: ");
Serial.println(I2C_FREQUENCY);
}
void setup2()
{
}
void loop()
{
while (Serial.available())
{
char command = Serial.read();
Serial.print("Command: ");
Serial.println(command);
switch (command)
{
case '0':
// Test Core 0
Serial.println("Test Core 0");
test0 = true;
break;
case '1':
// Test Core 1
Serial.println("Test Core 1");
test1 = true;
break;
case 'a':
case 'A':
// Set Frequency 50k
Wire.setClock(50000);
Serial.print("Frequency: ");
Serial.println(50000);
break;
case 'b':
case 'B':
// Set Frequency 100k
Wire.setClock(100000);
Serial.print("Frequency: ");
Serial.println(100000);
break;
case 'r':
case 'R':
// Set Frequency I2C_FREQUENCY
Wire.setClock(I2C_FREQUENCY);
Serial.print("Frequency: ");
Serial.println(I2C_FREQUENCY);
break;
default:
Serial.println("Command Invalid.");
break;
}
}
if (test1)
{
test1 = !testI2C(&Wire);
}
}
void loop2()
{
if (test0)
{
test0 = !testI2C(&Wire);
}
}
bool testI2C(TwoWire* tw)
{
if (tw->busy()) return false;
// Transmit
tw->beginTransmission((byte)I2C_SLAVE_ADDRESS);
tw->write(message, message_length);
byte result = tw->endTransmission();
delay(100);
if ( result != I2C_ERROR_OK)
{
Serial.print("endTransmission result: ");
Serial.println(tw->getErrorText(result));
return false;
}
// Request
if (tw->requestFrom((byte)I2C_SLAVE_ADDRESS, message_length) != message_length)
{
Serial.print("requestFrom result: ");
Serial.println(tw->getErrorText(tw->lastError()));
return false;
}
while (tw->available())
{
Serial.print(tw->read());
Serial.print(' ');
}
Serial.println();
return true;
}
Arduino Nano Slave Sketch
// An I2C Slave for test
// Put Received bytes into a 32 bytes buffer. Send last received message on requested.
#include "Arduino.h"
#include "Wire.h"
#define ADDRESS 0x30
#define FREQUANCY 400000
volatile byte buffer[32] = {8};
volatile byte buffer_pos = 1;
volatile bool updated = false;
volatile bool sent = false;
void setup()
{
Serial.begin(115200);
Serial.println("Start");
Wire.begin(ADDRESS);
Wire.setClock(FREQUANCY);
Wire.onReceive(receiveCommand);
Wire.onRequest(messageRequested);
}
void receiveCommand(int howMany)
{
for (byte i = 0; i < howMany; i++)
{
buffer[i] = Wire.read();
}
buffer_pos = howMany;
updated = true;
}
void messageRequested()
{
Wire.write((byte*)buffer,buffer_pos);
sent = true;
}
void loop()
{
if (updated)
{
updated = false;
Serial.print(F("Receive: "));
for (byte i = 0; i < buffer_pos; i++)
{
if (i != 0)
{
Serial.print(' ');
}
Serial.print(buffer[i]);
}
Serial.println();
}
if (sent)
{
sent = false;
Serial.print(F("Sent: "));
for (byte i = 0; i < buffer_pos; i++)
{
if (i != 0)
{
Serial.print(' ');
}
Serial.print(buffer[i]);
}
Serial.println();
}
}
Hi, @stickbreaker
I noticed this:
i2cReleaseISR(i2c); // ISR exists, release it before disabling hardware
Can I use this to release the ISR? and Keep other Wire settings that make it simpler to switch core for I2C?
Don't know if detach SCL and SDA pin is necessary for release ISR
yes, i2cReleaseISR()
can be used, but i2c
is internal to the Wire()
object. So, you will have to add another method to TwoWire().
Chuck.
Hi, @stickbreaker I tried to modify my TwoWireMOD which inherit from TwoWire And I try to use:
void TwoWireMOD::releaseISR()
{
if(i2c->intr_handle) {
esp_intr_free(i2c->intr_handle);
i2c->intr_handle=NULL;
}
}
I add #include "esp32-hal-i2c.c"
But I got the compiler error:
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:169:8: warning: 'i2c_struct_t' has a field 'i2c_struct_t::dev' whose type uses the anonymous namespace
struct i2c_struct_t {
^
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:215:1: error: cannot convert 'I2C_MODE_t' to 'I2C_STAGE_t' in initialization
};
^
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:215:1: error: cannot convert 'i2c_err_t' to 'I2C_ERROR_t' in initialization
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:215:1: error: cannot convert 'I2C_MODE_t' to 'I2C_STAGE_t' in initialization
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:215:1: error: cannot convert 'i2c_err_t' to 'I2C_ERROR_t' in initialization
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:353:23: warning: 'void i2cDumpStatus(i2c_t*)' defined but not used [-Wunused-function]
static void IRAM_ATTR i2cDumpStatus(i2c_t * i2c){
^
In file included from D:\Arduino\Software\Sloeber\MyLibrary\WireMOD/WireMOD.h:6:0,
from ..\sloeber.ino.cpp:11:
D:\Arduino\Software\Sloeber\MyHardware\ESP32\cores\esp32/esp32-hal-i2c.c:383:13: warning: 'void i2cDumpFifo(i2c_t*)' defined but not used [-Wunused-function]
static void i2cDumpFifo(i2c_t * i2c){
^
I'm not very familiar to c++ struct.
I want to add a variable to hold which core the ISR is on and when Request or Transmit check current core and release ISR if the core is changed. I think it will be faster. But when some base core code comes, I'm dumb. Is it possible to perform a quick upgrade to ESP32 I2C core?
@human890209 no fast update, me-no-dev has to update it. you don't need to include esp32-hal-i2c.c .
if you try to release the interrupt from the wrong core you will receive an ESP_ERR_INVALID_ARG error
see: esp-idf#2487. the resolution of this issue will migrate to Arduino-Esp32 when me-no-dev does the update. For you purposes I would just design your code to destroy(~) Wire()
before you switch cores.
I would have the ISR on Core1 with the app on Core0, Wifi is a pig on Core0.
Chuck.
@human890209 my day is over 11pm here.
Out.
Chuck.
Thanks, I will try the destroy solution.
Hi, @stickbreaker Thanks for your help, I'm now using I2C on Core 0 as fast as on Core 1. And
I would have the ISR on Core1 with the app on Core0, Wifi is a pig on Core0.
I'm a new player of core 0. I'm also using ESPNow and BluetoothSerial which I guess is run on Core 0.
Does ESPNow and BT will interrupt the I2C transmit or request? How does core 0 handle the task of ESPNow, BT, I2C, HardwareSerial, and GPIOInterrupt? Do these functions got hardware with FIFO or buffer to receive data and queue to send? Or they interfere with each other and make communications messy?
Hardware:
Board: MH-ET ESP32MiniKit Core Installation/update date: 1/9/2018 IDE name: Arduino IDE Flash Frequency: 40Mhz PSRAM enabled: no Upload Speed: 921600 Computer OS: Windows 10
Description:
Hi, I'm trying to move some communication function to Core 0 by creating a new task on core 0
xTaskCreatePinnedToCore(loop2, "loop2Task", 2000, NULL, 1, NULL, 0);
Most functions work well for now. But Wire got some bugs. The read or write result is wrong, got some wild number like 96, 255, 253 may be some symbol of I2C protocol. I've found that the first transmit or request is always right and using Wire.begin() could recover the hung bus. I call begin() after each transmits or request to reset the Wire. This works for some simple implementations. But this can't fix all kinds of problem and Wire is used by a lot of sensor library.Hope expert like @stickbreaker could help me out.