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**** 2535750 points
Other Parts Discussed in Thread: MSP432E401Y, SYSBIOS

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1121699/msp432e401y-how-time-of-the-day-obtained

器件型号:MSP432E401Y
Thread 中讨论的其他器件: SYSBIOS

我正在为 MSP432E401Y 开发软件。

我想知道一天中的时间是如何获得的。

详细信息,我看到一天的时间是由函数 time()生成的,函数 time()调用函数 ti_sysbios_hal_sectionons_get()。

不是 ti_sysbios_hal_sectionons_get()的源代码,因此我不理解它的作用。

我想知道 ti_sysbios_hal_sectionons_get()是否执行函数 SNTP getTimer(),该函数从 Internet 中的时间服务器获取时间。

非常感谢

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

    嗨、Long、

    查看此页面: https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_46_01_38/exports/bios_6_46_01_38/docs/cdoc/ti/sysbios/hal/Seconds.html 

    看起来 seconds_get()函数只是从 RTC 外设拉秒计数器。  但要使其工作,您必须设置 RTC,然后首先使用 seconds_set()加载时间。   一旦 RTC 经过时间编程并正在运行,它将保持时间,然后您的应用程序可以使用 seconds_get()来查看当前时间。   

    希望这对您有所帮助。

    JD

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

    JD、您好!

    非常感谢。 但我仍然有问题。 我的硬件没有备用电池。 加电后、 RTC 寄存器计数器(由32kHz 时钟计数)在一天中的时间被复位为0、那么系统必须用当前时间对其进行初始化、 可通过函数 SNTP_getTime()或其他方式从 Internet 获取。 我是对的吗?

    谢谢你