This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to work with twi event handler?

Hi,

At the moment I try to communicate with an external EEPROM. Writing to the EEPROM seems to work. But when reading back the written data, the program breaks... :-(

Is the twi event handler called for every byte, I want to read? Or is the twi event handler called, when the complete data read for example 20byte is done?

Please find attached my complete eeprom read/write implementation (including twi_init and event handler). Maybe someone can have a look on it.

The programm is running on nRF51822 - AC, with the SDK8.1.0.

m24512.c

Regards, BTprogrammer

Related