This PR retrieves the TimerSync function to fix the lockup issue

1.	Update library
2.	Add ‘hal_timer.h’, ‘rtl8195a_timer.h’
3.	Revert ‘HalTimerOpExt.HalTimerSync(SYS_TIM_ID)’ function in ‘us_ticker.c’
pull/8400/head
Lu 2018-10-12 20:39:06 +08:00
parent 8dcc949c63
commit 2fa91f3b2b
6 changed files with 21 additions and 13 deletions

View File

@ -97,7 +97,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
HalTimerOp.HalTimerDis((u32)TimerAdapter.TimerId);
HalTimerOpExt.HalTimerReLoad((u32)TimerAdapter.TimerId, TimerAdapter.TimerLoadValueUs);
//HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
HalTimerOp.HalTimerEn((u32)TimerAdapter.TimerId);
}
@ -107,7 +107,7 @@ void us_ticker_fire_interrupt(void)
HalTimerOp.HalTimerDis((u32)TimerAdapter.TimerId);
HalTimerOpExt.HalTimerReLoad((u32)TimerAdapter.TimerId, TimerAdapter.TimerLoadValueUs);
//HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
HalTimerOp.HalTimerEn((u32)TimerAdapter.TimerId);
}

View File

@ -1,14 +1,10 @@
/*******************************************************************************
*Copyright (c) 2013-2016 Realtek Semiconductor Corp, All Rights Reserved
* SPDX-License-Identifier: LicenseRef-PBL
*
* Licensed under the Permissive Binary License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at https://www.mbed.com/licenses/PBL-1.0
*
* See the License for the specific language governing permissions and limitations under the License.
*******************************************************************************
/*
* Routines to access hardware
*
* Copyright (c) 2013 Realtek Semiconductor Corp.
*
* This module is a confidential and proprietary property of RealTek and
* possession or use of this module requires written permission of RealTek.
*/
#ifndef _HAL_TIMER_H_
@ -54,6 +50,7 @@ typedef struct _HAL_TIMER_OP_EXT_ {
PHAL_TIMER_OP phal_timer_op_rom;
VOID (*HalTimerIrqEn)(u32 TimerId);
VOID (*HalTimerReLoad)(u32 TimerId, u32 LoadUs);
VOID (*HalTimerSync)(u32 TimerId);
}HAL_TIMER_OP_EXT, *PHAL_TIMER_OP_EXT;
#ifdef CONFIG_TIMER_MODULE
@ -105,5 +102,6 @@ void
HalTimerDeInit(
void *Data
);
#endif // #ifdef CONFIG_RELEASE_BUILD_LIBRARIES
#endif

View File

@ -89,6 +89,11 @@ HalTimerReLoadRtl8195a_Patch(
IN u32 LoadUs
);
VOID
HalTimerSyncRtl8195a(
IN u32 TimerId
);
u32
HalTimerReadCountRtl8195a_Patch(
IN u32 TimerId
@ -119,6 +124,11 @@ HalTimerDisRtl8195a_Patch(
IN u32 TimerId
);
VOID
HalTimerSyncRtl8195a(
IN u32 TimerId
);
VOID
HalTimerDeInitRtl8195a_Patch(
IN VOID *Data