Other Parts Discussed in Thread: SYSCONFIG
Hello,
I have EPWM peripherals (3, 4, 6 and 4) set with a common counter period to achieve 50us. Once the Counter reaches 0, the EPWM3 is configured so that ADC will be triggered to start conversion. Once conversion is finished, the end of conversion (EOC) interrupt is triggered. This give me an interrupt every 50 us. My interrupt routine [interrupt void ADCC1_ISR(void)] would clear the INT1 flag and acknowledge the interrupt [PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;]
This worked well until I added some code to perform I2C communication with an external EEPROM.
I2C A is used with SDAA connected on GPIO 0 and SCLA connected on GPIO 1. both are set has output, open drain, GPIO_ASYNC.
When I2C comms is initiated, on SDA set high, the interrupt routine is entered before the 50us interrupt. (which should mean an End of Conversion of the ADC has occurred.).
On the reference manual GPIO 0 and GPIO 1 are sharing muxing with EPWM1A and EPWM1B. I am not using EPWM1.
I have also disconnected the EPWM1 clock to ensure it is switch off.
--> With the same software, wiring the I2C A on GPIO32 and GPIO 33 it works well. There is no interference with the interrupt !
Is there anything I am missing with I2C A on GPIO 0 and 1? Haven't found anything relevant in the errata either
here below some trace on a picoscope.
in purple the interrupt pulses 50us before the I2C is transferring (reading) data
red is the I2C clock
blue is the I2C SDA
as soon as the SDA is high the interrupt handler will be called (an interrupt happens)

a bigger view
