12 Replies Latest reply on Dec 7, 2014 8:48 AM by user_14586677

    Interrupt based I2c communication


       I am develloping an application to read from multiple sensors using the I2c API on PSoC 5LP. I know the API functions such as I2C1_mstrWrBufIndex use interrupts to write multiple bytes. The usual way to use this function is to poll MasterWriteBuf to know when all data has been sent. What I would like though is to be able to send multiple byte to multiple devices (and rstarts) by constructing a queue (liked list) and uses interrupts to send new packets with minimal CPU intervention.


      I prefer not to modify the interrupt functions used by the API (I could call a function from this interrupt). My question is if there is a way to trigger an interrupt from the MasterStatus value. This trigered interrupt would then use the API to send a new packet. Or if there is a way to use directly the I2C API to send multiple packets without having to wait for each of them to be sent.