From 3a02671028c0c8440a6a85c8c0181f12999ccb42 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Tue, 3 Mar 2020 14:32:09 +0100 Subject: [PATCH] STM32 EMAC : increase thread size when mbed-trace is enabled --- features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp b/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp index e44b7b546d..6cfa6a9747 100644 --- a/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp +++ b/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp @@ -889,7 +889,12 @@ bool STM32_EMAC::power_up() } /* Worker thread */ +#if MBED_CONF_MBED_TRACE_ENABLE + thread = create_new_thread("stm32_emac_thread", &STM32_EMAC::thread_function, this, MBED_CONF_STM32_EMAC_THREAD_STACKSIZE*2, THREAD_PRIORITY, &thread_cb); +#else thread = create_new_thread("stm32_emac_thread", &STM32_EMAC::thread_function, this, MBED_CONF_STM32_EMAC_THREAD_STACKSIZE, THREAD_PRIORITY, &thread_cb); +#endif + phy_task_handle = mbed::mbed_event_queue()->call_every(PHY_TASK_PERIOD_MS, mbed::callback(this, &STM32_EMAC::phy_task));