This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C Interrupt Priority

Does anyone know which of the two I2C interrupts, DataTransfer and Protocol, should be given the higher interrupt priority ?

There is IIC_DIC - DataTransfer
and IIC_PEIC - Protocol

Does priority of these two matter ? If so what should they be ?

Thanks,

  • I would set the Data Transfer interrupt at higher priority - even use PEC to service it. Just to not slow down the transfer rate. You don't do anything else than read or write the IIC data buffer on Data Transfer interrupt.

    The Protocol interrupt is where you check the various flags and decide what to do next. SCL is held low as long as any of the interrupt flags is set, so the Protocol interrupt need not have a high priority.

    Someone who has actually used the IIC might have a different opinion..

    Sauli