STM32Cube MCU Full Package for the STM32L4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
259
stars
151
forks
source link
HAL_SMBUS_IsDeviceReady keep HAL_LOCK in some cases #87
Describe the set-up
Describe the bug Inside the function HAL_SMBUS_IsDeviceReady the "HAL_LOCK" is acquired but not for all return statements released. e.g.Lines:
How To Reproduce Scan the the SMBus for devices which are not present. Call
SMBUS_HandleTypeDef* hSMBus =init first uint16_t devAddr; for ( devAddr = 2; devAddr < 255; devAddr += 2) { if ( HAL_ERROR == HAL_SMBUS_IsDeviceReady( hSMBus , devAddr, 2, 5) ) { assert( HAL_LOCKED == hSMBus->Lock ); // it will assert if lock is still hold } }