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.

[参考译文] CC2652R7:如何使用 INBUILD RTC 进行数据记录以获得准确的计时

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1400207/cc2652r7-how-to-use-inbuild-rtc-for-data-logging-purpose-to-get-accurate-timing

器件型号:CC2652R7

工具与软件:

1)我需要将一些传感器数据记录到内置闪存中,并有精确的时间戳,如1秒乘1秒。 (更好,我们也可以得到日期)

有特殊要求需要使用编译 RTC 不能使用时钟或计时器  

我在 fatsd 示例中找到了此示例代码是否有人对如何解码此代码中的准确时间数据进行了广泛的解释?

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

    大家好、Tharusha Hansima、

    我希望你做得好。

    我们应该能够使用此处的计时器函数、并且每秒有一个全局递增。 可表示为:

    Timer_Handle    handle;
    Timer_Params    params;
    Timer_Params_init(&params);
    params.periodUnits = Timer_PERIOD_HZ;
    params.period = 1;
    params.timerMode  = Timer_CONTINUOUS_CALLBACK;
    params.timerCallback = UserCallbackFunction;
    handle = Timer_open(CONFIG_TIMER0, &params);
    if (handle == NULL) {
        // Timer_open() failed
        while (1);
    }
    status = Timer_start(handle);
    if (status == Timer_STATUS_ERROR) {
        //Timer_start() failed
        while (1);
    }
    sleep(10000);
    Timer_stop(handle);

    这对您有用吗?  

    谢谢!
    Alex F