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.

Interrupt Vector for TMS570

Other Parts Discussed in Thread: TMS570LS1227, INSTASPIN-BLDC, HALCOGEN

Hello, 

I am working on the Instaspin-BLDC solution on the TMS570LS1227 and wanted to create an interrupt to call sciNotification(). However, after defining all the necessary functions in main(), the last step I'm unable to figure out is where to put the address for this interrupt in the interrupt vector in sys_startup.c. By this I am referring to: 

static const t_isrFuncPTR s_vim_init[] =
{
    &phantomInterrupt,
    &esmHighInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &rtiCompare2Interrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &gioHighLevelInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &adc1Group1Interrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &phantomInterrupt,
    &adc1Group2Interrupt,
    &phantomInterrupt,
    &phantomInterrupt,  etc...

How can I find information about which line to replace with the address of my interrupt which calls sciNotification()?

Thank you,

Omkar

  • Hi Omkar,

    The notifications are called *by* the ISR. There should be an ISR generated by HalCoGen if you have the interrupt enabled and normally it'll put the ISR into the VIM vector table.

    The SCI ISR doesn't always call notification .. if you're doing an interrupt driven block transfer for example it'll just keep transferring and only call the notification when the block is completed.

    Look at the end of the file 'sci.c' generated by HalCoGen and see if there is an interrupt service routine there.
    You should see that at some point it calls 'sciNotification'..

    If it's not there then I think the problem is still in the GUI of HalCoGen - some box is not checked.
  • Hi Anthony,

    Thanks for the reply! I have opened up HalCoGen and can verify that the ordering of the checkboxes in the gui matches the ordering of the vector for the ISR. It makes sense that the SCI ISR doesn't always call notification, however, I was wondering which of these two SCI interrupt level options I should select from HalCoGen for the interrupt driven block transfer?

    From this doc:  

     It seems that levels in this case are just relative to each other for SCI interrupts, so would I just use level 1 by default? 

    Thank you,

    Omkar

  • Hi Omkar,

    So that really depends on how you have the SCI configured.

    Right now none of the above are enabled so it's a bad example. 

    But, if your using only the "High Level" interrupt you only need to enable the channel in VIM for SCI Level 0 Interrupt (Level 0 is high priority).   Same applies if you only use the low level interrupt.

    We give the SCI two different interrupt levels so that you could do something like do all the transfers with one interrupt handler and only handle errors in a different handler...  although that's not really the way the HalCoGen ISR handler is written.
    I think with the default HalCoGen code it's going to send both interrupt levels to the same handler...

    -Anthony

  • Thank you for the help! I appreciate it.