I2C errors with two slave devices
Hi,
I have ST25DV64KC and another ADC chip connected to STM32L071RZT6 on I2C1.
I noticed that reading GPO1 or other registers or MB by HAL_I2C_Mem_Read_IT() fails from time to time. Completions of operations are often timeout (somehow read timeouts more often, i.e. I don't get INT in expected time).
I only read static & dyn registers as well as accessing MB for r/w and tend to think that I don't handle i2c concurrent access properly.
- Should only function call of HAL_I2C_Mem_Read_IT() or WriteIT() be protected by mutex or I should keep it until I get INT back signalling the end of the requested operation?
- What should timeout be for reading of static/dyn registers or reading 256 bytes from MB? (configured i2c Fast-mode)
- Does competing for i2c resources task's priority matters much or elevated priority will sort it out?
- Could someone suggest a working approach to solve concurrent access on the i2c bus?
Cheers
