1596 views|0 replies

3836

Posts

19

Resources
The OP
 

Talk about the MSP430 interrupt nesting mechanism [Copy link]

(1)430 disables interrupt nesting by default, unless you enable the general interrupt EINT again in an interrupt program. (2)When entering an interrupt program, as long as you do not enable the interrupt again in the interrupt, the general interrupt is disabled. At this time, the incoming interrupt will not be executed regardless of whether it has a higher or lower priority than the current interrupt. (3)If the general interrupt is enabled in interrupt A, you can respond to the subsequent interrupt B (regardless of whether B has a higher or lower priority than A), and continue to execute after B is executed. Note: When entering interrupt B, the general interrupt will also be disabled. If interrupt C needs to be responded to when interrupt program B is executed, the general interrupt must also be enabled at this time. If no interrupt needs to be responded to, the interrupt does not need to be enabled. After B is executed, when you jump out of the interrupt program and enter program A, the general interrupt will be automatically enabled. (4) If a general interrupt is enabled during an interrupt, and there are multiple interrupts at the same time, they will be executed according to the priority, that is, the interrupt priority will only work if multiple interrupts arrive at the same time! The interrupt service does not implement the preemptive principle. (5) For a single-source interrupt, as long as the interrupt is responded to, the system hardware automatically clears the interrupt flag. For the comparison/capture interrupt of the TA/TB timer, as long as TAIV/TBIV is accessed, the flag is automatically cleared. For multi-source interrupts, the flag must be cleared manually. For example, for the P1/P2 port interrupt, the corresponding flag must be cleared manually. If "EINT()" is used to enable the interrupt in this type of interrupt, and the flag is not cleared before enabling the interrupt, the same interrupt will be continuously embedded, causing the stack overflow to cause a reset. Therefore, in this type of interrupt, the flag must be cleared before the interrupt switch is enabled.


This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list