Re: I2C Harmony 2.06
You may regulate priority between I2C Master, and I2C Slave code by selecting different interrupt priority for
interrupts from I2C peripherals handling Master and Slave connections.
But when a interrupt have been triggered, and there are no higher priority interrupts beeing processed,
then I cannot see a reason to try to keep back I2C slave processing.
better getting the callback and interrupt code completed as efficiently as possible.
Be aware that any Callback function called from Interrupt Service code,
will be running in that interrupt priority and context,
so any trickery attempted in interrupt Callback code,
will only slow down processing in any lower priority interrupt, and main loop code.
Higher priority interrupt processing is not affected.
Usually, neither Master nor Slave I2C processing is time critical.
I2C master timing is entirely controlled by the master, and may be slowed down or delayed as needed.
I2C Slave processing running in a microcontroller, depend on it's Master device respecting Clock Stretching,
for both address and data transfers.
And also that Slave code release the clock signal when ready to proceed.
Note, pay attention to what silicon hardware revision the PIC32MZ device is.
Some silicon revisions have hardware Errata for the I2C peripherals.
Read the Errata document for the device family beeing used.