Skip to content

Commit c2778e7

Browse files
FRASTMcarlescufi
authored andcommitted
samples: boards: stm32F4 board with mco output selection
Add overlay file to enable the MCO1&2 output clock on the nucleo_f429zi. Signed-off-by: Francois Ramu <[email protected]>
1 parent f670551 commit c2778e7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* The clock that is output must be enabled. */
2+
&clk_hse {
3+
status = "okay";
4+
};
5+
6+
/* See reference manual (RM0090):
7+
* 0b010: HSE clock selected
8+
*/
9+
#define MCO_SEL_HSE 2
10+
11+
/* See reference manual (RM0090):
12+
* 0b100: MCO divided by 2
13+
*/
14+
#define MCO_PRE_DIV_2 4
15+
16+
&mco1 {
17+
status = "okay";
18+
clocks = <&rcc STM32_SRC_HSE MCO1_SEL(MCO_SEL_HSE)>;
19+
prescaler = <MCO1_PRE(MCO_PRE_DIV_2)>;
20+
pinctrl-0 = <&rcc_mco_1_pa8>;
21+
pinctrl-names = "default";
22+
};
23+
24+
25+
&mco2 {
26+
status = "okay";
27+
clocks = <&rcc STM32_SRC_HSE MCO2_SEL(MCO_SEL_HSE)>;
28+
prescaler = <MCO2_PRE(MCO_PRE_DIV_2)>;
29+
pinctrl-0 = <&rcc_mco_2_pc9>;
30+
pinctrl-names = "default";
31+
};

0 commit comments

Comments
 (0)