VOID taskSampleEntry1(VOID)
{
??? UINT32 lx;

??? UINT16 last=LOS_TickCountGet();
??? while(1)
??? {
??????? LOS_TaskDelay(1000);
??????? lx=LOS_TickCountGet();
??????? printf("taskSampleEntry1 running,task1 SP:%08x,tick:%u\r\n", __get_SP(),lx-last);
??????? last=lx;
??? }
}

打印輸出為

taskSampleEntry1 running,task1 SP:20001f54,tick:1970
taskSampleEntry1 running,task1 SP:20001f54,tick:1970
taskSampleEntry1 running,task1 SP:20001f54,tick:1981
taskSampleEntry1 running,task1 SP:20001f54,tick:1991


延時1000ms,實際時間差不多。問題是ticks基本加倍了,為什么呢?


另外,增加一個軟件定時器后,實際延時時間基本上只有0.5秒,移置適配有問題?