!225 fix: 在内核初始化前期启动tick timer
Merge pull request !225 from zhushengle/tick
This commit is contained in:
@@ -36,14 +36,21 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_memory.h"
|
||||
#include "los_timer.h"
|
||||
#include "los_debug.h"
|
||||
#include "soc.h"
|
||||
|
||||
|
||||
STATIC UINT32 g_sysNeedSched = FALSE;
|
||||
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
VOID HalIrqEndCheckNeedSched(VOID)
|
||||
@@ -129,14 +136,9 @@ LITE_OS_SEC_TEXT_INIT VOID *HalTskStackInit(UINT32 taskID, UINT32 stackSize, VOI
|
||||
return (VOID *)context;
|
||||
}
|
||||
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 HalStartSchedule(OS_TICK_HANDLER handler)
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 HalStartSchedule(VOID)
|
||||
{
|
||||
(VOID)LOS_IntLock();
|
||||
UINT32 ret = HalTickStart(handler);
|
||||
if (ret != LOS_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
OsSchedStart();
|
||||
HalStartToRun();
|
||||
return LOS_OK; /* never return */
|
||||
|
||||
@@ -45,7 +45,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER handler)
|
||||
g_cyclesPerTick = g_sysClock / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
g_intCount = 0;
|
||||
|
||||
HalClockInit(handler, g_cyclesPerTick);
|
||||
HalClockInit(handler, LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
|
||||
return LOS_OK; /* never return */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user