Skip to content

Commit c167275

Browse files
author
Cruz Monrreal
authored
Merge pull request #7775 from jeromecoutant/PR_ASSERT
STM32 wrong MBED_ASSERT use
2 parents cd0126a + 063cad5 commit c167275

File tree

58 files changed

+174
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+174
-174
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
}

targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/device/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636

3737
#include "stm32f1xx.h"
38-
#include "mbed_assert.h"
38+
#include "mbed_error.h"
3939

4040
/*!< Uncomment the following line if you need to relocate your vector Table in
4141
Internal SRAM. */
@@ -145,8 +145,8 @@ void SetSysClock(void)
145145
if (SetSysClock_PLL_HSI() == 0)
146146
#endif
147147
{
148-
while(1) {
149-
MBED_ASSERT(1);
148+
{
149+
error("SetSysClock failed\n");
150150
}
151151
}
152152
}

targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/device/system_clock.c

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

3232
#include "stm32f2xx.h"
33-
#include "mbed_assert.h"
33+
#include "mbed_error.h"
3434

3535
/*!< Uncomment the following line if you need to relocate your vector Table in
3636
Internal SRAM. */
@@ -120,8 +120,8 @@ void SetSysClock(void)
120120
if (SetSysClock_PLL_HSI() == 0)
121121
#endif
122122
{
123-
while(1) {
124-
MBED_ASSERT(1);
123+
{
124+
error("SetSysClock failed\n");
125125
}
126126
}
127127
}

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/TARGET_NUCLEO_F302R8/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737

3838
#include "stm32f3xx.h"
39-
#include "mbed_assert.h"
39+
#include "mbed_error.h"
4040

4141
/*!< Uncomment the following line if you need to relocate your vector Table in
4242
Internal SRAM. */
@@ -130,8 +130,8 @@ void SetSysClock(void)
130130
if (SetSysClock_PLL_HSI() == 0)
131131
#endif
132132
{
133-
while (1) {
134-
MBED_ASSERT(1);
133+
{
134+
error("SetSysClock failed\n");
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)