Skip to content

Commit 587c895

Browse files
committed
Add draft of doc for the ll clock configurtion using mbed configuration system.
1 parent b171a9c commit 587c895

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
## LF Clock configuration using mbed configuration system
3+
4+
In order to provide the configuration for a low frequency (LF) clock, add a description of the LF clock inside a *.json file, for example in mbed_json.json.
5+
LF clock source configuration is used for MCU startup initialization and the BLE SoftDevice LF clock configuration (if BLE libraries is used). Advanced configurations are used only for the BLE SoftDevice LF clock configuration.
6+
7+
8+
### Usage:
9+
10+
1. Clock source
11+
12+
Default clock source is XTAL oscillator. It is defined at the target level configuration.
13+
There are three options that can be configured as the clock source:
14+
- NRF_LF_SRC_XTAL
15+
- NRF_LF_SRC_RC
16+
- NRF_LF_SRC_SYNTH
17+
18+
In order to override this configuration use targed_override section in configuration file (e.g mbed_app.json)
19+
20+
```json
21+
{
22+
"target_overrides": {
23+
"*": {
24+
"target.lf_clock_src": "NRF_LF_SRC_XTAL"
25+
}
26+
}
27+
}
28+
```
29+
30+
2a. Advanced configuration of the LFCLK RC oscillator:
31+
32+
```json
33+
{
34+
"config": {
35+
"lf_clock_rc_calib_timer_interval" {
36+
"value": 16,
37+
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_CALIB_TIMER_INTERVAL"
38+
},
39+
"lf_clock_rc_calib_mode_config" {
40+
"value": 1,
41+
"macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_CALIB_MODE_CONFIG"
42+
}
43+
}
44+
}
45+
46+
```
47+
48+
"lf_clock_rc_calib_timer_interval" - Calibration timer interval in 250 ms. It is equivalent to nrf_clock_lf_cfg_t::rc_ctiv.
49+
This item generate macro MBED_CONF_NORDIC_NRF_LF_CLOCK_CALIB_TIMER_INTERVAL.
50+
By default such configuration is sett to 16.
51+
52+
"lf_clock_rc_calib_mode_config" - This value configures how often the RC oscillator will be calibrated, in number of calibration intervals.
53+
It is equivalent to nrf_clock_lf_cfg_t::rc_temp_ctiv.
54+
For further information, see the documentation for the [API of a SoftDevice 13x version 2.0.0](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v2.0.0/structnrf__clock__lf__cfg__t.html)
55+
This item generate macro MBED_CONF_NORDIC_NRF_LF_CLOCK_CALIB_MODE_CONFIG.
56+
By default such configuration is sett to 1.
57+
58+
2b. Advnced configuration of the LFCLK XTAL oscillator:
59+
60+
Accuracy of the clock source can be set. In order to do so macro MBED_CONF_NORDIC_LF_CLOCK_XTAL_ACCURACY should been provided (e.g. in mbed_app.json).
61+
By default such configuration is sett to NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM.
62+
For further information, see the documentation for the [API of a SoftDevice 13x version 2.0.0](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v2.0.0%2Fgroup___n_r_f___s_d_m___d_e_f_i_n_e_s.html)
63+
64+
```json
65+
{
66+
"config": {
67+
"lf_clock_xtal_accuracy": {
68+
"value": "NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM",
69+
"macro_name": "MBED_CONF_NORDIC_LF_CLOCK_XTAL_ACCURACY"
70+
}
71+
}
72+
}
73+
74+
```
75+
76+
77+
78+
2c. Advance configuration of the LFCLK Synthesized from HFCLK:
79+
80+
Accuracy of the clock source can be set. In order to do so macro MBED_CONF_NORDIC_LF_CLOCK_SYNTH_ACCURACY should been provided (e.g. in mbed_app.json).
81+
By default such configuration is sett to NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM.
82+
For further information, see the documentation for the [API of a SoftDevice 13x version 2.0.0](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v2.0.0%2Fgroup___n_r_f___s_d_m___d_e_f_i_n_e_s.html)
83+
84+
```json
85+
{
86+
"config": {
87+
"lf_clock_synth_accuracy": {
88+
"value": "NRF_CLOCK_LF_SYNTH_ACCURACY_250_PPM",
89+
"macro_name": "MBED_CONF_NORDIC_LF_CLOCK_XTAL_ACCURACY"
90+
}
91+
}
92+
}
93+
94+
```
95+
96+

0 commit comments

Comments
 (0)