Skip to content

s_i2c_synchronous_transaction(924): I2C transaction failed #3

@trombik

Description

@trombik

I tried moving the code from the old library to the new repository. Everything was moved successfully, but I received strange errors.

E (1773) i2c: i2c_set_timeout(954): i2c timing value error
E (1773) ags10: Failed to send read command: ESP_ERR_INVALID_ARG
E (1773) ags10_basic_example: Failed to read AGS10 version: ESP_FAIL

After that, I decided to try running another library that had already been moved. For example, I chose the QMI8658C library. First, I encountered errors when attempting to build the project. Because of managed_components/esp-idf-lib__esp_idf_lib_helpers/common/cmake/esp-idf-lib.cmake. I could fix that by adding

get_target_property(COMPONENT_TYPE ${COMPONENT_LIB} TYPE)
if(NOT COMPONENT_TYPE STREQUAL "INTERFACE_LIBRARY")

endif() 

around

 target_compile_options(${COMPONENT_LIB} PRIVATE
        ${ESP_IDF_LIB_FLAGS}
        ${ESP_IDF_LIB_CI_FLAGS}
    )

But even after successfully build I got a bunch of different errors

I (245) i2cdev: [Port 0] Successfully installed I2C master bus (Handle: 0x408128ec).
I (255) i2cdev: [0x6b at 0] Device added successfully (Device Handle: 0x40812da8, Speed: 400000 Hz).
I (265) main_task: Returned from app_main()
E (1265) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (1265) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
W (1265) i2cdev: [0x6b at 0] I2C op failed (Try 0, Handle 0x40812da8): 259 (ESP_ERR_INVALID_STATE).
W (1275) i2cdev: [0x6b at 0] Invalid state error - handle may need recreation
W (1275) i2cdev: [0x6b at 0] Removing potentially corrupted device handle 0x40812da8 after permanent error
W (1325) i2cdev: [0x6b at 0] Retrying operation...
I (1325) i2cdev: [0x6b at 0] Device added successfully (Device Handle: 0x4080fce4, Speed: 400000 Hz).
E (2325) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (2325) i2c.master: i2c_master_multi_buffer_transmit(1186): I2C transaction failed
W (2325) i2cdev: [0x6b at 0] I2C op failed (Try 1, Handle 0x4080fce4): 259 (ESP_ERR_INVALID_STATE).
W (2335) i2cdev: [0x6b at 0] Invalid state error - handle may need recreation
W (2335) i2cdev: [0x6b at 0] Removing potentially corrupted device handle 0x4080fce4 after permanent error
W (2425) i2cdev: [0x6b at 0] Retrying operation...

As I understand it, it starts using another i2cdev library. For now, I can't get either of those libraries to work. I will try to understand and fix it, but I'm not sure when I'll have the time for such an investigation.

Originally posted by @xyzroe in esp-idf-lib/ags10#2 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions