1.. zephyr:board:: arduino_portenta_h7
2
3Overview
4********
5
6The Portenta H7 enables a wide diversity of applications taking benefit
7from Computer Vision, PLCs, Robotics controller, High-end industrial machinery
8and high-speed booting computation (ms).
9
10The board includes an STM32H747XI SoC with a high-performance DSP, Arm Cortex-M7 + Cortex-M4 MCU,
11with 2MBytes of Flash memory, 1MB RAM, 480 MHz CPU, Art Accelerator, L1 cache, external memory interface,
12large set of peripherals, SMPS, and MIPI-DSI.
13
14Additionally, the board features:
15
16- USB OTG FS
17- 3 color user LEDs
18
19More information about the board can be found at the `ARDUINO_PORTENTA_H7 website`_.
20More information about STM32H747XIH6 can be found here:
21
22- `STM32H747XI on www.st.com`_
23- `STM32H747xx reference manual`_
24- `STM32H747xx datasheet`_
25
26Supported Features
27==================
28
29.. zephyr:board-supported-hw::
30
31The high precision low speed external (LSE) clock is only fully supported on
32boards with hardware revision 4.10 or greater. By default the internal source
33is used; to enable the use of the external oscillator, manually specify the
34hardware revision at build time (see :ref:`application_board_version` for
35information on how to build for specific revisions of the board).
36
37Applications that intend to use BLE must specify hardware revision at build time.
38
39Currently only BLE is supported on this board, WiFi is not supported.
40
41Fetch Binary Blobs
42******************
43
44The board Bluetooth/WiFi module requires fetching some binary blob files, to do
45that run the command:
46
47.. code-block:: console
48
49   west blobs fetch hal_infineon
50
51.. note:: Only Bluetooth functionality is currently supported.
52
53Resources sharing
54=================
55
56The dual core nature of STM32H747 SoC requires sharing HW resources between the
57two cores. This is done in 3 ways:
58
59- **Compilation**: Clock configuration is only accessible to M7 core. M4 core only
60  has access to bus clock activation and deactivation.
61- **Static pre-compilation assignment**: Peripherals such as a UART are assigned in
62  devicetree before compilation. The user must ensure peripherals are not assigned
63  to both cores at the same time.
64- **Run time protection**: Interrupt-controller and GPIO configurations could be
65  accessed by both cores at run time. Accesses are protected by a hardware semaphore
66  to avoid potential concurrent access issues.
67
68Building and Flashing
69*********************
70
71.. zephyr:board-supported-runners::
72
73Applications for the ``arduino_portenta_h7`` board should be built per core target,
74using either ``arduino_portenta_h7_m7`` or ``arduino_portenta_h7_m4`` as the target.
75See :ref:`build_an_application` for more information about application builds.
76
77
78Flashing
79========
80
81Installing dfu-util
82-------------------
83
84This board requires dfu-utils for flashing. It is recommended to use at least
85v0.8 of `dfu-util`_. The package available in debian/ubuntu can be quite old, so you might
86have to build dfu-util from source.
87
88Flashing an application to STM32H747I M7 Core
89---------------------------------------------
90
91First, connect the Arduino Portenta H7 board to your host computer using
92the USB port to prepare it for flashing. Double tap the button to put the board
93into the Arduino Bootloader mode. Then build and flash your application.
94
95Here is an example for the :zephyr:code-sample:`hello_world` application.
96
97.. zephyr-app-commands::
98   :zephyr-app: samples/hello_world
99   :board: arduino_portenta_h7/stm32h747xx/m7
100   :goals: build flash
101
102Run a serial host program to connect with your board:
103
104.. code-block:: console
105
106   $ minicom -D /dev/ttyACM0
107
108You should see the following message on the console:
109
110.. code-block:: console
111
112   Hello World! arduino_portenta_h7
113
114Similarly, you can build and flash samples on the M4 target. For this, please
115take care of the resource sharing (UART port used for console for instance).
116
117Here is an example for the :zephyr:code-sample:`blinky` application on M4 core.
118
119.. zephyr-app-commands::
120   :zephyr-app: samples/basic/blinky
121   :board: arduino_portenta_h7/stm32h747xx/m4
122   :goals: build flash
123
124.. _ARDUINO_PORTENTA_H7 website:
125   https://docs.arduino.cc/hardware/portenta-h7
126
127.. _STM32H747XI on www.st.com:
128   https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32h7-series/stm32h747-757/stm32h747xi.html
129
130.. _STM32H747xx reference manual:
131   https://www.st.com/resource/en/reference_manual/dm00176879.pdf
132
133.. _STM32H747xx datasheet:
134   https://www.st.com/resource/en/datasheet/stm32h747xi.pdf
135
136.. _dfu-util:
137   http://dfu-util.sourceforge.net/build.html
138