Open aswathreddy opened 1 year ago
have you check timer configuration? or you can try below example https://github.com/espressif/esp-idf/tree/v5.0.1/examples/peripherals/i2c/i2c_simple
In ESP32 support HIGH SPEED MODE and ESP32S3 didn't support those mode it may generate issue you need to check once
Answers checklist.
General issue report
I have a eeprom cat24m1 & rtc ds1388 which is fairly working with esp32. But when i try to run same code on esp32s3 it does not work properly. I feel like it is esp-idf version problem. Can someone help me out to find the correct version esp-idf for esp32s3 My current esp-idf version is ESP-IDF v4.4.2 ESP32 code which is working
unsigned char readRegister(unsigned char reg) { // printf("Entered the readvalue loop\n"); i2c_cmd_handle_t cmd = i2c_cmd_link_create(); ESP_ERROR_CHECK(i2c_master_start(cmd)); ESP_ERROR_CHECK(i2c_master_write_byte(cmd, (RTC_ADDRESS << 1) | I2C_MASTER_WRITE, true));//RTC_ADDRESS ESP_ERROR_CHECK(i2c_master_write_byte(cmd, reg, 1)); // start address ESP_ERROR_CHECK(i2c_master_start(cmd)); ESP_ERROR_CHECK(i2c_master_write_byte(cmd, (RTC_ADDRESS << 1) | I2C_MASTER_READ, true));//RTC_ADDRESS uint8_t data = 0; ESP_ERROR_CHECK(i2c_master_read_byte(cmd, &data, false)); ESP_ERROR_CHECK(i2c_master_stop(cmd)); //i2c_master_cmd_begin(I2C_NUM_0, cmd, 1000 / portTICK_PERIOD_MS);
}
For ESP32S3 i have commented out ESP_ERROR_CHECK(i2c_master_stop(cmd)); which works for rtc and i have no luck with eeprom