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.

在MSP432P401R RTOS中,如何将clock source由Clock System改为 WDT_A (in interval timer mode) ?

1. 目标是在MSP432P401R RTOS中,实现空闲时低功耗,使电流小于3uA,故选择了LPM3。

2. 但是,在LMP3中,Clock System是失效的,也就意味着RTOS中的计时器clock都是无效的。

3. 考虑到WDT (in interval timer mode) 在LPM3中可用,能否令RTOS中的clock引用WDT_A?

  • 根据您的描述,您应该是想在LPM3下继续使用定时器且保持空闲时低功耗?您可以参考下面的文章

    processors.wiki.ti.com/.../TI-RTOS_MSP432_Timer

    The basic idea is to use the watchdog timer to drive the TI-RTOS' Clock tick. This is accomplished by the following steps.

    1 Tell TI-RTOS that the Clock tick will be driven by the application. This is accomplished in the TI-RTOS configuration file (.cfg).

    2 Create a Hwi for the watchdog timer. This can be done during runtime execution or via the TI-RTOS configuration file (.cfg). For this example, we'll create it in the configuration file.

    3 Enable the watchdog during runtime.

    4 Restrict the DEEPSLEEP_1 (aka LPM4) mode, otherwise the watchdog is deactivated when entering that mode. The power savings between DEEPSLEEP_0 and DEEPSLEEP_1 is small.

    5 Have the Hwi function call Clock_tick() to drive the Clock modules internal timing.
  • 谢谢您,这正是我想要的!

  • 很高兴能帮到您!
  • 经过实测,将Clock.tickSource设为Clock.TickSource_USER(WDT_A)后:
    当Clock.tickPeriod = 250.000ms,电流是 12uA;
    当Clock.tickPeriod = 15.625ms,电流是 41uA;
    当Clock.tickPeriod = 1.953ms,电流是256uA;
  • 谢谢您的反馈!能说下您测量的步骤吗?现在还是不符合您的要求?
  • 先不说电流的问题,目前令我比较难受的有两个问题:

    问题一,tickPeriod = 250ms,之前使用Timer时,tickPeriod = 1ms,差异太大。我程序里的所有Task_sleep()输入参数需要重新计算,且无法显示小于250ms的计时;

    问题二,在执行UART_read()时,Task进入blocked状态,整机会触发进入LPM3,而在LPM3中,EUSCI_A会失效;这样,UART_read()只能超时退出,且收不到任何串口数据;
  • 能不能搞个任务就用来进出低功耗,用RTC或者watchdog timer记时。clock不变。这样就能保证有一段时间MSP432能进LPM3。