cancel
Showing results for 
Search instead for 
Did you mean: 

I2C interrupt mode only works once?

jiangpen
Associate II
Posted on June 21, 2016 at 14:53

I follow the example of the I2C_TwoBoards_ComIT

I have I2C host to send data to the STM32L4 board.

The I2C slave has below logic

HAL_I2C_Slave_Receive_IT(&I2cHandle, (uint8_t *)aRxBuffer, RXBUFFERSIZE);

In the HAL_I2C_SlaveRxCpltCallback, I set a flag to allow main loop to process the data.

But it only works once, and the second time, it cannot receive data and cannot trigger the interrupt.

May I know any other setting need to make I2C slave recieve multiple time?

thanks

 

#i2c-interrupts-stm32
1 REPLY 1
Amel NASRI
ST Employee
Posted on June 27, 2016 at 14:31

Hi jiang.peng,

After receiving data the 1st time, are there any I2C flag errors set?

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.