I'm trying to use the NRF51DK to talk to this EEPROM (www.st.com/.../CD00290537.pdf). I've started by trying to modify the twi sensor example. One of the things that's different from the example code with the accelerometer is that this EEPROM requires 3 bytes of data to be sent when you want to write to a specific location (2 byte data_address and 1 byte of data). On the accelerometer, it seems you write 1 byte at a time.
I was able to get the NRF51DK to output coherent I2C information (verified using an o-scope) when sending just 8 bits at a time, but when I tried to increase the size of the message to accommodate 3 bytes, I can't seem to get it to output anymore.
I've attached my modified code (just as a test to get things working, I'm trying to write 0xAA to address 0x0080 on the EEPROM). Basically the only change I've made is to try to increase to size of the data to uint32. I realize this is a byte bigger than I need, but once I get this working, I figured I could cut it back down to 3 bytes.
Anyone have any thoughts? I'm very new to I2C and EEPROMs so I imagine I've violated some rule here.
Thanks!