i2c command link malloc error

Posts: 2
Joined: Mon Jul 22, 2019 5:27 pm

i2c command link malloc error

Postby RafaelArkenos » Sat Aug 03, 2019 7:10 pm

Hello there!
I'm communicating my ESP32 with a STM32F0 trought I2C.. everythings run fine for 1~2 hours and occurs this error "i2c command link malloc error", "Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled."
Core 0 register dump:
PC : 0x400d2d60 PS : 0x00060330 A0 : 0x800d2dd6 A1 : 0x3ffbb830
A2 : 0x00000000 A3 : 0x3ff44000 A4 : 0x0000000a A5 : 0x3ffb47a2
A6 : 0x00060021 A7 : 0x00000000 A8 : 0x800d2d60 A9 : 0x3ffbb810
A10 : 0x00033d29 A11 : 0x3ffb0078 A12 : 0x0000000a A13 : 0x00000000
A14 : 0x00000003 A15 : 0x00060023 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffa

Backtrace: 0x400d2d60:0x3ffbb830 0x400d2dd3:0x3ffbb850 0x4008a311:0x3ffbb870
I already tried to allocate more heap, but still getting this error.. im only running this I2C task..

This is my read command, that i used like the example from SDK-IDF:

Code: Select all

esp_err_t i2c_read(uint8_t address, uint8_t *buffer, uint16_t length)
    esp_err_t result;
    i2c_cmd_handle_t cmd = i2c_cmd_link_create();
    i2c_master_write_byte(cmd, (address << 1) | I2C_MASTER_READ, ACK_CHECK_ENABLE);
    if (length > 1) {
        i2c_master_read(cmd, buffer, length - 1, ACK_VAL);
    i2c_master_read_byte(cmd, buffer + length - 1, NACK_VAL);
    result = i2c_master_cmd_begin(I2C_MASTER_NUM, cmd, 2000 / portTICK_RATE_MS);

    return result;
I need to read the STM32F0 all the time, so i used the function to read in a for ( ;; ) loop.
Any one have some information to solve this error? because i cant reset my esp32 every 1 hour..

Ty in advance!

Who is online

Users browsing this forum: Baidu [Spider] and 26 guests