Hi
I need read 32KB/Second from a I2C slave device, I catch follow I2C wave from scope during I2C reading by ESP32
Meanwhile I have an reference platform connecting the same I2C slave device, the wave is follow
The code base is esp-idf-v2.0, upgraded from esp-idf-v2.0-rc1. ESP32 HW is esp_wroom_32 module.
I2C Read Code repeat calling escore_i2c_read() , size is 4K
int escore_i2c_read(void *handle, uint8_t *rxBuffer, uint16_t size) {
if (size == 0) {
return ESP_OK;
}
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
i2c_master_start(cmd);
i2c_master_write_byte(cmd, ( ES817_SENSOR_ADDR << 1 ) | READ_BIT, ACK_CHECK_EN);
if (size > 1) {
i2c_master_read(cmd, rxBuffer, size - 1, ACK_VAL);
}
i2c_master_read_byte(cmd, rxBuffer + size - 1, NACK_VAL);
i2c_master_stop(cmd);
esp_err_t ret = i2c_master_cmd_begin(i2c_master_port, cmd, 1000 / portTICK_RATE_MS);
i2c_cmd_link_delete(cmd);
if(handle != 0x1234){
char out[14] = {0};
size = size > 4 ? 4 : size;
HexToAscii(rxBuffer, size, out, 14);
ESP_LOGI(TAG, "I2C Bus read %s", out);
}
return ret;
}
I want to make ESP32 I2C read timing similar to the reference device == > regular sleep between every 8 bit data+ 1bit ACK.
Is there any suggestion?
Thanks
ESP32 I2C Timing Question
Return to “General Discussion”
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: Bing [Bot], kaxx1975 and 81 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.