Skip to content

Commit 7635603

Browse files
committed
STM32F0 assert in SetSysClock replaced
1 parent 2a824a1 commit 7635603

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO - not connected by default)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO - not connected by default)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "stm32f0xx.h"
32-
#include "mbed_assert.h"
32+
#include "mbed_error.h"
3333

3434
#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO)
3535
#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default)
@@ -138,8 +138,8 @@ void SetSysClock(void)
138138
if (SetSysClock_PLL_HSI() == 0)
139139
#endif
140140
{
141-
while(1) {
142-
MBED_ASSERT(1);
141+
{
142+
error("SetSysClock failed\n");
143143
}
144144
}
145145
}

0 commit comments

Comments
 (0)