AnsweredAssumed Answered

HAL I2C DMA Detect NAK (STM32F072)

Question asked by tien.michael on May 7, 2018

I am using HAL I2C to interface Cryptomemory (from ATMEL). Using I2C master transmit(HAL_I2C_Master_Transmit_DMA), I need to differentiate the following two conditions of device,

 

1. Send B4+ACK, 00+ACK, 00+ACK, 01+NAK

2. Send B4+NAK

 

They are both valid operations in this device under certain conditions. In the second condition, I need to repeat sending B4 until ACK received.  

I wasn't able to differentiate using HAL_I2C_GetError because both return the same error.  Is there a way to know DMA queue transferred count?  

 

If not possible, I might need to abandon DMA.

Thanks.    

Outcomes