boards/st/nucleo_g431rb/doc/index.rst
.. zephyr:board:: nucleo_g431rb
Overview
The Nucleo G431RB board features an ARM Cortex-M4 based STM32G431RB MCU with a wide range of connectivity support and configurations. Here are some highlights of the Nucleo G431RB board:
STM32 microcontroller in LQFP64 package
Arduino Uno V3 connectivity
On-board ST-LINK/V3E debugger/programmer with SWD connector
Flexible board power supply:
Three LEDs: USB communication (LD1), power LED (LD3), user LED (LD2)
Two push-buttons: RESET and USER
More information about the board can be found at the Nucleo G431RB website_.
Hardware
The STM32G431RB SoC provides the following hardware IPs:
Ultra-low-power with FlexPowerControl (down to 28 nA Standby mode and 84 µA/MHz run mode)
Core: ARM® 32-bit Cortex®-M4 CPU with FPU, frequency up to 170 MHz
Clock Sources:
RTC with HW calendar, alarms and calibration
14x timers:
Up to 86 fast I/Os, most 5 V-tolerant
Memories
Rich analog peripherals (independent supply)
16x communication interfaces
12-channel DMA controller
True random number generator (RNG)
CRC calculation unit, 96-bit unique ID
Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell*
More information about STM32G431RB can be found here:
STM32G431RB on www.st.com_STM32G4 reference manual_.. zephyr:board-supported-hw::
Nucleo G431RB Board has 6 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
For more details please refer to STM32G4 Nucleo-64 board User Manual_.
.. rst-class:: rst-columns
Nucleo G431RB System Clock could be driven by internal or external oscillator, as well as main PLL clock. By default System clock is driven by PLL clock at 150MHz, driven by 16MHz high speed internal oscillator. The clock can be boosted to 170MHz if boost mode is selected.
Nucleo G431RB board has 3 U(S)ARTs and one LPUART. The Zephyr console output is assigned to LPUART1. Default settings are 115200 8N1.
Please note that LPUART1 baudrate is limited to 9600 if the MCU is clocked by LSE (32.768 kHz) in low power mode.
Programming and Debugging
.. zephyr:board-supported-runners::
Nucleo G431RB board includes an ST-LINK/V3E embedded debug tool interface.
Applications for the nucleo_g431rb board configuration can be built and
flashed in the usual way (see :ref:build_an_application and
:ref:application_run for more details).
The board is configured to be flashed using west STM32CubeProgrammer_ runner,
so its :ref:installation <stm32cubeprog-flash-host-tools> is required.
Alternatively, OpenOCD or pyOCD can also be used to flash the board using
the --runner (or -r) option:
.. code-block:: console
$ west flash --runner openocd $ west flash --runner pyocd
pyOCD can be used after adding "pack" support with the following commands:
.. code-block:: console
$ pyocd pack --update $ pyocd pack --install stm32g431rb
Connect the Nucleo G431RB to your host computer using the USB port, then run a serial host program to connect with your Nucleo board.
.. code-block:: console
$ minicom -D /dev/ttyACM0
Now build and flash an application. Here is an example for
:zephyr:code-sample:hello_world.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_g431rb :goals: build flash
You should see the following message on the console:
.. code-block:: console
$ Hello World! arm
You can debug an application in the usual way. Here is an example for the
:zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_g431rb :maybe-skip-config: :goals: debug
.. _Nucleo G431RB website: https://www.st.com/en/evaluation-tools/nucleo-g431rb.html
.. _STM32G4 Nucleo-64 board User Manual: https://www.st.com/resource/en/user_manual/dm00556337.pdf
.. _STM32G431RB on www.st.com: https://www.st.com/en/microcontrollers/stm32g431rb.html
.. _STM32G4 reference manual: https://www.st.com/resource/en/reference_manual/dm00355726.pdf
.. _STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html