Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 6 months ago.
mbed I2C lib: how to deal with long reponse time (mbed) I2Cslave ?
Hi list, I've successfully tested a mbed to mbed (2 nucleo-L152 boards) communication in I2C but I need to declare a "bigger than needed" data_read buffer for the master to get the whole slave answer (e.g; 48 bytes for effective 16 bytes from slave)
The reason is that as soon as the master's sends its I2C.read it waits for slave's to reply (quite normal ;) ,and fills its data_read buffer with FF until the slave replies;
I've tested with "stop" and "nostop" on the I2C.read and with no difference in the result.
so my questions are : - is there any way to implement (activate) the clock stretching feature in I2CSlave lib ? - if not, is it thinkable to have a function similar to serial.available in the (master) I2C lib ?
thanks you for your support/ replies Rico