To write I2C functions using interrupts and DMA
Bonjour,
Pouvez-vous me dire pourquoi cette façon d'écrire lors d'une transmission I2c par interruption ou DMA ne fonctionne pas :
EN: Hello,
Can you tell me why this way of writing during an I2c transmission by interrupt or DMA does not work?
|
annuler PAC194X_Transmit(s_PAC194X *pObj)
{
HAL_I2C_Master_Transmit_IT(&pObj->I2C, (pObj->I2C_ADD<<1), pObj->BufferTX, pObj->SizeBufferTX);
}
|
Voici ce que j'ai dû faire pour que cela fonctionne :
EN: Here's what I had to do to make it work:
|
annuler PAC194X_Transmit(s_PAC194X *pObj)
{
si (pObj->I2C.Instance == hi2c4.Instance)
{
HAL_I2C_Master_Transmit_IT(&hi2c4, (pObj->I2C_ADD<<1), pObj->BufferTX, pObj->SizeBufferTX);
}
}
|
en mode blocage, cela fonctionne avec la première méthode.
Merci
Rom
EN:
in blocking mode, it works with the first method.
Thanks
Rom
