Search found 2 matches
- Wed Jul 31, 2019 12:06 pm
- Forum: Hardware
- Topic: i2c read three segments error
- Replies: 5
- Views: 6250
Re: i2c read three segments error
Hi ESP_houwenxiang, As you can see in the code, in segment 1 there is always a END command after each read operation. It is done through " I2C[i2c_num]->command[g_cmd_index_use+1].op_code = I2C_CMD_END; " What we see is the SDA line behaves erratically during the 2nd read operation of the segment 1.
- Wed Jul 31, 2019 12:01 pm
- Forum: Hardware
- Topic: i2c read three segments error
- Replies: 5
- Views: 6250
Re: i2c read three segments error
Hello ESP_houwenxiang As you can see there is a END command after each Read command in segment 1. Please check the code. // Segment 1 i2c_master_read(cmdlink, &rx_data[1], 2, 0x0); i2c_master_read_byte(cmdlink, &rx_data[3], 0x1); i2c_master_stop(cmdlink); cmd = &g_cmd_desc[g_cmd_index_use]; ESP_LOGI...