Search found 2 matches

by Northeastrader
Thu Nov 03, 2022 9:09 am
Forum: General Discussion
Topic: I2C crash when last command is "read"
Replies: 1
Views: 947

Re: I2C crash when last command is "read"

i have found out the reason for the problem, this may be a bug of esp-idf the error occurs when you make "i2c_master_read" as the last command while receive more data than you read e.g. i2c receive 3 bytes data and you set "i2c_master_read" as the last command to read 2 bytes what you expect is read...
by Northeastrader
Wed Nov 02, 2022 8:05 am
Forum: General Discussion
Topic: I2C crash when last command is "read"
Replies: 1
Views: 947

I2C crash when last command is "read"

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)|I...