Skip to content

Commit 5737574

Browse files
committed
Updated Add a new variant (board) (markdown)
1 parent 0f1f082 commit 5737574

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

_dev/Add-a-new-variant-(board).md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ WEAK void SystemClock_Config(void)
135135
136136
[[/img/Important-icon.png|alt="Important"]] For generic board the internal clock is used: `HSI`.
137137
138-
[STM32CubeMX]`is also used to generate it.
138+
[STM32CubeMX] is also used to generate it.
139139
140140
1. Go to **_Pinout_** tab, enable the desired peripherals which require specific clock configuration (not needed for peripherals clocked by `HCLKx`, or `APBx` clock): `SDIO`, `USB`, ...
141141
In this example only `USB` needs to be enabled as other peripherals default clock are correct by default.
@@ -214,6 +214,16 @@ In this example only `USB` needs to be enabled as other peripherals default cloc
214214
```
215215
</details>
216216

217+
[[/img/Tips-icon.png|alt="Tips"]] Pay attention to the default value of HAL RCC structures. CubeMx set it to `0` but it produces warning.
218+
Simply remove the `0` like this:
219+
220+
```patch
221+
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
222+
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
223+
+ RCC_OscInitTypeDef RCC_OscInitStruct = {};
224+
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
225+
```
226+
217227
## 4 - Declare the variant
218228
It is still to add the menu and add relevant information (Flash and SRAM sizes, ...)
219229

0 commit comments

Comments
 (0)