Skip to content

Commit 876032b

Browse files
authored
Merge pull request ARMmbed#14338 from jeromecoutant/PR_README_CLOCK
STM32: update readme with clock information
2 parents 53f87aa + 0c7b4d7 commit 876032b

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

targets/TARGET_STM/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,56 @@ Sometimes, pin is explicitly removed by default to avoid issues (but you can unc
326326
// {PB_4, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to same instance as STDIO
327327
```
328328

329+
### Clock selection
330+
331+
#### System clock
332+
333+
System Core Clock is based on an high-speed clock.
334+
335+
- the HSI is the high-speed internal (MCU) clock with low accuracy
336+
- the HSE is the high-speed external clock with higher accuray
337+
338+
For each target, a default choice has been made in the "clock_source" config settings in the targets.json file.
339+
340+
For main targets, it is something like:
341+
342+
```
343+
"clock_source": {
344+
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
345+
```
346+
347+
Meaning that:
348+
- PLL with the external HSE clock is first configured
349+
- if it fails, PLL with HSI is then configured
350+
351+
352+
#### Low power clock
353+
354+
Low power ticker and RTC are based on an low-speed clock.
355+
356+
- the LSI is the low-speed internal clock with low accuracy
357+
- the LSE is the low-speed external clock connected to 32.768 kHz quartz crystal
358+
359+
In targets.json file, it is supposed that a LSE is provided in the board
360+
361+
```
362+
"config": {
363+
"lse_available": {
364+
"value": "1"
365+
```
366+
367+
You can change this in you local mbed_app.json:
368+
```
369+
{
370+
"target_overrides":
371+
{
372+
"XXXX": {
373+
"target.lse_available": "0"
374+
}
375+
}
376+
}
377+
```
378+
329379

330380
### WiFi configuration
331381

0 commit comments

Comments
 (0)