diff --git a/boards/arm/nucleo_f030r8/doc/index.rst b/boards/arm/nucleo_f030r8/doc/index.rst index ddc9a93fcc1..837f41aa357 100644 --- a/boards/arm/nucleo_f030r8/doc/index.rst +++ b/boards/arm/nucleo_f030r8/doc/index.rst @@ -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 :ref:`application_run` for more details). +.. _nucleo-f030r8-flashing: + Flashing ======== @@ -157,6 +159,13 @@ Here is an example for the :ref:`blinky-sample` application. 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 ========= @@ -169,6 +178,28 @@ You can debug an application in the usual way. Here is an example for the :maybe-skip-config: :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 ` section. + References ********** diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8_1.conf b/boards/arm/nucleo_f030r8/nucleo_f030r8_1.conf new file mode 100644 index 00000000000..39cc277d78d --- /dev/null +++ b/boards/arm/nucleo_f030r8/nucleo_f030r8_1.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2022 TOKITA Hiroshi +# SPDX-License-Identifier: Apache-2.0 diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8_1.overlay b/boards/arm/nucleo_f030r8/nucleo_f030r8_1.overlay new file mode 100644 index 00000000000..5f0de9c30ec --- /dev/null +++ b/boards/arm/nucleo_f030r8/nucleo_f030r8_1.overlay @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 TOKITA Hiroshi + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&clk_hse { + status = "disabled"; +}; + +&clk_hsi { + status = "okay"; +}; + +&pll { + prediv = <2>; + mul = <12>; + clocks = <&clk_hsi>; + status = "okay"; +}; diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8_2.conf b/boards/arm/nucleo_f030r8/nucleo_f030r8_2.conf new file mode 100644 index 00000000000..39cc277d78d --- /dev/null +++ b/boards/arm/nucleo_f030r8/nucleo_f030r8_2.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2022 TOKITA Hiroshi +# SPDX-License-Identifier: Apache-2.0 diff --git a/boards/arm/nucleo_f030r8/revision.cmake b/boards/arm/nucleo_f030r8/revision.cmake new file mode 100644 index 00000000000..7e5ddf37782 --- /dev/null +++ b/boards/arm/nucleo_f030r8/revision.cmake @@ -0,0 +1,8 @@ +# +# Copyright (c) 2022 TOKITA Hiroshi +# +# SPDX-License-Identifier: Apache-2.0 +# + +board_check_revision(FORMAT NUMBER + DEFAULT_REVISION 2)