How to work with multiple I2C RTOS tasks?
Posted: Thu Feb 11, 2021 5:08 pm
Hi
I'm quite new to the whole make based programming and IDF migrating from the arduino world so,
I'm trying to drive an I2C display using the u8g2_hal library and ss1306 display with an I2C ADC in two separate tasks and it seems like after both tasks start the ESP32 crashed with this error log:
I assume it's because the I2C display task tryes to use the bus while the adcRead task reads from it I've tries setting the I2C time out with :
no luck there and I can't find any function that checks if the I2C bus is being used so how can this be dealt with?
I'm quite new to the whole make based programming and IDF migrating from the arduino world so,
I'm trying to drive an I2C display using the u8g2_hal library and ss1306 display with an I2C ADC in two separate tasks and it seems like after both tasks start the ESP32 crashed with this error log:
Code: Select all
E (510) i2cdev: Could not read from device [0x48 at 0]: 263
E (510) ads111x: Could not read from register 0x01
Code: Select all
i2c_set_timeout(I2C_NUM_0, 100000 / portTICK_RATE_MS);