STM32F103C8 I2C HAL lockup
Posted: Mon Mar 22, 2021 3:23 pm
I know this has been discussed before and the "bug" is still there hiding. If you pull the ground lead from the bus off there will be a complete lockup.
It's most probably conserning STM's HAL not stm32duino, but still this would be great to get fixed in some way.
I have narrowed it out to the file:
Arduino15\packages\STM32\hardware\stm32\1.9.0\system\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_i2c.c
-In function HAL_I2C_IsDeviceReady I can't get past the row, until I correct the sensor...
/* Generate Start */
SET_BIT(hi2c->Instance->CR1, I2C_CR1_START);
It will always freeze here...
The only way to get it up and runing is the wathcdog reboot, but still again on startup we hit it again. So this renders the unit totally useless because of a for ex. broken sensor or cable.
br. Mike
It's most probably conserning STM's HAL not stm32duino, but still this would be great to get fixed in some way.
I have narrowed it out to the file:
Arduino15\packages\STM32\hardware\stm32\1.9.0\system\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_i2c.c
-In function HAL_I2C_IsDeviceReady I can't get past the row, until I correct the sensor...
/* Generate Start */
SET_BIT(hi2c->Instance->CR1, I2C_CR1_START);
It will always freeze here...
The only way to get it up and runing is the wathcdog reboot, but still again on startup we hit it again. So this renders the unit totally useless because of a for ex. broken sensor or cable.
br. Mike