1.. zephyr:board:: weact_stm32f405_core 2 3Overview 4******** 5 6The WeAct STM32F405 Core Board is an extremely low cost and bare-bones 7development board featuring the STM32F405RG, see `STM32F405RG website`_. 8This is the 64-pin variant of the STM32F405x series, 9see `STM32F405x reference manual`_. More info about the board available 10on `WeAct Github`_. 11 12Hardware 13******** 14 15The STM32F405RG based Core V1.0 Board provides the following 16hardware components: 17 18- STM32F405RG in QFPN64 package 19- ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU, Adaptive real-time 20 accelerator (ART Accelerator) allowing 0-wait state execution from Flash memory 21- 168 MHz max CPU frequency 22- VDD from 1.7 V to 3.6 V 23- 1 MB Flash 24- 192+4 Kbytes of SRAM including 64-Kbyte of CCM (core coupled memory) 25- GPIO with external interrupt capability 26- 3x12-bit, 2.4 MSPS ADC up to 24 channels and 7.2 MSPS in triple interleaved mode 27- 2x12-bit D/A converters 28- 16-stream DMA controller 29- Up to 17 Timers (twelve 16-bit, two 32-bit, two watchdog timers and a SysTick timer) 30- USART/UART (4) 31- I2C (3) 32- SPI/I2S (3) 33- CAN (2) 34- SDIO 35- USB 2.0 full-speed device/host/OTG controller with on-chip PHY 36- USB 2.0 high-speed/full-speed device/host/OTG controller with on-chip full-speed PHY and ULPI 37- 10/100 Ethernet MAC 38- CRC calculation unit 39- 96-bit unique ID 40- RTC with hardware calendar 41- 8- to 14-bit parallel camera interface 42- LCD parallel interface, 8080/6800 modes 43 44 45Supported Features 46================== 47 48The Zephyr weact_stm32f405_core board configuration supports the following 49hardware features: 50 51+------------+------------+-------------------------------------+ 52| Interface | Controller | Driver/Component | 53+============+============+=====================================+ 54| NVIC | on-chip | nested vector interrupt controller | 55+------------+------------+-------------------------------------+ 56| SYSTICK | on-chip | system clock | 57+------------+------------+-------------------------------------+ 58| UART | on-chip | serial port | 59+------------+------------+-------------------------------------+ 60| GPIO | on-chip | gpio | 61+------------+------------+-------------------------------------+ 62| PINMUX | on-chip | pinmux | 63+------------+------------+-------------------------------------+ 64| FLASH | on-chip | flash | 65+------------+------------+-------------------------------------+ 66| SPI | on-chip | spi | 67+------------+------------+-------------------------------------+ 68| I2C | on-chip | i2c | 69+------------+------------+-------------------------------------+ 70| ADC | on-chip | ADC Controller | 71+------------+------------+-------------------------------------+ 72| USB OTG FS | on-chip | USB device | 73+------------+------------+-------------------------------------+ 74 75The default configuration can be found in 76:zephyr_file:`boards/weact/stm32f405_core/weact_stm32f405_core_defconfig` 77 78Pin Mapping 79=========== 80 81Default Zephyr Peripheral Mapping: 82---------------------------------- 83 84- UART_1 TX/RX : PA9/PA10 85- UART_2 TX/RX : PA2/PA3 86- I2C1 SCL/SDA : PB6/PB7 87- SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 88- CAN1 TX/RX : Pb9/PB8 89- SDMMC1 D0..D4/CLK/CMD : PC8/PC9/PC10/PC11/PC12/PD2 90- USER_PB : PC13 91- USER_LED : PB2 92 93Clock Sources 94------------- 95 96The board has two external oscillators. The frequency of the slow clock (LSE) is 9732.768 kHz. The frequency of the main clock (HSE) is 8 MHz. 98 99The default configuration sources the system clock from the PLL, which is 100derived from HSE, and is set at 168MHz, which is the maximum possible frequency 101to achieve a stable USB clock (48MHz). 102 103Programming and Debugging 104************************* 105 106There are 2 main entry points for flashing STM32F4X SoCs, one using the ROM 107bootloader, and another by using the SWD debug port (which requires additional 108hardware). Flashing using the ROM bootloader requires a special activation 109pattern, which can be triggered by using the BOOT0 pin. 110 111Flashing 112======== 113 114Installing dfu-util 115------------------- 116 117It is recommended to use at least v0.8 of `dfu-util`_. The package available in 118debian/ubuntu can be quite old, so you might have to build dfu-util from source. 119 120There is also a Windows version which works, but you may have to install the 121right USB drivers with a tool like `Zadig`_. 122 123Flashing an Application 124----------------------- 125 126Connect a USB-C cable and the board should power ON. Force the board into DFU mode 127by keeping the BOOT0 switch pressed while pressing and releasing the NRST switch. 128 129The dfu-util runner is supported on this board and so a sample can be built and 130tested easily. 131 132.. zephyr-app-commands:: 133 :zephyr-app: samples/basic/blinky 134 :board: weact_stm32f405_core 135 :goals: build flash 136 137.. zephyr-app-commands:: 138 :zephyr-app: samples/basic/button 139 :board: weact_stm32f405_core 140 :goals: build flash 141 142.. zephyr-app-commands:: 143 :zephyr-app: samples/subsys/fs/fs_sample 144 :board: weact_stm32f405_core 145 :goals: build flash 146 147 148Debugging 149========= 150 151The board can be debugged by installing the included 100 mil (0.1 inch) header, 152and attaching an SWD debugger to the 3V3 (3.3V), GND, SCK, and DIO 153pins on that header. 154 155References 156********** 157 158.. target-notes:: 159 160.. _board release notes: 161 https://github.com/WeActStudio/WeActStudio.STM32F4_64Pin_CoreBoard/blob/master/README.md 162 163.. _Zadig: 164 https://zadig.akeo.ie/ 165 166.. _WeAct Github: 167 https://github.com/WeActStudio/WeActStudio.STM32F4_64Pin_CoreBoard 168 169.. _dfu-util: 170 http://dfu-util.sourceforge.net/build.html 171 172.. _STM32F405RG website: 173 https://www.st.com/en/microcontrollers-microprocessors/stm32f405rg.html 174 175.. _STM32F405x reference manual: 176 https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdf 177