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.

[参考译文] MSPM0C1106:用于禁用多个 IQR 的 API

Guru**** 2524550 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1555609/mspm0c1106-the-api-to-disable-multiple-iqrs

器件型号:MSPM0C1106


工具/软件:

您好专家

客户希望 使用一个 API 一次禁用多个 IQR、但我们的 drivelib 似乎只具有 NVIC_DisableIRQ () 来一次禁用一个 IRQ、drivelib 是否有其他函数来满足这一需求?

谢谢

Joe

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

    您好 Joe、

    我相信他们可以使用 __disable_irq(); 将 PRIMASK 设置为 1、这将禁用除 NMI 和硬故障之外的所有中断、以及 _enable_irq(); 将 PRIMASK 清除为 0 并启用所有中断。 这些不是 TI DriverLib 的一部分、而是针对 ARM Cortex-M 内核存在的指令。

    此致、

    Owen

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

    你好 Owen

    在哪里可以找到 API 定义、似乎它不在 core_CM0plus.h 头文件中。

    谢谢

    Joe

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

    您好 Joe、

    根据它们使用的编译器、这些函数在 cmsis_x.h 文件中定义、其中 x 是编译器。 例如、在 CMSIS_gcc.h 中、定义如下:  

    对于 TI Clang (CMSIS_CCS.h)、其外观如下所示:

    ARM 文档对于您查看以下内容也可能很有用: https://developer.arm.com/documentation/dui0662/b/Cortex-M0--Peripherals/Nested-Vectored-Interrupt-Controller/NVIC-usage-hints-and-tips

    此致、

    Owen