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/TM4C1230H6PM:TM4C1230H6PM

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/578981/ccs-tm4c1230h6pm-tm4c1230h6pm

器件型号:TM4C1230H6PM

工具/软件:Code Composer Studio

我想知道启用 GPIO 中断所需的步骤。 每当 GPIO 中的输入变为高电平时、我想读取另一个 GPIO 引脚类型上的一些数据。 我使用的是 TM4C123gxl。 我想特别知道如何配置 GPIO、以便在检测到高电平信号时立即启动中断。  

我们将感谢您的任何帮助。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    假设您希望使用 PB0在上升沿生成中断、那么下面是一个典型的代码序列。

    SysCtlPeripheralEnable (SYSCTL_Periph_GPIOB);
    IntEnable (INT_GPIOB);
    GPIOPinIntClear (GPIO_PORTB_BASE、GPIO_PIN_0);
    GPIOPinTypeGPIOInput (GPIO_PORTB_BASE、GPIO_PIN_0);
    GPIOIntTypeSet (GPIO_PORTB_BASE、GPIO_PIN_0、GPIO_Rising 边缘);
    GPIOPinIntEnable (GPIO_PORTB_BASE、GPIO_PIN_0);
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    这很有效! 谢谢