Tool/software:
I am using CPU2 CLA to trigger an ADC conversion, using EPWM_forceADCTrigger(EPWM1_BASE, EPWM_SOC_A);
EPWM1 SOCA is used to trigger four ADC conversions (SOC7, SOC8, SOC9, SOC10).
The ADC interrupt is triggered by the last SOC that is converted (SOC10).
The ADC Interrupt triggers a CPU1 CLA task. This is the only CPU1 CLA task configured.
I set a GPIO in CPU2 CLA to see when the initial trigger for the ADC conversion starts
I set a GPIO in CPU1 CLA to see when the ISR occurs
...and I use a logic analyzer to measure the interval between the GPIO
I am seeing a lot of variation in the interval/latency between the ADC trigger and the ISR. At the lower end, this is ~2.4us, which is close to my calculation for the minimum time to convert 4 channels. At the higher end, I'm seeing up to a 40us latency
Does this variability in latency make sense?
...CPU1 CLA does not have other tasks, so it shouldn't be the case that CPU1 CLA is busy and cannot run the ISR
...It is possible that up to two other ADC channels are being converted. (SOC0, SOC1). While this may delay SOC7/SOC8/SOC9/SOC10, I would not expect this to add more than 1 or 2 us to the conversion time, and should not cause a 40us latency.
Thanks,