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.

[参考译文] AM6442:以微秒为单位捕获计时器

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1435170/am6442-capture-the-timer-in-micro-seconds

器件型号:AM6442
主题中讨论的其他器件:SysConfig

工具与软件:

您好!

我当前正在使用 SK-AM64x 板、并尝试使用 Code Composer Studio (CCS)中的计时器捕获功能来测量外部信号的脉冲宽度。 具体来说、我将使用该TimerP_getCount(TIMER_BASE_ADDR)函数来获取计时器计数。 但是、我遇到了一个问题:对于脉冲宽度为8 ms 的信号(通过逻辑分析仪确认)、该函数返回的大计数值接近4294967290。 这是无法预料的、因为我预计在给定脉冲持续时间的情况下、该值会小得多。

以下是我的当前计时器配置:

TimerP_Params timerParams;
gTimerBaseAddr[TIMER]=(uint32_t) AddrTranslateP_getLocalAddr (TIMER_BASE_ADDR);

TimerP_PARAMS_INIT (&timerParams);
timerParams.inputPreScaler = TIMER_INPUT_PRE_SCALER;
timerParams.inputClkHz = TIMER_INPUT_CLK_Hz;
timerParams.periodInNsec = timer_nsec_per_tick;
timerParams.periodInUCec = 0U;
timerParams.oneshotMode = 0;
timerParams.enableOverflowInt = 0;
timerParams.enableDmaTrigger = 0;
TimerP_setup (gTimerBaseAddr[TIMER]、&timerParams);

TimerP_START (gTimerBaseAddr[TIMER]);

什么可能导致该TimerP_getCount函数4294967290在8ms 脉冲宽度内返回如此高的计数值()?

如何正确配置并使用计时器 准确测量外部信号的时长?

此致、
闪耀 K 乔治