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/MSP432P401R:通过 DriverLib 清除 Timer_A 捕获溢出位

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/591578/ccs-msp432p401r-clear-timer_a-capture-overflow-bit-through-driverlib

器件型号:MSP432P401R

工具/软件:Code Composer Studio

是否有办法通过 DriverLib 调用清除 Timer_A 捕获溢出位? 这是 TAxCCTLn 的 COV 位、在 DriverLib 的 timer_a.h 中定义为 TIMER_A_CAPTURE_溢出、 在 msp432p401r.h 中定义为 TIMER_A_CCTLN_COV

我看到 这个位可以通过 Timer_A_getCaptureCompareInterruptStatus()来检查、但我找不到清除它的方法。

最接近的选项是 Timer_A_clearCaptureCompareInterrupt(),它只清除中断标志位 CCIFG。

尽管最好通过 DriverLib 完成所有操作、但手动解决方法是按如下方式直接修改位。

BITBAND_peri (timer_A_CMSIS (timer)->CCTL[idx]、timer_A_CCTLN_COV_OFS)= 0; 

使用 DriverLib 1.30.00.40版

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    英里、
    我们目前似乎没有 DriverLib API。 我会询问并了解我们有什么计划来编写一个。