mirror of https://github.com/ARMmbed/mbed-os.git
[STM32F4] Master receive sequential - fix for HAL I2C
in case of 2 consecutives calls to HAL_I2C_Master_Sequential_Receive_IT with the Xfer mode I2C_FIRST_AND_LAST_FRAME, the second trasnfer does not start at all. It seems this is because the previous state is maintained as I2C_STATE_MASTER_BUSY_RX and therefore the START condition will not be generatedpull/3238/head
parent
a50dc77c60
commit
a65bacc032
|
|
@ -3960,7 +3960,8 @@ static HAL_StatusTypeDef I2C_MasterReceive_BTF(I2C_HandleTypeDef *hi2c)
|
|||
__HAL_I2C_DISABLE_IT(hi2c, I2C_IT_EVT | I2C_IT_ERR);
|
||||
|
||||
hi2c->State = HAL_I2C_STATE_READY;
|
||||
|
||||
hi2c->PreviousState = I2C_STATE_NONE;
|
||||
|
||||
if(hi2c->Mode == HAL_I2C_MODE_MEM)
|
||||
{
|
||||
hi2c->Mode = HAL_I2C_MODE_NONE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue