From 79bef6e2c8b2878e5dd609ad7fd798c6efaa92a3 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Fri, 21 Sep 2018 15:12:55 +0200 Subject: [PATCH] STM32 EMAC : lock deep sleep --- .../netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp b/features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp index 9d08524175..56e29950ee 100644 --- a/features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp +++ b/features/netsocket/emac-drivers/TARGET_STM_EMAC/stm32xx_emac.cpp @@ -2,6 +2,7 @@ #include "cmsis_os.h" +#include "mbed.h" #include "mbed_interface.h" #include "mbed_assert.h" #include "mbed_shared_queues.h" @@ -474,6 +475,8 @@ void mbed_default_mac_address(char *mac) bool STM32_EMAC::power_up() { + sleep_manager_lock_deep_sleep(); + /* Initialize the hardware */ if (!low_level_init_successful()) { return false; @@ -556,6 +559,7 @@ void STM32_EMAC::set_all_multicast(bool all) void STM32_EMAC::power_down() { /* No-op at this stage */ + sleep_manager_unlock_deep_sleep(); } void STM32_EMAC::set_memory_manager(EMACMemoryManager &mem_mngr)