1.. _olimex_stm32_h405: 2 3OLIMEX-STM32-H405 4################# 5 6Overview 7******** 8 9The OLIMEX-STM32-H405 board is based on the STMicroelectronics STM32F405RG ARM 10Cortex-M4 CPU. 11 12.. figure:: olimex_stm32_h405_top.jpg 13 :align: center 14 :alt: OLIMEX-STM32-H405 15 16 OLIMEX-STM32-H405 top 17 18.. figure:: olimex_stm32_h405_bottom.jpg 19 :align: center 20 :alt: OLIMEX-STM32-H405 21 22 OLIMEX-STM32-H405 bottom 23 24Hardware 25******** 26 27Information about the board can be found at the 28`OLIMEX-STM32-H405 website`_ and `OLIMEX-STM32-H405 user manual`_. 29The `ST STM32F405RG Datasheet`_ contains the processor's 30information and the datasheet. 31 32Supported Features 33================== 34 35The olimex_stm32_h405 board configuration supports the following 36hardware features: 37 38+-----------+------------+-------------------------+ 39| Interface | Controller | Driver/Component | 40+===========+============+=========================+ 41| NVIC | on-chip | nested vectored | 42| | | interrupt controller | 43+-----------+------------+-------------------------+ 44| SYSTICK | on-chip | system clock | 45+-----------+------------+-------------------------+ 46| UART | on-chip | serial port | 47+-----------+------------+-------------------------+ 48| GPIO | on-chip | gpio | 49+-----------+------------+-------------------------+ 50| USB | on-chip | USB device | 51+-----------+------------+-------------------------+ 52| WATCHDOG | on-chip | independent watchdog | 53+-----------+------------+-------------------------+ 54| COUNTER | on-chip | rtc | 55+-----------+------------+-------------------------+ 56| RNG | on-chip | random number generator | 57+-----------+------------+-------------------------+ 58 59Other hardware features have not been enabled yet for this board. 60 61 62Pin Mapping 63=========== 64 65LED 66--- 67 68* USER_LED (green) = PC12 69* PWR_LED (red) = power 70 71Push buttons 72------------ 73 74* USER_BUTTON = PA0 75* RST = NRST 76 77External Connectors 78------------------- 79 80JTAG debug 81 82+-------+--------------+-------+--------------+ 83| PIN # | Signal Name | Pin # | Signal Name | 84+=======+==============+=======+==============+ 85| 1 | +3.3V | 2 | +3.3V | 86+-------+--------------+-------+--------------+ 87| 3 | PB4 / TRST | 4 | GND | 88+-------+--------------+-------+--------------+ 89| 5 | PA15 / TDI | 6 | GND | 90+-------+--------------+-------+--------------+ 91| 7 | PA13 / TMS | 8 | GND | 92+-------+--------------+-------+--------------+ 93| 9 | PA14 / TCK | 10 | GND | 94+-------+--------------+-------+--------------+ 95| 11 | GND | 12 | GND | 96+-------+--------------+-------+--------------+ 97| 13 | PB3 / TDO | 14 | GND | 98+-------+--------------+-------+--------------+ 99| 15 | GND | 16 | GND | 100+-------+--------------+-------+--------------+ 101| 17 | RST | 18 | GND | 102+-------+--------------+-------+--------------+ 103| 19 | GND | 20 | GND | 104+-------+--------------+-------+--------------+ 105 106USB Type B 107 108+-------+------------------+ 109| PIN # | Signal Name | 110+=======+==================+ 111| 1 | +5V_USB | 112+-------+------------------+ 113| 2 | PA11 / USBDM | 114+-------+------------------+ 115| 3 | PA12 / USBDP | 116+-------+------------------+ 117| 4 | GND | 118+-------+------------------+ 119 120EXT1 header 121 122+-------+------------------+-------+------------------+ 123| PIN # | Signal Name | Pin # | Signal Name | 124+=======+==================+=======+==================+ 125| 1 | | 2 | | 126+-------+------------------+-------+------------------+ 127| ... | ... | ... | ... | 128+-------+------------------+-------+------------------+ 129| 9 | PC11 (USB DISC) | 10 | PC12 (LED) | 130+-------+------------------+-------+------------------+ 131| ... | ... | ... | ... | 132+-------+------------------+-------+------------------+ 133| 25 | | 26 | | 134+-------+------------------+-------+------------------+ 135 136EXT2 header 137 138+-------+------------------+-------+------------------+ 139| PIN # | Signal Name | Pin # | Signal Name | 140+=======+==================+=======+==================+ 141| 1 | | 2 | | 142+-------+------------------+-------+------------------+ 143| ... | ... | ... | ... | 144+-------+------------------+-------+------------------+ 145| 5 | | 6 | GND | 146+-------+------------------+-------+------------------+ 147| 7 | PA2 / USART2_TX | 8 | | 148+-------+------------------+-------+------------------+ 149| 9 | | 10 | PA3 / USART2_RX | 150+-------+------------------+-------+------------------+ 151| ... | ... | ... | ... | 152+-------+------------------+-------+------------------+ 153| 25 | | 26 | | 154+-------+------------------+-------+------------------+ 155 156 157System Clock 158============ 159 160OLIMEX-STM32-H405 has two external oscillators. The frequency of 161the slow clock is 32.768 kHz. The frequency of the main clock 162is 8 MHz. The processor can setup HSE to drive the master clock, 163which can be set as high as 168 MHz. 164 165Programming and Debugging 166************************* 167The OLIMEX-STM32-H405 board does not include an embedded debug tool 168interface. You will need to use ST tools or an external JTAG probe. 169In the following examples a ST-Link V2 USB dongle is used. 170 171Flashing an application to the Olimex-STM32-H405 172================================================ 173 174The sample application :ref:`hello_world` is being used in this tutorial. 175 176Connect the ST-Link USB dongle to your host computer and to the JTAG port of 177the OLIMEX-STM32-H405 board. 178 179Now build and flash the application. 180 181.. zephyr-app-commands:: 182 :zephyr-app: samples/hello_world 183 :board: olimex_stm32_h405 184 :goals: build flash 185 186Run a serial host program to connect with your board: 187 188.. code-block:: console 189 190 $ minicom -D /dev/ttyACM0 191 192After resetting the board, you should see the following message: 193 194.. code-block:: console 195 196 *** Booting Zephyr OS build v2.7.99-3008-g2341052abe7c *** 197 Hello World! olimex_stm32_h405 198 199 200Debugging 201========= 202 203You can debug an application in the usual way. Here is an example for the 204:ref:`hello_world` application. 205 206.. zephyr-app-commands:: 207 :zephyr-app: samples/hello_world 208 :board: olimex_stm32_h405 209 :maybe-skip-config: 210 :goals: debug 211 212.. _OLIMEX-STM32-H405 website: 213 https://www.olimex.com/Products/ARM/ST/STM32-H405/ 214 215.. _OLIMEX-STM32-H405 user manual: 216 https://www.olimex.com/Products/ARM/ST/STM32-H405/resources/STM32-H405_UM.pdf 217 218.. _ST STM32F405RG Datasheet: 219 https://www.st.com/resource/en/reference_manual/dm00031020.pdf 220