AnsweredAssumed Answered

STM32F0xx HAL_I2C Driver - Slave Functions

Question asked by MFR on Jul 14, 2016
Hello - 

I am looking for clarification on why each of the HAL_I2C_Slave_xxxx() transmit and receive functions take a Size parameter.  If I were going to call HAL_I2C_Slave_Recieve() (after being write-addressed by the master), how could I possibly ever know how many data bytes the master will end up sending me?   Specifying a Size parameter any larger or smaller than required by the master hangs the bus in various ways.

The same goes for HAL_I2C_Slave_Transmit() (after being read-addressed by the master) - There is no way to predict how many bytes the master will clock it for.
Each of the provided HAL_I2C examples are limited since they only use fixed-size transfers.

So what am I missing?  What's the Size parameter for?  Is this just a limitation of the HAL_I2C driver?