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.

[参考译文] CC3200-LAUNCHXL:如何访问 ENERGIA 中 CC3200的计时器

Guru**** 2595770 points
Other Parts Discussed in Thread: CC3200, ENERGIA

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

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/574912/cc3200-launchxl-how-to-access-timers-of-cc3200-in-energia

器件型号:CC3200-LAUNCHXL
主题中讨论的其他器件:EnergiaCC3200

您好!

在 Energia 中使用 cc3200的计时器时、我面临很多问题。

我没有在串行监视器上获得任何计时器电流值的输出。

我正在共享我的代码。

有人能告诉我犯了什么错误。

实际上、我想计算不同代码中的一个函数所花费的时间。

但我无法在 Energia 上运行计时器。

是否有人可以共享有关如何配置和启用计时器的基本代码。

工作代码可能会对我有所帮助。

#include

#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_timer.h"
#include "inc/hw_types.h"
#include "debug.h"
#include "interrupt.h"
#include "timer.h"
#include "driverlib/prcm.h"
#include "inc/hw_gprcm.h"
#include "wiring_prive.h"
#include "driverlib/rom_map.h"
#include "driverlib/pin.h"


unsigned long count=0;
void setup()


引脚模式(RED_LED、输出);
PRCMPeripheralClkEnable (PRCM_TIMERA0、PRCM_RUN_MODE_CLK);
PRCMPeripheralReset (PRCM_TIMERA0);

TimerDisable (TIMERERA0_BASE、TIMER_Both);
TimerConfigure (TIMERERA0_BASE、TIMER_CFG_PERIODIC_UP);
HWREG (TIMERERA0_BASE + TIMER_O_TAV)=0;
TimerEnable (TIMERERA0_BASE、TIMER_Both);
Serial.begin(115200);

void loop()


TimerEnable (TIMERERA0_BASE、TIMER_Both);
计数= TimerValueGet (TIMERERA0_BASE、TIMER_A);
serial.println (count);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    转到 SimpleLink WiFi CC31xx/CC32xx 论坛。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Agam、

    43oh.com 上提供了 Energia 讨论论坛。 我不太了解、但我确实看到有一个 Driverlib 库可以公开 driverlib。 这也许值得研究

    亚伦