Part Number: AM13E23019
Hello
I am observing interrupt latency of around 240ns (MCLK = 200MHz) . Below are the syconfig configuraitons
-
MCPWM4 Period is kept 16KHz (6249 Ticks), up count, No prescaler. MCPWM4 generate SyncOut pulse for eCAP when timebase counter equals to zero.
-
PWM2_CMPB = 5800 - this is used to generate accurate Pulse to verify the MCPWM interrupt latency
-
CMPC = 5800 - This is used to generate the MCPWM Interrupt(5800 is some random number. The goal is to generate the interrupt just before the time base counter becoming to zero)
-
PWM2A is configured to toggle When TBCTR = 0
-
PWM2B is configured to toggle when TBCTR = PWM1_CMPB On Up Count
-
ET1 : when the Time base counter is equal to CMPC, which is the same as PWM2_CMPB (5800). ET1 is configured as the source to generate interrupt
-
The priority of the MCPWM interrupt is kept the highest. Debug3 pin is toggled in ISR as first statement.
extern "C" void APP_MCPWM_4_INT_Handler()
{
BSP_AM13E230_E2::Debug3Pin_High();
MotorControl_Callback();
g_diagCounters.Mcpwm4++;
DL_MCPWM_clearInterrupt(APP_MCPWM_4_INST, DL_MCPWM_INT_ET_1);
DL_MCPWM_clearGlobalInterrupt(APP_MCPWM_4_INST);
BSP_AM13E230_E2::Debug3Pin_Low();
}
void BSP_AM13E230_E2::Debug3Pin_High()
{
DL_GPIO_setPins(GPIO_GRP_0_PIN_Debug3_PORT, GPIO_GRP_0_PIN_Debug3_PIN);
}
void BSP_AM13E230_E2::Debug3Pin_Low()
{
DL_GPIO_clearPins(GPIO_GRP_0_PIN_Debug3_PORT, GPIO_GRP_0_PIN_Debug3_PIN);
}
-
There is interrupt latency observed (around 230ns) for MCPWM ISR. Please suggest if it can be improved or this is expected.

NOTE: Logic Analyser is configured to sample at 250 MHz