-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i2c_master_probe returning ESP_OK for all addresses (IDFGH-12157) #13213
Comments
the log is as below User : 3 14 options.c:52 configuration_output_handler(): debug_level: 3User : 4 14 options.c:52 configuration_output_handler(): Debug: 189 60 command.c:151 script_debug(): command - esp32s3.cpu1 configure -event examine-end Debug: 190 60 command.c:151 script_debug(): command - esp32s3.cpu0 configure -event reset-assert-post Debug: 191 60 command.c:151 script_debug(): command - esp32s3.cpu1 configure -event reset-assert-post Debug: 192 60 command.c:151 script_debug(): command - esp32s3.cpu0 configure -event gdb-attach
Debug: 193 60 command.c:151 script_debug(): command - esp32s3.cpu1 configure -event gdb-attach Debug: 194 60 command.c:151 script_debug(): command - esp32s3.cpu0 configure -event gdb-detach Debug: 195 60 command.c:151 script_debug(): command - esp32s3.cpu1 configure -event gdb-detach Debug: 196 60 command.c:151 script_debug(): command - esp32s3.cpu0 xtensa maskisr on Debug: 973 200 command.c:151 script_debug(): command - arm semihosting enable Debug: 983 204 command.c:151 script_debug(): command - arm semihosting enable |
Is this on latest master? I remember I have already fixed this issue for a pretty long time. BTW, the probe depends on NACK signal. So if you have any picture for logic analyzer, it would be better. |
@puppy112358 Any update? May I know the pins you are using. Or any picture related to logic analyzer? Because I cannot reproduce this issue on my master with my board. So it would be helpful if you give me more clue. I tried with following code.
If there is no further update, I'm going to conclude this issue~. Thank you. |
…_probe issue, and probe might failed. Fixed I2C cannot return err code when nack detected Closes espressif#13213, Closes espressif#12929, Closes espressif#13398,
Hello @mythbuster5, I'm using ESP-IDF v5.4 stable release commit: 473771b. This are my bus config:
And device config
where |
Answers checklist.
IDF version.
master
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
What is the expected behavior?
I expect to get the address of the device when I make it connected to ESP32S3 and address is supposed to be 0x68 .
What is the actual behavior?
i2c_master_probe() returning ESP_OK for all addresses I have put in it.
Steps to reproduce.
Step
ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_config_handle1,
&iic_config_handle[0]));
ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_config_handle2,
&iic_config_handle[1]));
for (uint8_t i = 0x01; i < 0x90; i ++) {
esp_err_t ret1 = i2c_master_probe(iic_config_handle[0], i, I2C_TOOL_TIMEOUT_VALUE_MS);
if (ret1 == ESP_OK) {
ESP_LOGI(TAG,"address: %x",i);
device_number++;
continue;
} else{
ESP_LOGE(TAG,"address %x failed",i);
}
esp_err_t ret2 = i2c_master_probe(iic_config_handle[1], 0x68, I2C_TOOL_TIMEOUT_VALUE_MS);
if (ret2 == ESP_OK) {
ESP_LOGI(TAG,"address: %x",i);
device_number++;
continue;
}
}
Build or installation Logs.
No response
More Information.
I have used i2ctools and it works normally...
The text was updated successfully, but these errors were encountered: