Skip to content

Commit

Permalink
Revert "fix(BLE): PalTimer Calibration (#951)"
Browse files Browse the repository at this point in the history
This reverts commit 65259f2.
  • Loading branch information
EricB-ADI committed Aug 21, 2024
1 parent 70dd8ab commit 6253857
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void PalTimerDeInit(void)
/*************************************************************************************************/
/*!
* \brief Return scheduler timer state.
*/
/*************************************************************************************************/
void PalTimerExecCallback(void)
Expand Down Expand Up @@ -359,9 +359,6 @@ void PalTimerStart(uint32_t expUsec)

/* Convert the time based on our calibration */
expUsec += (expUsec / PAL_TMR_CALIB_TIME_US) * palTimerCb.usecDiff;
expUsec += ((((int32_t)expUsec % PAL_TMR_CALIB_TIME_US) * palTimerCb.usecDiff) /
PAL_TMR_CALIB_TIME_US);

#if defined(USE_SHARED_WUT)
PalSysSetBusy();
uint64_t volatile compareValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void PalTimerDeInit(void)
/*************************************************************************************************/
/*!
* \brief Return scheduler timer state.
*/
/*************************************************************************************************/
void PalTimerExecCallback(void)
Expand Down Expand Up @@ -309,8 +309,6 @@ void PalTimerStart(uint32_t expUsec)

/* Convert the time based on our calibration */
expUsec += (expUsec / PAL_TMR_CALIB_TIME) * palTimerCb.usecDiff;
expUsec +=
((((int32_t)expUsec % PAL_TMR_CALIB_TIME) * palTimerCb.usecDiff) / PAL_TMR_CALIB_TIME);

/* Convert the start time to ticks */
MXC_TMR_SetCount(PAL_TMR, 0);
Expand Down

0 comments on commit 6253857

Please sign in to comment.