diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/system_clock.c index 72fa4b7e7d..a402b09e6f 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/system_clock.c index fe5ebfe73b..f097f610a3 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/system_clock.c index 6b57adbc6e..2f6a4adfd6 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO - not connected by default) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/system_clock.c index 26a57fb07e..0b23593191 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO - not connected by default) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/system_clock.c index 0cc1885a6f..9790182e88 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/system_clock.c index f33cb6931e..ad7c7c2794 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/system_clock.c b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/system_clock.c index 8034b2e194..10a70fe860 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/system_clock.c +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/system_clock.c @@ -29,7 +29,7 @@ */ #include "stm32f0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" #define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) #define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) @@ -138,8 +138,8 @@ void SetSysClock(void) if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } }