From cf8d6c49a72ef0f4e94a222dea130aa1da9f9c03 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Sun, 10 Sep 2017 22:25:12 -0500 Subject: [PATCH] Fix errors on NCS36510 after deep sleep Add NOPs after deep sleep to prevent unexpected behavior. It appears that the first one or two instructions after deep sleep do not get executed properly. Note - This is a temporary workaround. For a more robust solution the NCS36510 needs to investigate the root cause of this issue. --- targets/TARGET_ONSEMI/TARGET_NCS36510/sleep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/TARGET_ONSEMI/TARGET_NCS36510/sleep.c b/targets/TARGET_ONSEMI/TARGET_NCS36510/sleep.c index a05f701260..31c9a5f720 100644 --- a/targets/TARGET_ONSEMI/TARGET_NCS36510/sleep.c +++ b/targets/TARGET_ONSEMI/TARGET_NCS36510/sleep.c @@ -64,6 +64,8 @@ void fncs36510_deepsleep(void) /** Enter into deep sleep mode */ __ISB(); __WFI(); + __NOP(); + __NOP(); /** Wait for the external 32MHz to be power-ed up & running * Re-power down the 32MHz internal osc @@ -115,4 +117,4 @@ void fncs36510_coma(void) fMacRestoreFrameStoreLUT(MAC_LUT_BackUp); */ } -#endif /* DEVICE_SLEEP */ \ No newline at end of file +#endif /* DEVICE_SLEEP */