Skip to content

Commit ad2a6e5

Browse files
iabdalkaderdpgeorge
authored andcommitted
stm32/system_stm32: Fix CONFIG_RCC_CR_2ND value to use bitwise or.
1 parent 9cef2b0 commit ad2a6e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ports/stm32/system_stm32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void __fatal_error(const char *msg);
110110
#if defined(MCU_SERIES_F4) || defined(MCU_SERIES_F7)
111111

112112
#define CONFIG_RCC_CR_1ST (RCC_CR_HSION)
113-
#define CONFIG_RCC_CR_2ND (RCC_CR_HSEON || RCC_CR_CSSON || RCC_CR_PLLON)
113+
#define CONFIG_RCC_CR_2ND (RCC_CR_HSEON | RCC_CR_CSSON | RCC_CR_PLLON)
114114
#define CONFIG_RCC_PLLCFGR (0x24003010)
115115

116116
#if defined(MCU_SERIES_F4)
@@ -124,7 +124,7 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
124124
#elif defined(MCU_SERIES_L4)
125125

126126
#define CONFIG_RCC_CR_1ST (RCC_CR_MSION)
127-
#define CONFIG_RCC_CR_2ND (RCC_CR_HSEON || RCC_CR_CSSON || RCC_CR_HSION || RCC_CR_PLLON)
127+
#define CONFIG_RCC_CR_2ND (RCC_CR_HSEON | RCC_CR_CSSON | RCC_CR_HSION | RCC_CR_PLLON)
128128
#define CONFIG_RCC_PLLCFGR (0x00001000)
129129
/*
130130
* FIXME Do not know why I have to define these arrays here! they should be defined in the

0 commit comments

Comments
 (0)