fix: 在内核初始化前期启动tick timer
解决系统未初始化完成前无timer可用的问题。 Close #I410F0 Signed-off-by: zhushengle <zhushengle@huawei.com> Change-Id: I3799b9b0ff03cb1dfe80a97816a484df28ae49fd
This commit is contained in:
@@ -46,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -116,14 +122,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();
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
value &= ~(OS_TIMER_32K_CLK_BIT);
|
||||
WRITE_UINT32(value, OS_TIMER_CLK_PWD_ADDR);
|
||||
|
||||
value = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
value = LOSCFG_BASE_CORE_TICK_RESPONSE_MAX;
|
||||
WRITE_UINT32(value, OS_TIMER_PERIOD_REG_ADDR);
|
||||
|
||||
READ_UINT32(value, OS_TIMER_CTL_REG_ADDR);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -46,9 +47,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -147,13 +154,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 */
|
||||
|
||||
@@ -66,7 +66,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -146,13 +153,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -150,13 +157,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 */
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,16 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -146,13 +154,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -146,13 +153,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -150,13 +157,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_timer.h"
|
||||
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -47,9 +47,16 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -148,13 +155,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 */
|
||||
|
||||
@@ -66,7 +66,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -47,9 +48,16 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -148,13 +156,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 */
|
||||
|
||||
@@ -66,7 +66,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -146,13 +153,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "los_sched.h"
|
||||
#include "los_interrupt.h"
|
||||
#include "los_arch_timer.h"
|
||||
#include "los_debug.h"
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalArchInit
|
||||
@@ -45,9 +46,15 @@
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit()
|
||||
LITE_OS_SEC_TEXT_INIT VOID HalArchInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
HalHwiInit();
|
||||
|
||||
ret = HalTickStart(OsTickHandler);
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("Tick start failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
@@ -146,13 +153,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 */
|
||||
|
||||
@@ -65,7 +65,7 @@ WEAK UINT32 HalTickStart(OS_TICK_HANDLER *handler)
|
||||
g_sysClock = OS_SYS_CLOCK;
|
||||
g_cyclesPerTick = OS_SYS_CLOCK / LOSCFG_BASE_CORE_TICK_PER_SECOND;
|
||||
|
||||
ret = SysTick_Config(g_cyclesPerTick);
|
||||
ret = SysTick_Config(LOSCFG_BASE_CORE_TICK_RESPONSE_MAX);
|
||||
if (ret == 1) {
|
||||
return LOS_ERRNO_TICK_PER_SEC_TOO_SMALL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user