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

hi,

is any software interrupts available in MSP430F471xx? if it available means how can we use it? if it is not available, shall we generate Software interrupt by coding?

-Pratheep karunanithi

 

  • TI Processors Wiki said:
    The MSP430xxxx Family User`s Guide (Eg: MSP430x1xx Family User`s Guide, MSP430x2xx Family User`s Guide) shows all the information available for the instruction set in the `RISC 16-Bit CPU` chapter

    http://processors.wiki.ti.com/index.php/MSP430_Instruction_Set

    So the appropriate Family User`s Guide is the document you require - and look in the RISC 16-Bit CPU chapter...

  • For F1xx, there is no instruction designed to generate "software interrupt". However, you can trick an otherwise unused hardware interrupt to do it for you.

  • There is no command in the MSP430 command set that will call an interrupt vector. And it isn't really necessary anyway.

    Actually, a software interrupt isn't an interrupt, as it happens exactly when the software wants it and initiates it. So it is just a plain funciton call with unknown destination (taken from teh vector table)

    The only reason for software interrupts is that the program runs in a protected environment and does not know where the function is or where the pointers to the functions are. THis may be true for a system with an OS and individually and perhaps concurrently loaded and executed software, but on an MSP it is really not needed.

    The MSP supports indicrect subroutine calls. So clearing GIE bit and calling a function at a known address or indirectly over a function pointer at a known address, or a vector table, does exactly the same.

    There is, however, no way to directly call a real interrupt function, as this requires the status register to be tossed on stack after the return address, which is impossible with an assembly instruction.

    But then, the MSP interrupt structure allows manually setting any interrupt flag and therefore triggering any hardware interrupt by software. If you really need it this way.

  • Jens-Michael Gross said:
    it isn't really necessary anyway

    Yet again, if the OP had stated his Goal, we might have been able to suggest some appropriate way(s) to achieve that goal...

    http://www.catb.org/~esr/faqs/smart-questions.html#goal

     

  • Andy Neil said:
    Yet again, if the OP had stated his Goal,

    No. He asked whether they are available and if not (which is the case) whether we shall simulate them in software (not how we can simulate them in software).

    The answer is a double no. And the explanation that they are not needed anyway was just an add-on. Together with the explanation that and why real software interrupts are impossible to simulate at all.

**Attention** This is a public forum