boards: arm: nucleo_f030r8: Add support for MB1136 C-01 board revision

Nucleo F030R8 has some board revision.
Add revision configuration to support C-01 board version.

This commit add revision '1' and '2'.

Defaultly uses revision '2' that is for C-02 (or later).
This is uses existing configuration.
Set board name in west command option as 'nucleo_f030r8@1'
to use C-01 board.

C-01 has no supply clock to HSE, Must use HSI for SYSCLK.

nucleo_f030r8 clock configuration is

    8MHz (HSE freq) / 1 (PLL prediv) * 6 (PLL mul) = 48MHz (SYSCLK)

In case of using HSI (added as nucleo_f030r8_ver_c01),

    8MHz (HSI freq) / 2 (PLL prediv) * 12 (PLL mul) = 48MHz (SYSCLK)

PLL prediv is must take 2 if using HSI.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
TOKITA Hiroshi 2022-03-20 00:22:14 -07:00 committed by Carles Cufí
commit 602dec25ca
5 changed files with 63 additions and 0 deletions

View file

@ -139,6 +139,8 @@ Applications for the ``nucleo_f030r8`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details). :ref:`application_run` for more details).
.. _nucleo-f030r8-flashing:
Flashing Flashing
======== ========
@ -157,6 +159,13 @@ Here is an example for the :ref:`blinky-sample` application.
You will see the LED blinking every second. You will see the LED blinking every second.
If using the C-01 board, select revision '1' that supports the board.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: nucleo_f030r8@1
:goals: build flash
Debugging Debugging
========= =========
@ -169,6 +178,28 @@ You can debug an application in the usual way. Here is an example for the
:maybe-skip-config: :maybe-skip-config:
:goals: debug :goals: debug
Again you have to use the adapted command for C-01.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: nucleo_f030r8@1
:maybe-skip-config:
:goals: debug
Board Revisions
***************
Nucleo F030R8 has some version of board variants.
`STM32 Nucleo-64 board User Manual`_ mentions to Nucleo board variants.
| *The board version MB1136 C-01 or MB1136 C-02 is mentioned on the sticker, placed on the bottom side of the PCB.*
| *The board marking MB1136 C-01 corresponds to a board, configured as HSE not used.*
| *The board marking MB1136 C-02 (or higher) corresponds to a board, configured to use ST-LINK MCO as the clock input.*
Using revision **2** adapted for C-02(or higher) as default when not explicitly selecting revisions.
If using the C-01 board, select revision **1**.
Please see :ref:`Flashing <nucleo-f030r8-flashing>` section.
References References
********** **********

View file

@ -0,0 +1,2 @@
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
&clk_hse {
status = "disabled";
};
&clk_hsi {
status = "okay";
};
&pll {
prediv = <2>;
mul = <12>;
clocks = <&clk_hsi>;
status = "okay";
};

View file

@ -0,0 +1,2 @@
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0

View file

@ -0,0 +1,8 @@
#
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
#
# SPDX-License-Identifier: Apache-2.0
#
board_check_revision(FORMAT NUMBER
DEFAULT_REVISION 2)