AnsweredAssumed Answered

Maximum I2C buffer size for "fwrite"?

Question asked by Myke Predko on Sep 5, 2012
Latest reply on Sep 6, 2012 by David E Seymour



This was originally in the MFS board - sorry about that, the placement was inappropriate. 



I'm doing some I2C writes to an OLED display and it seems that the maximum number of bytes I can write is 64 using the interrupt based I2C driver.


Reading the IO Drivers User Guide, I should be looking for the <device>_I2C_INIT_STRUCT and I found it defined in i2c_ki2c.h BUT the RX & TX Buffer sizes are defined as TX_BUFFER_SIZE & RX_BUFFER_SIZE.


Doing a bit of digging, I did find the value for the I2C RX & TX _BUFFER_SIZE macros in twrk60n512.h (I'm using a TWR60N512 for this stage of development).


Is there any reason why I can't change the _BUFFER_SIZE values for the I2C port I want to use, rebuild the libraries and go forth, fat dumb and happy?


Just as an update on the original request, I have changed the constant values in twrk60n512.h to 256 (from 64) and test out the I2C operation and now I can send data strings that are longer than 64 (63 actually) bytes.  It seems to work okay but I still want to ask is there anything that I should watch for?