2014-04-22 05:26 AM
Hi,
I have just started my first project using the new STM32CubeF firmware library (on an STM32F4-Discovery board). I do not understand how to implement a normal I2C slave using the I2C HAL. Why are there two functions: one for slave transmitter and one for slave receiver? As an I2C slave I do not know the direction before the transfer has been started by the I2C master. Normally I would expect a function, which receives a TX and a RX buffer. The examples do not really help to implement a real world I2C slave. How can I implement an I2C slave supporting both directions (e.g. an I2C RAM). #i2c-sla2014-04-22 07:15 AM
Well, the Cube thing, being inflated, mostly undocumented, and obviously not fitting your purpose, does not suit your needs - so why don't you simply forget the whole ''library'' thing and roll out your own?
You can read it to grab some of the implementation details, though. JW