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.

求助:使用 system timer(SysTick) 硬件定时器作为TI-RTOS 的 system clock

Other Parts Discussed in Thread: SYSBIOS

基于 MSP432P401Y 和 simplelink_msp432p4_sdk 的工程,TI-RTOS内核通常默认使用 TIMER_A 作为 system clock。

但是 TIMER_A 可以用于 PWM 输出的定时器,如果需要三路PWM输出时就会与RTOS内核发生冲突。此时需要将 TI-RTOS内核的 system clock 用其他硬件定时器实现。

Cortex-M4 内核提供了一个24位的 system timer(SysTick)用于 TI-RTOS 内核 system clock 其实更合适。

按文档说明:

在 *.cfg 文件中做如下配置:

var Clock = xdc.useModule('ti.sysbios.knl.Clock');

  // Tell the Clock module that YOU are providing the periodic interrupt
  Clock.tickSource = Clock.TickSource_USER;

然后自己启动的硬件定时器中断处理函数中调用 Clock_tick() 即可:

In your 'C' code, add your timer interrupt handler and have it call Clock_tick(), which will perform all of the Clock module tick duties:
  #include <ti/sysbios/knl/Clock.h>

  Void myTimerTick(UArg arg)
  {
       Clock_tick();
       ...
  }

但是,我按文档说明的方法增加之后,编译链接时会遇到链接问题:

unresolved symbol ti_sysbios_family_arm_msp432_ClockFreqs_setFrequency__E, first referenced in

D:/ti/simplelink_msp432p4_sdk_3_40_01_02/kernel/tirtos/packages/ti/dpl/lib/dpl_msp432p4x1xi.aem4f<PowerMSP432_tirtos.oem4f> C/C++ Problem


存在未实现的函数:ti_sysbios_family_arm_msp432_ClockFreqs_setFrequency__E

如果在程序中不调用驱动层 Power_init 函数,则这个链接问题就不会存在。

6320.G20_DEV.rar


不知道什么情况,请指教! 附件是本工程的源文件。