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.

UART Interrupt Routine

I have a question regarding the naming of an interrupt routine. I have polling working on my UART0 and I would like to get the RX interrupt set up. I am using a CSL that was used with the EVM. I am using a c6745 chip on a custom PCB (senior design project). I have looked over the examples related to this chip and I found the interrupt UART example however, I am unclear on one issue. How exactly is the interrupt routine named? The example looks like this:

interrupt void UART2_isr (void)
{

...

}

How do I know what the naming scheme is for the various interrupts and where is this defined? I am using UART0 so naming the interrupt function UART0_isr makes sense but how is this linked and where is it linked? Do I need to define this somewhere? 

thanks,

Paul

  • Paul,

    I'm not sure about CSL. But in any interrupt service routine implementation, the function name will have a standard prototype. But whatever function you define, you've to pass it to a function which takes your function as the handler. Please checkout how other interrupts are implemented. You might be able to find a place in the code where this function pointer is passed as an argument. 

  • Ultimately you need to have that function name/address end up in the interrupt vector table.  There are a number of ways this can be done.  Here are a few of them to give you some ideas of places to look:

    • The CSL has an interrupt handler that comes with it.  I think it was called INTC if I remember correctly.
    • If you're using DSP/BIOS you might look for either a call at run-time to HWI_dispatchPlug or you might open the tcf and look in the HWI section.
    • The "old school" method was to have a file like vectors.asm where you manually typed in the branch instruction to the ISR.
  • Thank you both for your replies.

    A quick search through the UART example files and I located intvecs.asm which is where the "UART2_isr" is linked to the vector table. That pretty much solved my issue as I could not find any other mention of the UART2_isr in the associated header files.

    I would prefer not to use this method in my design so I will look through the TI provided rCSL to see if I can find the interrupt handler that Brad mentioned. Thank you for your assistance. I will continue to plug away at this until I get a working interrupt. 

    Paul