diff --git a/TESTS/mbed_platform/stats_cpu/main.cpp b/TESTS/mbed_platform/stats_cpu/main.cpp
index 348da30821..1a3818293d 100644
--- a/TESTS/mbed_platform/stats_cpu/main.cpp
+++ b/TESTS/mbed_platform/stats_cpu/main.cpp
@@ -29,7 +29,13 @@ using namespace utest::v1;
 
 DigitalOut led1(LED1);
 
+// Targets with these cores have their RAM enough size to create threads with bigger stacks
+#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(__CORTEX_M7)
+#define MAX_THREAD_STACK        512
+#else
 #define MAX_THREAD_STACK        384
+#endif
+
 #define SAMPLE_TIME             1000    // msec
 #define LOOP_TIME               2000    // msec
 
diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp
index 470a9f081f..c66e9fb030 100644
--- a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp
+++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp
@@ -26,18 +26,14 @@
 #else
 
 #define THREAD_STACK_SIZE 512
-#if defined(__CORTEX_A9)
+#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) ||  defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
 #define PARALLEL_THREAD_STACK_SIZE 512
-#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
-#define PARALLEL_THREAD_STACK_SIZE 512
-#elif defined(TARGET_ARM_FM)
-#define PARALLEL_THREAD_STACK_SIZE 512
-#elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
-#define PARALLEL_THREAD_STACK_SIZE   512
+#define CHILD_THREAD_STACK_SIZE 512
 #else
 #define PARALLEL_THREAD_STACK_SIZE 384
-#endif
 #define CHILD_THREAD_STACK_SIZE 384
+#endif
+
 
 using namespace utest::v1;