Skip to content

Commit fee61d3

Browse files
committed
STM32 EMAC : thread size is configurable
1 parent c371193 commit fee61d3

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

features/netsocket/emac-drivers/TARGET_STM/TARGET_STM32F2/stm32xx_emac_config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919

2020
#define ETH_IP_VERSION_V1
2121

22-
#define THREAD_STACKSIZE 512
23-
2422
#endif // #define STM32XX_EMAC_CONFIG_H__

features/netsocket/emac-drivers/TARGET_STM/TARGET_STM32F4/stm32xx_emac_config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919

2020
#define ETH_IP_VERSION_V1
2121

22-
#define THREAD_STACKSIZE 512
23-
2422
#endif // #define STM32XX_EMAC_CONFIG_H__

features/netsocket/emac-drivers/TARGET_STM/TARGET_STM32F7/stm32xx_emac_config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919

2020
#define ETH_IP_VERSION_V1
2121

22-
#define THREAD_STACKSIZE 512
23-
2422
#endif // #define STM32XX_EMAC_CONFIG_H__

features/netsocket/emac-drivers/TARGET_STM/TARGET_STM32H7/stm32xx_emac_config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919

2020
#define ETH_IP_VERSION_V2
2121

22-
#define THREAD_STACKSIZE 512
23-
2422
#endif // #define STM32XX_EMAC_CONFIG_H__

features/netsocket/emac-drivers/TARGET_STM/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"config": {
44
"eth-rxbufnb": 4,
55
"eth-txbufnb": 4,
6+
"thread-stacksize": {
7+
"help": "Stack size for stm32_emac_thread",
8+
"value": 512
9+
},
610
"eth-phy-address": {
711
"help" : "Configures actual PHY address according to pullup/down status of PHYAD pin(s)",
812
"value" : 0

features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,13 +876,13 @@ bool STM32_EMAC::power_up()
876876
}
877877

878878
/* Worker thread */
879-
thread = create_new_thread("stm32_emac_thread", &STM32_EMAC::thread_function, this, THREAD_STACKSIZE, THREAD_PRIORITY, &thread_cb);
879+
thread = create_new_thread("stm32_emac_thread", &STM32_EMAC::thread_function, this, MBED_CONF_STM32_EMAC_THREAD_STACKSIZE, THREAD_PRIORITY, &thread_cb);
880880

881881
phy_task_handle = mbed::mbed_event_queue()->call_every(PHY_TASK_PERIOD_MS, mbed::callback(this, &STM32_EMAC::phy_task));
882882

883883
#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\
884884
|| defined (STM32F779xx)
885-
rmii_watchdog_thread = create_new_thread("stm32_rmii_watchdog", &STM32_EMAC::rmii_watchdog_thread_function, this, THREAD_STACKSIZE, THREAD_PRIORITY, &rmii_watchdog_thread_cb);
885+
rmii_watchdog_thread = create_new_thread("stm32_rmii_watchdog", &STM32_EMAC::rmii_watchdog_thread_function, this, 128, THREAD_PRIORITY, &rmii_watchdog_thread_cb);
886886
#endif
887887

888888
/* Allow the PHY task to detect the initial link state and set up the proper flags */

0 commit comments

Comments
 (0)