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.

[参考译文] MSP430FR5989:将 P2.1 (TB0.5)设置为进入捕捉模式不会生效、也不会进入中断模式

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/985721/msp430fr5989-setting-p2-1-tb0-5-to-enter-capture-mode-does-not-take-effect-and-does-not-enter-interrupt-mode

器件型号:MSP430FR5989

我想使用 MCU P2.1的捕获模式作为 TB0.5来捕获输入波形的脉冲宽度、但 MCU 没有进入中断功能。 以下是我的配置代码:

P2DIR&=~BIT1;

P2IES|=BIT1;
P2IFG&=~BIT1;
P2IE|=BIT1;

TB0CCTL5 =CM_3|CCIS_1|SCS|CAP|CCIE;
TB0CTL = TBSSEL_ACLK | MC__Continuous; // ACLK、连续上升

请帮助我分析问题所在。

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

    代码输入错误、以下是实际代码:

    P2DIR&=~BIT1;

    P2SEL1&=~BIT1;
    P2SEL0|=BIT1;

    TB0CCTL5 =CM_3|CCIS_1|SCS|CAP|CCIE;
    TB0CTL = TBSSEL_ACLK | MC__Continuous; // ACLK、连续上升

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="459399" URL"~/support/microcontrollers/msp430/f/msp-low-power-microcontroller-forum/985721/msp430fr5989-setting-p2-1-tb0-5-to-enter-capture-mode-does-not-take-effect-and-does-not-enter-interrupt-mode/3641368 #3641368"]P2SEL1&=~BIT1;
    P2SEL0|=BIT1;[/报价]

    这是相反的。 尝试:

    >P2SEL1|=BIT1;
    >P2SEL0&=~BIT1;

    [参考数据表(SLAS789D)表6-22]