Skip to content

This PR retrieves the TimerSync function to fix the lockup issue #8400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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_
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -105,5 +102,6 @@ void
HalTimerDeInit(
void *Data
);

#endif // #ifdef CONFIG_RELEASE_BUILD_LIBRARIES
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ HalTimerReLoadRtl8195a_Patch(
IN u32 LoadUs
);

VOID
HalTimerSyncRtl8195a(
IN u32 TimerId
);

u32
HalTimerReadCountRtl8195a_Patch(
IN u32 TimerId
Expand Down Expand Up @@ -119,6 +124,11 @@ HalTimerDisRtl8195a_Patch(
IN u32 TimerId
);

VOID
HalTimerSyncRtl8195a(
IN u32 TimerId
);

VOID
HalTimerDeInitRtl8195a_Patch(
IN VOID *Data
Expand Down