From 79c47bf09fb3f52d780e7a79ec0410765a46ce76 Mon Sep 17 00:00:00 2001 From: George Beckstein Date: Fri, 15 Mar 2019 21:23:18 -0400 Subject: [PATCH] Added in code to fix deepsleep underflow. Nullify event handler member variable. --- .../targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp b/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp index 1a459d0f08..d522bec913 100644 --- a/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp +++ b/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp @@ -137,6 +137,8 @@ void USBPhyHw::deinit() sleep_manager_unlock_deep_sleep(); } + this->events = NULL; + // Clear the instance pointer instance = 0; }