Skip to content

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jul 26, 2022

Previously, i2c_master_write and i2c_master_read returned I2C_OK if first HAL call returned HAL_BUSY which was not correct.
Now make sure the i2c is ready, which guarantees a good initialization of the read or write sequence.

Validation

  • i2c scanner
  • i2c memory device (eeprom)
  • temperature sensor (LM75B)
  • Master Reader Writer / Slave Sender Receiver

Fixes #1774

@fpistm fpistm added bug 🐛 Something isn't working fix 🩹 Bug fix labels Jul 26, 2022
@fpistm fpistm added this to the 2.3.1/2.4.0 milestone Jul 26, 2022
@fpistm fpistm requested a review from ABOSTM July 26, 2022 09:38
Previously, i2c_master_write and i2c_master_read returned I2C_OK if
first HAL call returned HAL_BUSY which was not correct.
Now make sure the i2c is ready, which guarantees a good
initialization of the read or write sequence.

Fixes stm32duino#1774

Signed-off-by: Frederic Pillon <[email protected]>
Copy link
Contributor

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fpistm fpistm merged commit e3808a2 into stm32duino:main Jul 29, 2022
@fpistm fpistm deleted the i2c_err branch July 29, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong error management in i2C functions?
2 participants