Other Parts Discussed in Thread: C2000WARE
We are using the TMS320F28379D and using the USB as a bulk device to send status information out (~48bytes every 80us).
CPU1 has 2 interrupts:
ADCB1 interrupt (INT1.2)
USBA interrupt (INT9.15)
Our A/D interrupt occurs every 80us and the USB interrupt is sometimes using up to 16us asynchronously from the A/D interrupt.
We are having an issue when the real-time is getting short that the USB interrupt is interfering with the real-time A/D interrupt.
We need to nest the interrupts so the USB interrupt can be interrupted by the A/D interrupt.
I think I only need to modify the function f28x_USB0DeviceIntHandler() shown below:
__interrupt void f28x_USB0DeviceIntHandler(void)
{
USB0DeviceIntHandler();
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}
I made the modifications below:
__interrupt void f28x_USB0DeviceIntHandler(void)
{
IER = M_INT1; // allow only ADCB INT1.2 to interrupt
PieCtrlRegs.PIEACK.all = 0xffff;
asm(" NOP");
EINT; // enable all maskable interrupts
USB0DeviceIntHandler();
DINT; // disable all maskable interrupts
}
I was hoping that this change would only slow down the amount of data we can send a little.
When I look on a scope I see that the USB is no longer interferring with the A/D interrupt, but
the USB doesn't seem to be getting much data across even when the A/D interrupt is not using much time.
Do I have an issue with what I have done or do the bulk USB functions not allow nesting of interrupts ?
One other thought, when I look on the scope the USB interrupt is occurring at almost the same rate as the A/D interrupt, is it possible to eliminate the USB interrupt and turn it into a polled process at the end of the A/D interrupt since it never seems to occur at a rate faster than the 80us ?
Thanks for any suggestions...John