This is an automated email from the ASF dual-hosted git repository. vipulrahane pushed a commit to branch vipul/juul-master-steam-10-18-2023 in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit e54e6ea5ffb40427bb8bcd366488d86f8c6ddc5b Author: Ben McCrea <[email protected]> AuthorDate: Tue Jun 20 12:49:05 2023 -0700 Workaround: Add 500us delay to CMAC wakeup calculation This is intended as a stability assurance workaround due to occasional crashes in the CMAC due to a TIMER1 interrupt occurring while cmac_timer_slp_disable() is still in progress. This changes causes the CMAC to always wake up from deep sleep an extra 500us earlier, to reduce the likelihood of a TIMER1 interrupt happening too early. --- hw/mcu/dialog/cmac/src/cmac_sleep.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/mcu/dialog/cmac/src/cmac_sleep.c b/hw/mcu/dialog/cmac/src/cmac_sleep.c index cc78f7047..fa00cba02 100644 --- a/hw/mcu/dialog/cmac/src/cmac_sleep.c +++ b/hw/mcu/dialog/cmac/src/cmac_sleep.c @@ -196,8 +196,13 @@ cmac_sleep_calculate_wakeup_time(void) * worst case. Finally, LLP compensation takes around 50us. */ T_LPTICK_U(2) + T_LPTICK_U(2) + - max(T_LPTICK_U(3), T_USEC(g_cmac_shm_ctrl.xtal32m_settle_us)) + - T_LPTICK(2) + T_USEC(50); + max(T_LPTICK_U(3), T_USEC(g_cmac_shared_data.xtal32m_settle_us)) + + T_LPTICK(2) + T_USEC(50) + + /* + * Add an extra 500us of settle time due to occasional crashes due to + * unknown additional wakeup delay. + */ + T_USEC(500); } void
