Thread 中讨论的其他器件:SysBIOS、 SysConfig
您好!
我有一个基于'old' TI-RTOS (而非7)的项目仍在开发中、该项目使用 RTOS 提供的挂钩来与 RTC CH1和 CH2硬件配合使用。
The below snippets show an example of using Channel 1, with Driverlib API calls to configure an RTC event at 4 seconds after boot.
First, in the application .cfg file a hook function is defined for Channel 1:
var Timer = xdc.module('ti.sysbios.family.arm.cc26xx.Timer');
Timer.funcHookCH1 = "&myHookCH1";
In main(), Channel 1 is first cleared, a compare (match) value of 4 seconds is set, the channel is enabled:
AONRTCEventClear(AON_RTC_CH1);
AONRTCCompareValueSet(AON_RTC_CH1, 0x40000);
AONRTCChannelEnable(AON_RTC_CH1);
With the above, myHookCH1() will be called when the RTC reaches a count of 4 seconds. At that time, a new compare value can be written for the next interrupt that should occur for Channel 1.
有计划在项目的稍后阶段迁移到新的 TI-RTOS7、因此请向我提供一些信息 、RTC CH1和 CH2如何与新的 TI-RTOS7配合使用?
此致、
Dimitar Devedzhiev
