Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Software initiated interrupts on the msp430

$
0
0
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): Push the PC value of where you want to return to; push SR; clear SR; jump to wherever the vector points to (or use any other pointer).

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>