So, I have been developing a application that utilizes a I2C driver chip, the KTD2061, for some Led animations. I just finished developing the library of the chip, and It utilizes the i2cdev component https://esp-idf-lib.readthedocs.io/en/l ... 2cdev.html for comunication with the chip, as I wanted to create a flexible not hardware fix library. From this component, my library only uses the
Code: Select all
i2c_dev_read_reg
Code: Select all
i2c_dev_write_reg
The configuration of the i2c driver, the i2cdev and my library is included:
Code: Select all
int master_port = CONFIG_I2C_MASTER_PORT_NUM;
i2c_config_t i2c_driver_config = {
.mode = I2C_MODE_MASTER,
.sda_io_num = CONFIG_I2C_MASTER_SDA_IO,
.sda_pullup_en = GPIO_PULLUP_ENABLE,
.scl_io_num = CONFIG_I2C_MASTER_SCL_IO,
.scl_pullup_en = GPIO_PULLUP_ENABLE,
.master.clk_speed = CONFIG_I2C_MASTER_FREQ_HZ,
.clk_flags = 0, //clk_flags is for APB clock configurator to find the best suitable clock source, for example in case
//we want to mantain I2C funtionality while being in light sleep. 0 does not pose any restrictions.
};
i2c_dev_t dev = {
.port = master_port,
.cfg = i2c_driver_config,
.addr = KTD2061_I2C_BASE_MODULE_ADDRESS,
.timeout_ticks = 0,
};
ktd2061_t ktd = {
.read = i2c_dev_read_reg,
.write = i2c_dev_write_reg,
.handle = &dev,
};
Code: Select all
D (1038934) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1038934) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1038934) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1039044) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1039044) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1039044) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1039044) i2c: i2c command link malloc error
D (1039054) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1040054) i2cdev: Could not write to device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1040154) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1040154) i2c: i2c command link malloc error
D (1040154) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041154) i2cdev: Could not write to device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1041154) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041154) i2c: i2c command link malloc error
E (1041154) i2c: i2c command link malloc error
D (1041164) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1041264) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041264) i2c: i2c command link malloc error
E (1041264) i2c: i2c command link malloc error
D (1041264) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1041274) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041274) i2c: i2c command link malloc error
E (1041284) i2c: i2c command link malloc error
D (1041284) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
D (1041394) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041394) i2c: i2c command link malloc error
E (1041394) i2c: i2c command link malloc error
E (1041394) i2c: i2c command link malloc error
D (1041404) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041404) i2c: i2c command link malloc error
D (1041414) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041414) i2c: i2c command link malloc error
E (1041424) i2c: i2c command link malloc error
E (1041424) i2c: i2c command link malloc error
E (1041434) i2c: i2c command link malloc error
D (1041434) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041444) i2c: i2c command link malloc error
E (1041444) i2c: i2c command link malloc error
D (1041554) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041554) i2c: i2c command link malloc error
E (1041554) i2c: i2c command link malloc error
E (1041554) i2c: i2c command link malloc error
E (1041554) i2c: i2c command link malloc error
D (1041564) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041574) i2c: i2c command link malloc error
E (1041574) i2c: i2c command link malloc error
D (1041584) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041584) i2c: i2c command link malloc error
E (1041594) i2c: i2c command link malloc error
E (1041594) i2c: i2c command link malloc error
E (1041604) i2c: i2c command link malloc error
E (1041604) i2c: i2c command link malloc error
D (1041614) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041614) i2c: i2c command link malloc error
E (1041624) i2c: i2c command link malloc error
E (1041624) i2c: i2c command link malloc error
D (1041734) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1041734) i2c: i2c command link malloc error
E (1041734) i2c: i2c command link malloc error
E (1041734) i2c: i2c command link malloc error
E (1041734) i2c: i2c command link malloc error
E (1041744) i2c: i2c command link malloc error
E (1041754) i2c: i2c command link malloc error
E (1042754) i2cdev: Could not read from device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1042754) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1042754) i2c: i2c command link malloc error
E (1042754) i2c: i2c command link malloc error
E (1042764) i2c: i2c command link malloc error
E (1042764) i2c: i2c command link malloc error
E (1043774) i2cdev: Could not write to device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1043774) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1043774) i2c: i2c command link malloc error
E (1043774) i2c: i2c command link malloc error
E (1043784) i2c: i2c command link malloc error
E (1043784) i2c: i2c command link malloc error
E (1043794) i2c: i2c command link malloc error
E (1043794) i2c: i2c command link malloc error
E (1044804) i2cdev: Could not read from device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1044804) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1044804) i2c: i2c command link malloc error
E (1044804) i2c: i2c command link malloc error
E (1044814) i2c: i2c command link malloc error
E (1044814) i2c: i2c command link malloc error
E (1045824) i2cdev: Could not write to device [0x68 at 1]: 263 (ESP_ERR_TIMEOUT)
D (1045924) i2cdev: Timeout: ticks = 0 (0 usec) on port 1
E (1045924) i2c: i2c command link malloc error
E (1045924) i2c: i2c command link malloc error
E (1045924) i2c: i2c command link malloc error
E (1045924) i2c: i2c command link malloc error
E (1045934) i2c: i2c command link malloc error
E (1045944) i2c: i2c command link malloc error
E (1045944) i2c: i2c command link malloc error
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400df01d PS : 0x00060d30 A0 : 0x800d6f8d A1 : 0x3ffb8fe0
0x400df01d: i2c_master_cmd_begin at C:/Users/me/AppData/Local/Programs/esp-idf/components/driver/i2c.c:1515
A2 : 0x00000001 A3 : 0x3fffffdc A4 : 0x00000064 A5 : 0x3ffb7f48
A6 : 0x0001984f A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffb8fb0
A10 : 0x00000000 A11 : 0x3ffb06ac A12 : 0x00000008 A13 : 0x3ffb0688
A14 : 0x3f403bbc A15 : 0x00000000 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000008 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffe
Backtrace: 0x400df01a:0x3ffb8fe0 0x400d6f8a:0x3ffb9020 0x400d714b:0x3ffb9060 0x400d76e2:0x3ffb9090 0x400d7252:0x3ffb90b0 0x40089dad:0x3ffb9
0x400df01a: i2c_master_cmd_begin at C:/Users/me/AppData/Local/Programs/esp-idf/components/driver/i2c.c:1515
0x400d6f8a: i2c_dev_read at C:/Users/me/Desktop/Project/Firmware/Project/components/i2cdev/i2cdev.c:297
0x400d714b: i2c_dev_read_reg at C:/Users/me/Desktop/Project/Firmware/Project/components/i2cdev/i2cdev.c:340
0x400d76e2: ktd2061_setChannelOff at C:/Users/me/Desktop/Project/Firmware/Project/components/KTD2061/KTD206
Has someone got that problem, or knows what could be provoking it? By the way, I must say it allways happens after 15~16 min