I2C Slave “Repeated Start�? Callback?
STM32F105, HCLK=72MHz, HAL Ver 1.1.8.0, SCL = 100KHz
Is there a “Repeated Start�? HAL callback? I couldn’t find any direct reference but does the STM32 I2C peripheral know when this occurs and set a status bit somewhere?
In my application, I can’t allow the slave to stretch the clock. So when the Master sends my Device Address followed by a Register Number, my slave code polls SCL/SDA GPIO pins to detect Repeated Start then calls HAL_I2C_Slave_Seq_Transmit_DMA. If I wait for the 2nd Address Callback, the slave transmit starts too late.
My approach appears to work but assumes Repeated Start is to the same device address (only a direction change).
I tried calling HAL_I2C_Slave_Seq_Transmit_DMA after the 1st address callback (before master sends the Register Number to slave) but it didn’t work. The slave doesn’t know in advance if the master will continue writing after it sends the initial Register Number (slave supports data read and data write). The earliest indication is Repeated Start.
