HAL_I2C_Mem_Write_DMA issue
Hi There,
I have searched a lot about the HAL_I2C_Mem_Write_DMA problem and seems like i have not found anywhere else this issue has been solved.
Can anyone contribute if someone has solved it.
Thanks
Hi There,
I have searched a lot about the HAL_I2C_Mem_Write_DMA problem and seems like i have not found anywhere else this issue has been solved.
Can anyone contribute if someone has solved it.
Thanks
Hi Andrew,
I found the solution from this link:-
I need to add below code and enable the I2c event interrupt. Seems working fine. But I need to tune my code a little bit more.
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c)
{
if (hi2c->Instance==hi2c1.Instance)
{
HAL_DMA_Abort_IT(hi2c->hdmatx);
}
}
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c)
{
if (hi2c->Instance==hi2c1.Instance)
{
HAL_DMA_Abort_IT(hi2c->hdmatx);
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.