2024-06-22 05:50 AM
Hello,
we are using the I2C in STM32L431 as below configuration
in all .ioc file we enabled the event and error interrupt for both controllers
Master will send query to slave for some data after every 1 sec.
if slave does only I2C communication, then the query is received by slave. but if slave does some other tasks also then query is not received by slave.
during testing we found that Slave is not getting the interrupt. HAL_I2C_SlaveRxCpltCallback() is not called.
Pls help me to solve it.
my code of slave(I2C_S_Reply) and master(I2C_M_Read) is attached with the
2024-06-24 06:15 PM
uint16_t Device_Add = 36 << 1;
2024-06-26 05:03 AM
Thanks Karl,
Master is sending the data to slave, slave received the data in while(1).
But we want to receive data on interrupt basis.
during debugging none of the following functions were called in receive or transmit condition.
HAL_I2C_MasterRxCpltCallback()
HAL_I2C_MasterTxCpltCallback()
HAL_I2C_SlaveRxCpltCallback()
HAL_I2C_SlaveTxCpltCallback{()
Pls help us to get data on interrupt.
code of both controller was attached with the original post