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 initiated interrupts on the msp430

SO ... On an intel part I can invoke an interrupt via software.  There also exists a register that indicates which interrupt, which can be loaded and an Int called.

It is referenced that the Interrupt Vector Table is actually like 32 entries in size, not the 16 slots most of us believe.  It seems on parts with more peripherals the addition vector slots are available - so the mechanism is in place.  I want to place library code vectors in those slots unused on my parts-of-choice and make use of them.

Well, right off, please don't reference chucks of manuals here - what I need will not be found in one commonly available.  Also, don't try to tell me "what do you need that for" as a response.  An Int call, just like PC-BIOS and DOS provides is a very germane method of interfacing different programming languages.  I do some 'C' and '++' but mostly Forth with  performance factoring done in Assembler.  Int calls provide a nice way to write and leverage 'C' libs, plus other languages, and get to them with no fuss, the performance penalties are small and calculable.

The question thus becomes - Is there a register, perhaps one of those marked reserved, that the actual interrupt pivot value resides?  Perhaps a flag can be flipped and force an Int - Nice if the pivot register is loaded with the subroutine library vector already.  Just like DOS - Fast enough, language independent - More options in developing control applications.

Perhaps you TI guys that deal with the RTOS can put in here - I am very sure there are aspects about these parts remaining unpublished that you are privy to.

Thanks

LogicWeavers

We invented 'FM'

  • The Intel 8051 is not able to invoke an interrupt via software. And if you are talking about x86: that register you mention, if it exists at all, is part of an external interrupt controller.

    On the MSP430, interrupt requests can come only from peripherals, and the vector numbers are hardcoded in the MCU.

    If you want to have an actual interrupt, you could set the interrupt flag of an otherwise unused module. Alternatively, connect a GPIO to the NMI input pin, or to some other GPIO input.

    If you really want to use an interrupt vector that your MCU does not use, you can simulate the interrupt in software; just do the steps as described in "Interrupt Processing" in the User's Guide (this requires assembler):

    1. Push the PC value of where you want to return to;
    2. push SR;
    3. clear SR;
    4. jump to wherever the vector points to (or use any other pointer).

  • I found some other threads that discuss software interrupts and x86, which may be insightful.

    Regards,

    James

    MSP Customer Applications

  • Thanks C.L. I concur with your evaluation of the situation, it verifies my findings. Thank you for your time.

**Attention** This is a public forum