This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Software interrupt (trap) question

Other Parts Discussed in Thread: TMS320F28335

I'm working on a DSP system that will be interrupt-driven, with a "stack" of prioritized interrupts. I've used this exact architecture before on a Blackfin DSP, but I'm new to the C55x DSP and want to make sure this is possible.

Here's what I've got in mind for the interrupt stack, in decreasing priority:

SINT3/INT1 (priority 5) - external interrupt, used to capture a timer with high precision
SINT6/UART (priority 9) - peripheral interrupt
SINT8/DMA (priority 11) - incoming DMA transfer interrupt, 2 channels. Depending on which DMA channel fired, it will will raise either SINT30/SINT31 and exit.
SINT19/SPI (priority 16) - peripheral interrupt
SINT30 (priority 17) - software interrupt, used for "higher priority" DMA handling
SINT31 (priority 18) - software interrupt, used for "lower priority" DMA handling

All of this will sit on top of a "while(1) sleep();" main loop.

Now, I'm wondering if the "raised interrupt" thing will work. If I execute "TRAP #30" from the SINT8 handler, will the code immediately begin executing SINT30, or will SINT8 continue running until it finishes, with control then going to SINT19 (if SPI interrupt pending) and then SINT30? The latter is what I want.

Thanks!

  • Hi gmarsh,
    I am also facing same problem. I am interfacing MAX3109 with TMS320F28335 through MCBSP (as SPI). MAX 3109 asserts an interrupt for some events and that interrupt can only be cleared by reading Status Register of MAX 3109.
    To read Status Register, I am waiting for MCBSP receive.
    At the ISR , I want to read Status Register of MAX3109 to clear the interrupt. If I read Status Register at ISR it does not clear the interrupt. If I read the Status Register in main() it clears the interrupt.
    To do this I am using TRAP instruction inside ISR (XINT4). But as TRAP #2 executed it goes to some default ISR and stops.
    I can't understand what is happening ?
    Can you help me ?
  • Make sure you're placing the ISR vector at the right address. The C55x can move the interrupt vector at run time; see the documentation for the IVPD and IVPH registers.