• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

.ci/attachconfig/21-Aug-2025-

applications/21-Aug-2025-

board/21-Aug-2025-

figures/21-Aug-2025-

.config A D21-Aug-202547.2 KiB1,4431,331

.gitignore A D21-Aug-2025365 4342

Kconfig A D21-Aug-2025494 2820

README.md A D21-Aug-20255 KiB8968

README_zh.md A D21-Aug-20254.2 KiB11568

SConscript A D21-Aug-2025390 1914

SConstruct A D21-Aug-20252.4 KiB7557

project.ewd A D21-Aug-202599.7 KiB2,8352,834

project.ewp A D21-Aug-202563.9 KiB2,3462,345

project.eww A D21-Aug-2025161 117

project.uvoptx A D21-Aug-20255.8 KiB193185

project.uvprojx A D21-Aug-202539.8 KiB1,1211,120

rtconfig.h A D21-Aug-20258.5 KiB42883

rtconfig.py A D21-Aug-20255.3 KiB186143

template.ewp A D21-Aug-202572.5 KiB2,0752,074

template.eww A D21-Aug-2025162 117

template.uvoptx A D21-Aug-20255.8 KiB193185

template.uvprojx A D21-Aug-202514 KiB396390

README.md

1# STM32F412-Nucleo BSP Introduction
2
3[中文](README_zh.md)
4
5## MCU: STM32F412ZG @100MHz, 1024KB FLASH,  256KB RAM
6
7STM32F412xE/G devices are based on the high-performance Arm® Cortex® -M4 32-bit RISC core operating at a frequency of up to 100 MHz. Their Cortex®-M4 core features a Floating point unit (FPU) single precision which supports all Arm single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) which enhances application security.
8
9STM32F412xE/G devices belong to the STM32 Dynamic Efficiency™ product line (with products combining power efficiency, performance and integration) while adding a new innovative feature called Batch Acquisition Mode (BAM) allowing even more power consumption saving during data batching.
10STM32F412xE/G devices incorporate high-speed embedded memories (up to 1 Mbyte of Flash memory, 256 Kbytes of SRAM), and an extensive range of enhanced I/Os and peripherals connected to two APB buses, three AHB buses and a 32-bit multi-AHB bus matrix.
11All devices offer one 12-bit ADC, a low-power RTC, twelve general-purpose 16-bit timers, two PWM timers for motor control and two general-purpose 32-bit timers.
12They also feature standard and advanced communication interfaces:
13In addition, STM32F412xE/G devices embed advanced peripherals:
14STM32F412xE/G devices are offered in 7 packages ranging from 48 to 144 pins. The set of available peripherals depends on the selected package.
15The STM32F412xE/G operates in the -40 to +125 °C temperature range from a 1.7 (PDR OFF) to 3.6 V power supply. A comprehensive set of power-saving modes allows the design of low-power applications.
16These features make the STM32F412xE/G microcontrollers suitable for a wide range of applications.
17
18#### KEY FEATURES
19
20- Dynamic Efficiency Line with BAM (Batch Acquisition Mode)
21- Core: Arm® 32-bit Cortex®-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait state execution from Flash memory, frequency up to 100 MHz, memory protection unit, 125 DMIPS/1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
22- Memories
23  - Up to 1 Mbyte of Flash memory
24  - 256 Kbyte of SRAM
25  - Flexible external static memory controller with up to 16-bit data bus: SRAM, PSRAM, NOR Flash memory
26  - Dual mode Quad-SPI interface
27- LCD parallel interface, 8080/6800 modes
28- Clock, reset and supply management
29  - 1.7 V to 3.6 V application supply and I/Os
30  - POR, PDR, PVD and BOR
31  - 4-to-26 MHz crystal oscillator
32  - Internal 16 MHz factory-trimmed RC
33  - 32 kHz oscillator for RTC with calibration
34  - Internal 32 kHz RC with calibration
35- Power consumption
36  - Run: 112 μA/MHz (peripheral off)
37  - Stop (Flash in Stop mode, fast wakeup time): 50 μA Typ @ 25 °C; 75 μA max @25 °C
38  - Stop (Flash in Deep power down mode, slow wakeup time): down to 18 μA @ 25 °C; 40 μA max @25 °C
39  - Standby: 2.4 μA @25 °C / 1.7 V without RTC; 12 μA @85 °C @1.7 V
40  - VBAT supply for RTC: 1 μA @25 °C
41- 1×12-bit, 2.4 MSPS ADC: up to 16 channels
42- 2xdigital filters for sigma delta modulator, 4xPDM interfaces, stereo microphone support
43- General-purpose DMA: 16-stream DMA
44
45- Up to 17 timers: up to twelve 16-bit timers, two 32-bit timers up to 100 MHz each with up to four IC/OC/PWM or pulse counter and quadrature (incremental) encoder input, two watchdog timers (independent and window), one SysTick timer
46- Debug mode
47  - Serial wire debug (SWD) & JTAG
48  - Cortex®-M4 Embedded Trace Macrocell™
49- Up to 114 I/O ports with interrupt capability
50  - Up to 109 fast I/Os up to 100 MHz
51  - Up to 114 five V-tolerant I/Os
52- Up to 17 communication interfaces
53  - Up to 4xI2C interfaces (SMBus/PMBus)
54  - Up to 4 USARTs (2x12.5 Mbit/s, 2x6.25 Mbit/s), ISO 7816 interface, LIN, IrDA, modem control)
55  - Up to 5 SPI/I2Ss (up to 50 Mbit/s, SPI or I2S audio protocol), out of which 2 muxed full-duplex I2S interfaces
56  - SDIO interface (SD/MMC/eMMC)
57  - Advanced connectivity: USB 2.0 full-speed device/host/OTG controller with PHY
58  - 2xCAN (2.0B Active)
59- True random number generator
60- CRC calculation unit
61- 96-bit unique ID
62- RTC: subsecond accuracy, hardware calendar
63- All packages are ECOPACK®2
64
65
66
67## Read more
68
69|                          Documents                           |                         Description                          |
70| :----------------------------------------------------------: | :----------------------------------------------------------: |
71| [STM32_Nucleo-144_BSP_Introduction](../docs/STM32_Nucleo-144_BSP_Introduction.md) | How to run RT-Thread on STM32 Nucleo-144 boards (**Must-Read**) |
72| [STM32F412ZG ST Official Website](https://www.st.com/en/microcontrollers-microprocessors/stm32f412zg.html#documentation) |          STM32F412ZG datasheet and other resources           |
73
74
75
76## Maintained By
77
78[flybreak](https://github.com/guozhanxin)  g1171407708@163.com
79
80
81
82## Translated By
83
84Meco Man @ RT-Thread Community
85
86> jiantingman@foxmail.com
87>
88> https://github.com/mysterywolf
89

README_zh.md

1# NUCLEO-F412ZG 开发板 BSP 说明
2
3## 简介
4
5本文档为 RT-Thread 开发团队为 NUCLEO-F412ZG 开发板提供的 BSP (板级支持包) 说明。
6
7主要内容如下:
8
9- 开发板资源介绍
10- BSP 快速上手
11- 进阶使用方法
12
13通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
14
15## 开发板介绍
16
17探索者 NUCLEO-F412ZG 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 100Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F411ZG 的芯片性能。
18
19开发板外观如下图所示:
20
21![board](figures/board.png)
22
23该开发板常用 **板载资源** 如下:
24
25- MCU:STM32F412ZG,主频 100MHz,1024KB FLASH ,256KB RAM。
26- 常用外设
27  - LED:3 个,USB communication (LD1), user LED (LD2), power LED (LD3) 。
28  - 按键,2 个,USER and RESET 。
29- 常用接口:USB 支持 3 种不同接口:虚拟 COM 端口、大容量存储和调试端口。
30- 调试接口,板载 ST-LINK/V2-1 调试器。
31
32开发板更多详细信息请参考意法半导体 [NUCLEO-F412ZG 开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-f412zg.html)33
34## 外设支持
35
36本 BSP 目前对外设的支持情况如下:
37
38| **片上外设** | **支持情况** |               **备注**                |
39| :------------ | :----------: | :-----------------------------------: |
40| GPIO         |     支持     | PA0, PA1... PH1 ---> PIN: 0, 1...63 |
41| UART         |     支持     |              UART2,UART3            |
42| Onchip Flash |     支持     |                                     |
43|  USB Device  |     支持     |                                     |
44
45## 使用说明
46
47使用说明分为如下两个章节:
48
49- 快速上手
50
51    本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
52
53- 进阶使用
54
55    本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
56
57
58### 快速上手
59
60本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
61
62**请注意!!!**
63
64在执行编译工作前请先打开ENV执行以下指令(该指令用于拉取必要的HAL库及CMSIS库,否则无法通过编译):
65
66```bash
67pkgs --update
68```
69
70#### 硬件连接
71
72使用 Type-A to Micro-B 线连接开发板和 PC 供电,红色 LED LD3 (PWR) 和 LD1 (COM) 会点亮。
73
74#### 编译下载
75
76双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
77
78> 工程默认配置使用 ST-LINK 下载程序,点击下载按钮即可下载程序到开发板。
79
80#### 运行结果
81
82下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,红色 LD3 和 LD1 常亮、蓝色 LD2 会周期性闪烁。
83
84USB 虚拟 COM 端口默认连接串口 3,在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
85
86```bash
87 \ | /
88- RT -     Thread Operating System
89 / | \     4.0.2 build Oct 20 2019
90 2006 - 2019 Copyright by rt-thread team
91msh >
92```
93### 进阶使用
94
95此 BSP 默认只开启了 GPIO 和 串口 3 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
96
971. 在 BSP 下打开 env 工具。
98
992. 输入 `menuconfig` 命令配置工程,配置好之后保存退出。
100
1013. 输入 `pkgs --update` 命令更新软件包。
102
1034. 输入 `scons --target=mdk5/iar` 命令重新生成工程。
104
105本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32 系列 BSP 外设驱动使用教程. md)。
106
107## 注意事项
108
109暂无
110
111## 联系人信息
112
113维护人:
114
115- [flybreak](https://github.com/guozhanxin) ,邮箱:<g1171407708@163.com>