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.

[参考译文] MSP432E401Y:定时器捕捉预分频

Guru**** 2557960 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/860829/msp432e401y-timer-capture-prescale

器件型号:MSP432E401Y
我将测试计时器捕获功能。
所有其他功能都已经过测试、但 预分频功能不能正常工作。
源代码 如下所示。

   MAP_SysCtlPeripheralEnable (SYSCTL_Periph_TIMER3);
   MAP_TimerConfigure (TIMER3_base、TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_ONE_SHOT | TIMER_CFG_B_ONE_SHOT);
   MAP_TimerPrescaleSet (TIMER3_base、TIMER_A、10);
   MAP_TimerPrescaleSet (TIMER3_base、TIMER_B、20);

由于 TIMER_A 的预分频值是 TIMER_B 的一半、因此通过 MAP_TimerValueGet ()函数获得的值是 TIMER_B 的两倍
但是 ,如果我将计时器设置为捕获模式...

    MAP_TimerConfigure (TIMER3_base、TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_CAP_COUNT | TIMER_CFG_B_CAP_COUNT);

读取相同的值。
在捕捉模式下、预分频是否不起作用?
我想了解有关捕获模式和预分频行为的更多信息。