I find the documentation for using PMBUS in I2C mode and especially with interrupts lacking.
I am aware of the pmbus_eeprom example in
libraries/communications/PMBus/c28/examples/common/source/pmbus_eeprom.c
and this has helped me to talk to a sensor we are using.
However that code uses polling in waitUntilBusBusy and waitForAck, one of which
includes a loop to delay 100usec!
In our case they both seem to loop around 300-800 times worst case, which is not acceptable.
So I would like to convert the code to be interrupt driven.
I think I have figure out how to set the interrupt mask PMBINTM to
capture busy condition (BUS_FREE?) but and ACK (DATA_REQUEST and DATA_READY??)
but detecting NACK evades me.
Also clearing / acknowledgment of interrupt seems obscure.
By experimenting I've determined that all I have to do is
PieCtrlRegs.PIEACK.all |= 1 << (8 - 1); // clear group 8
which is kind of strange as the actual peripheral (PMBUS) still has the condition that caused the
interrupt in the first place.
And yeah, I don't want any driver code, just honest close to the metal examples or description.