You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function:
static HAL_StatusTypeDef I2C_Master_SB(I2C_HandleTypeDef *hi2c)
This check has been added:
if ((hi2c->hdmatx->XferCpltCallback != NULL) || (hi2c->hdmarx->XferCpltCallback != NULL))
{
/* Enable DMA Request */
SET_BIT(hi2c->Instance->CR2, I2C_CR2_DMAEN);
}
But, in case of the DMA is not used, hi2c->hdmatx and hi2c->hdmarx are NULL.
In this case, hi2c->hdma(rx|tx)->XferCpltCallback can be not NULL
then I2C_CR2_DMAEN is set while it should not.
As this bit is checked several time to know if DMA is used or not this
raised an exception handler.
Fix#463
Signed-off-by: Frederic.Pillon <[email protected]>
0 commit comments