CC2640R2F 如何设置定时器为捕获模式,我发现GPTTimer 并没有这种模式功能?
Lease:
用主要使用定时器记录IO的电平变化次数?
min wang13:
回复 Kevin Qiu1:
Kevin Qiu1
When configuring for full-width timer \c ui32Config is set
//! as one of the following values://! – \ref TIMER_CFG_ONE_SHOT : Full-width one-shot timer.//! – \ref TIMER_CFG_ONE_SHOT_UP : Full-width one-shot timer that counts up//! instead of down.//! – \ref TIMER_CFG_PERIODIC : Full-width periodic timer.//! – \ref TIMER_CFG_PERIODIC_UP : Full-width periodic timer that counts up//! instead of down.//!//! When configuring for a pair of half-width timers, each timer is separately//! configured. The timers are configured by setting \c ui32Config to//! the bitwise OR of one of each of the following three://! – Use half-width timers://! – \ref TIMER_CFG_SPLIT_PAIR//! – Timer A://! – \ref TIMER_CFG_A_ONE_SHOT : Half-width one-shot timer//! – \ref TIMER_CFG_A_ONE_SHOT_UP : Half-width one-shot timer that counts up//! instead of down.//! – \ref TIMER_CFG_A_PERIODIC : Half-width periodic timer//! – \ref TIMER_CFG_A_PERIODIC_UP : Half-width periodic timer that counts up//! instead of down.//! – \ref TIMER_CFG_A_CAP_COUNT : Half-width edge count capture//! – \ref TIMER_CFG_A_CAP_COUNT_UP : Half-width edge count capture that counts//! up instead of down.//! – \ref TIMER_CFG_A_CAP_TIME : Half-width edge time capture//! – \ref TIMER_CFG_A_CAP_TIME_UP : Half-width edge time capture that counts up//! instead of down.//! – \ref TIMER_CFG_A_PWM : Half-width PWM output//! – Timer B://! – Same as Timer A but using TIMER_CFG_B_* instead.//!//! \param ui32Base is the base address of the timer module.//! \param ui32Config is the configuration for the timer.
详细请看timer.h中的描述:(请访问站点以查看此文件)
是用定时器来捕获IO电平的变化
TI中文支持网


