- Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
- Core 0 register dump:
- PC : 0x40377024 PS : 0x00060031 A0 : 0x803772ed A1 : 0x3fc92880
- 0x40377024: i2c_master_cmd_begin_static at E:/ESP32_ENV/esp-idf/components/driver/i2c.c:1289
- A2 : 0x00000000 A3 : 0x3fce0734 A4 : 0x00000000 A5 : 0x3fcf46a0
- A6 : 0x3fc946b4 A7 : 0x3fcf46c0 A8 : 0x00000000 A9 : 0x3fc94b64
- A10 : 0x00000093 A11 : 0x3fce09b8 A12 : 0x00000001 A13 : 0x3fc94b64
- A14 : 0x60013000 A15 : 0x00000000 SAR : 0x00000000 EXCCAUSE: 0x0000001d
- EXCVADDR: 0x00000008 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
- Backtrace:0x40377021:0x3fc928800x403772ea:0x3fc928b0 0x40376916:0x3fc928f0 0x42018a97:0x3fcf46f0 0x42001f33:0x3fcf4710 0x4037b841:0x3fcf4730 0x4037cd71:0x3fcf4750
- 0x40377021: i2c_master_cmd_begin_static at E:/ESP32_ENV/esp-idf/components/driver/i2c.c:1288
- 0x403772ea: i2c_isr_handler_default at E:/ESP32_ENV/esp-idf/components/driver/i2c.c:497
- 0x40376916: _xt_lowint1 at E:/ESP32_ENV/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
- 0x42018a97: cpu_ll_waiti at E:/ESP32_ENV/esp-idf/components/hal/esp32s3/include/hal/cpu_ll.h:182
- (inlined by) esp_pm_impl_waiti at E:/ESP32_ENV/esp-idf/components/esp_pm/pm_impl.c:837
- 0x42001f33: esp_vApplicationIdleHook at E:/ESP32_ENV/esp-idf/components/esp_system/freertos_hooks.c:63
- 0x4037b841: prvIdleTask at E:/ESP32_ENV/esp-idf/components/freertos/tasks.c:3973 (discriminator 1)
- 0x4037cd71: vPortTaskWrapper at E:/ESP32_ENV/esp-idf/components/freertos/port/xtensa/port.c:131
- i2c_cmd_handle_t cmd_link = NULL;
- cmd_link = i2c_cmd_link_create();
- if(cmd_link == NULL)
- {
- ESP_LOGE(TAG,"measured data read : failed to create cmd link");
- return ESP_FAIL;
- }
- uint8_t data = 0;
- err_code = i2c_master_start(cmd_link);
- err_code = i2c_master_write_byte(cmd_link,(MLX90393_I2C_ADDR << 1)|I2C_MASTER_WRITE,ACK_CHECK_EN);
- err_code = i2c_master_write_byte(cmd_link,MLX90393_I2C_CMD_READ_MEASURED_DATA,ACK_CHECK_EN);
- err_code = i2c_master_start(cmd_link);
- err_code = i2c_master_write_byte(cmd_link,(MLX90393_I2C_ADDR << 1)|I2C_MASTER_READ,ACK_CHECK_EN);
- err_code = i2c_master_read(cmd_link,&data ,1,I2C_MASTER_ACK);
- err_code = i2c_master_cmd_begin(MLX90393_I2C_NUM,cmd_link,pdMS_TO_TICKS(1000));
when "i2c_master_read" or "i2c_master_read_byte" is the last command, it crashes at "i2c_master_cmd_begin"
if add "i2c_master_stop" to the end or move "i2c_master_read" up one line it works well
i need to judge the value of "data" to determine either to end communication or read more bytes
here is error infor