Skip to content

Commit 20c6173

Browse files
committed
Ensure CCM RAM clock is enabled
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 9ee139f commit 20c6173

File tree

10 files changed

+38
-0
lines changed

10 files changed

+38
-0
lines changed

Diff for: variants/BLACK_F407XX/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ WEAK void SystemClock_Config(void)
222222
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
223223
_Error_Handler(__FILE__, __LINE__);
224224
}
225+
226+
/* Ensure CCM RAM clock is enabled */
227+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
228+
225229
}
226230

227231
#ifdef __cplusplus

Diff for: variants/BLUE_F407VE_Mini/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ WEAK void SystemClock_Config(void)
205205
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
206206
_Error_Handler(__FILE__, __LINE__);
207207
}
208+
209+
/* Ensure CCM RAM clock is enabled */
210+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
211+
208212
}
209213

210214
#ifdef __cplusplus

Diff for: variants/DISCO_F407VG/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ WEAK void SystemClock_Config(void)
190190
/* Enable the Flash prefetch */
191191
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
192192
}
193+
194+
/* Ensure CCM RAM clock is enabled */
195+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
196+
193197
}
194198

195199
#ifdef __cplusplus

Diff for: variants/DIYMORE_F407VGT/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ WEAK void SystemClock_Config(void)
206206
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
207207
_Error_Handler(__FILE__, __LINE__);
208208
}
209+
210+
/* Ensure CCM RAM clock is enabled */
211+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
212+
209213
}
210214

211215
#ifdef __cplusplus

Diff for: variants/FEATHER_F405/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ WEAK void SystemClock_Config(void)
132132
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
133133
_Error_Handler(__FILE__, __LINE__);
134134
}
135+
136+
/* Ensure CCM RAM clock is enabled */
137+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
138+
135139
}
136140

137141
#ifdef __cplusplus

Diff for: variants/FK407M1/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ WEAK void SystemClock_Config(void)
153153
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
154154
_Error_Handler(__FILE__, __LINE__);
155155
}
156+
157+
/* Ensure CCM RAM clock is enabled */
158+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
159+
156160
}
157161

158162
#ifdef __cplusplus

Diff for: variants/Generic_F4x5RG/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ WEAK void SystemClock_Config(void)
230230
}
231231
}
232232
}
233+
234+
/* Ensure CCM RAM clock is enabled */
235+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
236+
233237
/* Output clock on MCO2 pin(PC9) for debugging purpose */
234238
//HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4);
235239
}

Diff for: variants/Generic_F4x7Vx/variant.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ WEAK void SystemClock_Config(void)
262262
}
263263
}
264264
}
265+
266+
/* Ensure CCM RAM clock is enabled */
267+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
268+
265269
/* Output clock on MCO2 pin(PC9) for debugging purpose */
266270
//HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4);
267271
}

Diff for: variants/NUCLEO_F429ZI/variant.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ WEAK void SystemClock_Config(void)
203203
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
204204
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
205205
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);
206+
207+
/* Ensure CCM RAM clock is enabled */
208+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
206209
}
207210

208211
#ifdef __cplusplus

Diff for: variants/PRNTR_Vx/variant.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ WEAK void SystemClock_Config(void)
191191
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
192192
_Error_Handler(__FILE__, __LINE__);
193193
}
194+
195+
/* Ensure CCM RAM clock is enabled */
196+
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
194197
}
195198

196199
#ifdef __cplusplus

0 commit comments

Comments
 (0)