Skip to content

Commit 8a5b9ff

Browse files
author
Cruz Monrreal
authored
Merge pull request #8400 from AdamZhang0124/realtek-rtl8195am-usticker-patch
This PR retrieves the TimerSync function to fix the lockup issue
2 parents f3fee04 + 2fa91f3 commit 8a5b9ff

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_MCU_RTL8195A/us_ticker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
9797

9898
HalTimerOp.HalTimerDis((u32)TimerAdapter.TimerId);
9999
HalTimerOpExt.HalTimerReLoad((u32)TimerAdapter.TimerId, TimerAdapter.TimerLoadValueUs);
100-
//HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
100+
HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
101101
HalTimerOp.HalTimerEn((u32)TimerAdapter.TimerId);
102102
}
103103

@@ -107,7 +107,7 @@ void us_ticker_fire_interrupt(void)
107107

108108
HalTimerOp.HalTimerDis((u32)TimerAdapter.TimerId);
109109
HalTimerOpExt.HalTimerReLoad((u32)TimerAdapter.TimerId, TimerAdapter.TimerLoadValueUs);
110-
//HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
110+
HalTimerOpExt.HalTimerSync(SYS_TIM_ID);
111111
HalTimerOp.HalTimerEn((u32)TimerAdapter.TimerId);
112112
}
113113

targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_timer.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
/*******************************************************************************
2-
*Copyright (c) 2013-2016 Realtek Semiconductor Corp, All Rights Reserved
3-
* SPDX-License-Identifier: LicenseRef-PBL
4-
*
5-
* Licensed under the Permissive Binary License, Version 1.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
*
8-
* You may obtain a copy of the License at https://www.mbed.com/licenses/PBL-1.0
9-
*
10-
* See the License for the specific language governing permissions and limitations under the License.
11-
*******************************************************************************
1+
/*
2+
* Routines to access hardware
3+
*
4+
* Copyright (c) 2013 Realtek Semiconductor Corp.
5+
*
6+
* This module is a confidential and proprietary property of RealTek and
7+
* possession or use of this module requires written permission of RealTek.
128
*/
139

1410
#ifndef _HAL_TIMER_H_
@@ -54,6 +50,7 @@ typedef struct _HAL_TIMER_OP_EXT_ {
5450
PHAL_TIMER_OP phal_timer_op_rom;
5551
VOID (*HalTimerIrqEn)(u32 TimerId);
5652
VOID (*HalTimerReLoad)(u32 TimerId, u32 LoadUs);
53+
VOID (*HalTimerSync)(u32 TimerId);
5754
}HAL_TIMER_OP_EXT, *PHAL_TIMER_OP_EXT;
5855

5956
#ifdef CONFIG_TIMER_MODULE
@@ -105,5 +102,6 @@ void
105102
HalTimerDeInit(
106103
void *Data
107104
);
105+
108106
#endif // #ifdef CONFIG_RELEASE_BUILD_LIBRARIES
109107
#endif

targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/rtl8195a/rtl8195a_timer.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ HalTimerReLoadRtl8195a_Patch(
8989
IN u32 LoadUs
9090
);
9191

92+
VOID
93+
HalTimerSyncRtl8195a(
94+
IN u32 TimerId
95+
);
96+
9297
u32
9398
HalTimerReadCountRtl8195a_Patch(
9499
IN u32 TimerId
@@ -119,6 +124,11 @@ HalTimerDisRtl8195a_Patch(
119124
IN u32 TimerId
120125
);
121126

127+
VOID
128+
HalTimerSyncRtl8195a(
129+
IN u32 TimerId
130+
);
131+
122132
VOID
123133
HalTimerDeInitRtl8195a_Patch(
124134
IN VOID *Data

0 commit comments

Comments
 (0)