Hallo,
I have implemented a motor control system with a lot of interrupts. I run a FOC system attached to the EPWM-Modul, interrupt function ic connected to the EPWM1_INT in PIE-Group-3 (all 20µs)
To get always new Motor-Current informations, the ADC is connected to the MCBCP-B with DMA service on Channel DMA-6, DINTCH6 Interrupt PIE-Group-7.
The main controllers like Speed are running in Timer-0 Interrupt with TINT0 of PIE-Group-1 (all 200µs)
Both lower priorised Ints EPWM1 and DINTCH6 should always be service, although during a running TINT0 inetrrupt routine.
This works fine with the EPWM1, but from time to time the DINTCH6 is not able to interrupt the TINT0 of Timer-0.
This means, the FOC function has no actual Motor-current value.
I have the following code in the TINT0 interrupt function, following the SPRUFB0D.PDF:
Uint16 TempPIEIER;
TempPIEIER = PieCtrlRegs.PIEIER1.all; // Save PIEIER register for later
IER |= 0x0044; // Set global priority by adjusting IER
IER &= 0x0044; // Allow EPWM1_INT and DINTCH6
PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
asm(" nop");
EINT; // Clear INTM to enable interrupts
What else can prevent the DINTCH6 from interrupting the TINT0 routine?