I have found some issue with finding i2c device on the bus. The i2c device is connected to the esp32 on address 0x17.
But when I do the i2cdetect using the i2c_tools example in the esp-idf folder, I get into issues.
The output has some UU UU values as shown below, which I do not get what it means
FYI: it works fine if I connect other sensors such as BME280. But right now I have a board connected with i2c address 0x17.
I (195) cpu_start: Starting scheduler on PRO CPU.
W (201) vfs_fat_spiflash: f_mount failed (13)
I (201) vfs_fat_spiflash: Formatting FATFS partition, allocation unit size=4096
E (211) vfs_fat_spiflash: f_mkfs failed (14)
E (211) i2c-tools: Failed to mount FATFS (ESP_FAIL)
==============================================================
| Steps to Use i2c-tools |
| |
| 1. Try 'help', check all supported commands |
| 2. Try 'i2cconfig' to configure your I2C bus |
| 3. Try 'i2cdetect' to scan devices on the bus |
| 4. Try 'i2cget' to get the content of specific register |
| 5. Try 'i2cset' to set the value of specific register |
| 6. Try 'i2cdump' to dump all the register (Experiment) |
| |
==============================================================
Type 'help' to get the list of commands.
Use UP/DOWN arrows to navigate through command history.
Press TAB when typing command name to auto-complete.
i2c-tools> i2cdetect
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- UU UU UU UU UU UU UU UU UU -- UU -- -- -- --
10: -- -- -- -- -- -- -- 17 -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
i2c-tools> i2cdetect
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- UU UU -- UU -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- 17 -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
i2c-tools> i2cdetect
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- UU UU UU UU UU UU UU UU UU UU UU UU UU UU UU
10: UU -- -- -- -- -- UU 17 -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
i2c-tools>
i2c scan problem flashing the i2c_tools example
-
- Posts: 1733
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: i2c scan problem flashing the i2c_tools example
https://github.com/espressif/esp-idf/bl ... ols.c#L138
I believe, the TIMEOUT error can indicate one of at least two things:
1. failure to acquire exclusive access to the I2C driver within the max wait time (i.e. it is in prolonged use by another task), or
2. a problem with the I2C communication/bus which causes the I2C peripheral's state machine to get "stuck" until the driver times out and resets it.
Maybe there is a problem with the electrical connection of the 0x17 board, or it does not include pull-up resistors which other boards do.
Check for the pull-ups first.
Code: Select all
if (ret == ESP_ERR_TIMEOUT) {
printf("UU ");
} else ...
1. failure to acquire exclusive access to the I2C driver within the max wait time (i.e. it is in prolonged use by another task), or
2. a problem with the I2C communication/bus which causes the I2C peripheral's state machine to get "stuck" until the driver times out and resets it.
Maybe there is a problem with the electrical connection of the 0x17 board, or it does not include pull-up resistors which other boards do.
Check for the pull-ups first.
Re: i2c scan problem flashing the i2c_tools example
I have tried this on other sensor and realized that the problem should be with this particular device on 0x17, but could not find what it should be.?
I will try with other ESP32 based board.
I will try with other ESP32 based board.
Who is online
Users browsing this forum: No registered users and 138 guests