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.

[参考译文] CCS/MSP430I2021:屏蔽中断

Guru**** 2546020 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/946763/ccs-msp430i2021-masking-interrupt

器件型号:MSP430I2021

工具/软件:Code Composer Studio

您好!

我正在使用启用中断的 GPIO 引脚之一。 当发生外部事件时、该引脚将切换。

但是、在特定的时间、我需要在没有中断的情况下执行操作、但我不想错过外部触发。

如果我禁用 GPIO 引脚中断、我将丢失来自外部引脚的触发信号。

问: 我是否有办法做到这一点…

1、使能中断

2.启用 GPIO 屏蔽中断

3.处理关键代码时不会中断(在此期间切换外部 GPIO 引脚)

4.禁用 GPIO 中断屏蔽

5.跳转至 ISR

LK

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    如果发生引脚中断条件、它将存储在 PxIFG 寄存器中。 当您(重新)启用 PxIE 时、中断将被触发。