AnsweredAssumed Answered

STM32F030 I2C Memory Interface emulation

Question asked by Steve Sutherland on Dec 7, 2017
Latest reply on Dec 8, 2017 by Steve Sutherland

I would like to make my MCU appear as a 256-byte I2C RAM on the I2C bus - then I can have the controlling device simply write to the 'RAM' in  order to communicate.

 

This requires variable length access ( e.g. 'write', 'address', 'data0', 'data1', 'data2'.... 'datan' ) where the address written to will auto-increment on each I2C data-byte.

 

This sounds reasonably simple using the DMA functions on an I2C slave, but all the example code I have seen for the I2C interface works with a fixed size comms buffer.

 

Are there any examples which show this sort of I2C interface - or has anyone implemented this? 

Outcomes