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

Interrupt driven TWI master?

I see there have been some issues with TWI in early revs of silicon, but looking at SDK 6 I see the twi_master_hw uses the silicon hardware to read/write the I2C device, but no example of an interrupt driven version is provided. I want to use a cheap eeprom to save key values but with I2C being so slow I don't want to waste time waiting for the process. I understand that typically the data is needed in a timely manner but I'd prefer to setup a string of data to write to the eeprom and let the interrupt system take care of the necessary handshaking. Is there something preventing me from doing that? I know that pstorage is designed to do this, but I need to update values frequently and I'm afraid I'll wear out the flash. EEPROMs have 50 times the write cycles of the flash.

Parents
  • I have been looking at this as well, I will be making heavy use of the I2C interface in my application and can't afford to block on I2C transactions.

    I've been using spi_master.c as a starting point, because it is interrupt driven.

    Any feedback from nordic on this? I'd much rather avoid having to spend the time to implement this myself or at least have a nordic supplied starting point.

Reply
  • I have been looking at this as well, I will be making heavy use of the I2C interface in my application and can't afford to block on I2C transactions.

    I've been using spi_master.c as a starting point, because it is interrupt driven.

    Any feedback from nordic on this? I'd much rather avoid having to spend the time to implement this myself or at least have a nordic supplied starting point.

Children
No Data
Related