Skip to content

I2C failed due to wrong check condition #3043

Description

@fpistm

When introducing HALv2, some binary variables have been changed from uint8_t to bool.
A mistake was introduce in the HAL_I2C_ErrorCallback function.

-  if (obj->isMaster == 0) {
+  if (obj->isMaster) {
+#if defined(USE_HALV2_DRIVER)
+    HAL_I2C_SLAVE_EnableListen_IT(hi2c);
+#else
     HAL_I2C_EnableListen_IT(hi2c);
+#endif

New condition was wrong as it should be:
if (!obj->isMaster)

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions