The issue with HAL_I2C_EnableListen_IT in I2C Slave Data Transmission using STM-HAL
I am using STM32G050 and I also tried with STM32L476. I am transmitting data as an I2C Slave using STM-HAL. However, when I use HAL_I2C_EnableListen_IT, the transmission is an error. I can't read values and see the logic analyzer. HAL_I2C_DisableListen_IT allows successful data transmission. I am trying to understand the underlying reasons for this behavior. Why I can't transmit values?
uint8_t packed1[10] = { 0xAA, 0x01, 0x07, 0x01, 0x12, 0x55, 0x12, 0x01, 0xAA, 0x2B };
uint8_t packed2[10] = { 0xBB, 0x01, 0x07, 0x01, 0x12, 0x55, 0x12, 0x01, 0xAA, 0x2B };
HAL_I2C_EnableListen_IT(&hi2c2);
HAL_I2C_Slave_Transmit(&hi2c2, packed1, 10, HAL_MAX_DELAY);
HAL_Delay(300);
HAL_I2C_DisableListen_IT(&hi2c2);
HAL_I2C_Slave_Transmit(&hi2c2, packed2, 10, HAL_MAX_DELAY);
HAL_Delay(300);
