boards/st/nucleo_u031r8/doc/index.rst
.. zephyr:board:: nucleo_u031r8
Overview
The Nucleo U031R8 board, featuring an ARM Cortex-M0+ based STM32U031R8 MCU, provides an affordable and flexible way for users to try out new concepts and build prototypes by choosing from the various combinations of performance and power consumption features. Here are some highlights of the Nucleo U031R8 board:
STM32U031R8 microcontroller in LQFP48 package
Two types of extension resources:
On-board STLINK-V2EC debugger/programmer with USB re-enumeration capability: mass storage, Virtual COM port, and debug port
Flexible board power supply:
User LED shared with ARDUINO® Uno V3
Two push-buttons: USER and RESET
USB Type-C® connector for the ST-LINK
More information about the board can be found at the NUCLEO_U031R8 website_.
Hardware
The STM32U031x4/6/8 devices are an ultra-low-power microcontrollers family (STM32U0 Series) based on the high-performance Arm® Cortex®-M0+ 32-bit RISC core. They operate at a frequency of up to 56 MHz.
Includes ST state-of-the-art patented technology
Ultra-low-power with FlexPowerControl:
Core:
ART Accelerator:
Benchmarks:
Memories:
General-purpose input/outputs:
Clock management:
Security:
Up to 9 timers, RTC, and 2 watchdogs :
Up to 16 communication peripherals:
Rich analog peripherals (independent supply):
ECOPACK2 compliant packages
More information about STM32U031R8 can be found here:
STM32U031R8 on www.st.com_STM32U031R8 reference manual_.. zephyr:board-supported-hw::
Nucleo U031R8 Board has 10 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
For more details please refer to STM32U031 User Manual_.
Nucleo U031R8 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 48MHz, driven by 4MHz medium speed internal oscillator.
Nucleo U031R8 board has 4 U(S)ARTs. The Zephyr console output is assigned to USART2. Default settings are 115200 8N1.
Programming and Debugging
.. zephyr:board-supported-runners::
Nucleo U031R8 board includes an ST-LINK/V3 embedded debug tool interface. This probe allows to flash the board using various tools.
.. warning::
The onboard ST-LINK/V3 debug probe cannot be converted into a JLink probe_;
as such, usage of the JLink runner requires an external JLink debug probe.
.. warning::
There are known issues about the usage of the pyOCD runner with this board.
If issues are encountered (e.g., debugging does not work), use the
:ref:ST-Link GDB Server <runner_stlink_gdbserver> runner instead.
The board is configured to be flashed using west STM32CubeProgrammer_ runner,
so its :ref:installation <stm32cubeprog-flash-host-tools> is required.
Alternatively, JLink or pyOCD can also be used to flash the board using
the --runner (or -r) option:
.. code-block:: console
$ west flash --runner pyocd $ west flash --runner jlink
For pyOCD, additional target information needs to be installed by executing the following pyOCD commands:
.. code-block:: console
$ pyocd pack --update $ pyocd pack --install stm32u0
Connect the Nucleo U031R8 to your host computer using the USB port.
Then build and flash an application. Here is an example for the
:zephyr:code-sample:hello_world application.
Run a serial host program to connect with your Nucleo board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
Then build and flash the application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_u031r8 :goals: build flash
You should see the following message on the console:
.. code-block:: console
Hello World! nucleo_u031r8
Here is an example for the :zephyr:code-sample:blinky application.
.. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_u031r8 :goals: debug
.. _NUCLEO_U031R8 website: https://www.st.com/en/evaluation-tools/nucleo-u031r8.html
.. _STM32U031 User Manual: https://www.st.com/resource/en/user_manual/um3261-stm32u0-series-safety-manual-stmicroelectronics.pdf
.. _STM32U031R8 on www.st.com: https://www.st.com/en/microcontrollers-microprocessors/stm32u031r8
.. _STM32U031R8 reference manual: https://www.st.com/resource/en/reference_manual/rm0503-stm32u0-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
.. _STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html
.. _converted into a JLink probe: https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/