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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions