|
@@ -1,12 +1,14 @@
|
|
|
-# STM32F469 Discovery开发板的Arduino生态兼容说明
|
|
|
+# The Arduino Compatible for STM32F469 Discovery Board
|
|
|
|
|
|
-## 1 RTduino - RT-Thread的Arduino生态兼容层
|
|
|
+**English** | [中文](README_zh.md)
|
|
|
|
|
|
-STM32F469 Discovery开发板已经完整适配了[RTduino软件包](https://github.com/RTduino/RTduino),即RT-Thread的Arduino生态兼容层。用户可以按照Arduino的编程习惯来操作该BSP,并且可以使用大量Arduino社区丰富的库,是对RT-Thread生态的极大增强。更多信息,请参见[RTduino软件包说明文档](https://github.com/RTduino/RTduino)。
|
|
|
+## 1 RTduino - Arduino Ecosystem Compatibility Layer for RT-Thread
|
|
|
|
|
|
-### 1.1 如何开启针对本BSP的Arduino生态兼容层
|
|
|
+STM32F469 Discovery board has support [RTduino](https://github.com/RTduino/RTduino). Users can use Arduino APIs, third party libraries and programming method to program on the board.
|
|
|
|
|
|
-Env 工具下敲入 menuconfig 命令,或者 RT-Thread Studio IDE 下选择 RT-Thread Settings:
|
|
|
+### 1.1 How to Enable RTduino
|
|
|
+
|
|
|
+Please go to the [RTduino repository](https://github.com/RTduino/RTduino) to see the details.
|
|
|
|
|
|
```Kconfig
|
|
|
Hardware Drivers Config --->
|
|
@@ -14,63 +16,73 @@ Hardware Drivers Config --->
|
|
|
[*] Compatible with Arduino Ecosystem (RTduino)
|
|
|
```
|
|
|
|
|
|
-## 2 Arduino引脚排布
|
|
|
+## 2 Arduino Pinout
|
|
|
|
|
|

|
|
|
|
|
|
-该BSP遵照Arduino UNO板的引脚排列方式。详见 `pins_arduino.c`
|
|
|
-
|
|
|
-| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
|
|
|
-| --------------- | ------------- | ------ | ------------------------------------------------------------ |
|
|
|
-| 0 (D0) | PG9 | 是 | Serial-Rx,默认被RT-Thread的UART设备框架uart6接管 |
|
|
|
-| 1 (D1) | PG14 | 是 | Serial-Tx,默认被RT-Thread的UART设备框架uart6接管 |
|
|
|
-| 2 (D2) | PG13 | 是 | |
|
|
|
-| 3 (D3) | PA1 | 是 | PWM(定时器2发生) |
|
|
|
-| 4 (D4) | PG12 | 是 | |
|
|
|
-| 5 (D5) | PA2 | 是 | PWM(定时器2发生) |
|
|
|
-| 6 (D6) | PA6 | 是 | PWM(定时器3发生) |
|
|
|
-| 7 (D7) | PG11 | 是 | |
|
|
|
-| 8 (D8) | PG10 | 是 | |
|
|
|
-| 9 (D9) | PA7 | 是 | PWM(定时器3发生) |
|
|
|
-| 10 (D10) | PH6 | 是 | PWM(定时器12发生) |
|
|
|
-| 11 (D11) | PB15 | 是 | PWM(定时器12发生) |
|
|
|
-| 12 (D12) | PB14 | 是 | |
|
|
|
-| 13 (D13) | PD3 | 是 | LED_BUILTIN |
|
|
|
-| 14 (D14) | PB9 | 是 | I2C1-SDA,被RT-Thread的I2C设备框架i2c1总线接管,不可当做普通IO |
|
|
|
-| 15 (D15) | PB8 | 是 | I2C1_SCL,被RT-Thread的I2C设备框架i2c1总线接管,不可当做普通IO |
|
|
|
-| 16 (D16) | PA0 | 是 | Discovery板载用户按键(蓝色) |
|
|
|
-| 17(D17) | PG6 | 是 | user LED1(用户LED) |
|
|
|
-| 18(D18) | PD4 | 是 | user LED2(用户LED) |
|
|
|
-| 19(D19) | PD5 | 是 | user LED3(用户LED) |
|
|
|
-| 20(D20) | PK3 | 是 | user LED4(用户LED) |
|
|
|
-| A0 | PB1 | 是 | ADC Channel_9 |
|
|
|
-| A1 | PC2 | 是 | ADC Channel_12 |
|
|
|
-| A2 | PC3 | 是 | ADC Channel_13 |
|
|
|
-| A3 | PC4 | 是 | ADC Channel_14 |
|
|
|
-| A4 | PC5 | 是 | ADC Channel_15 |
|
|
|
-| A5 | PA4 | 是 | ADC Channel_4 |
|
|
|
-| A6 | -- | | 芯片内部参考电压 ADC |
|
|
|
-| A7 | -- | | 芯片内部温度 ADC |
|
|
|
-
|
|
|
-> 注意:
|
|
|
->
|
|
|
-> - 暂无
|
|
|
-
|
|
|
-> 参考资料
|
|
|
->
|
|
|
-> 【1】[STM32F469 Discovery官方资料](https://www.st.com/en/evaluation-tools/32f469idiscovery.html#documentation)
|
|
|
-
|
|
|
-
|
|
|
-## 3 通信
|
|
|
-
|
|
|
-### 3.1 I2C总线
|
|
|
-
|
|
|
-STM32F469 Discovery板的I2C总线是板上丝印的 `SCL/D15` 和 `SDA/D14` 引脚,这两个引脚是被RT-Thread I2C设备框架接管的,不需要直接操控这两个引脚,直接引用`#include <Wire.h>`(Arduino官方I2C头文件)即可使用。
|
|
|
-
|
|
|
-### 3.2 SPI总线
|
|
|
-
|
|
|
-目前本BSP不支持使用Arduino的SPI功能。
|
|
|
-
|
|
|
-### 3.3 串口
|
|
|
-
|
|
|
-本BSP通过 `Serial.` 方法调用 `uart2` 串口设备。详见[例程](https://github.com/RTduino/RTduino/blob/master/examples/Basic/helloworld.cpp)。
|
|
|
+This board complies with Arduino UNO pins layout. For more details, please take a look at: [pins_arduino.c](pins_arduino.c) and [pins_arduino.h](pins_arduino.h).
|
|
|
+
|
|
|
+| Arduino Pin | STM32 Pin | 5V Tolerate | Note |
|
|
|
+| ----------- | --------- | ----------- | --------------------------------------------------------------------------------------------- |
|
|
|
+| 0 (D0) | PG9 | Yes | Serial-Rx. Token over by RT-Thread UART device by default |
|
|
|
+| 1 (D1) | PG14 | Yes | Serial-Tx. Token over by RT-Thread UART device by default |
|
|
|
+| 2 (D2) | PG13 | Yes | |
|
|
|
+| 3 (D3) | PA1 | Yes | PWM2-CH2. Token over by RT-Thread PWM device by default |
|
|
|
+| 4 (D4) | PG12 | Yes | |
|
|
|
+| 5 (D5) | PA2 | Yes | PWM2-CH3. Token over by RT-Thread PWM device by default |
|
|
|
+| 6 (D6) | PA6 | Yes | PWM3-CH1. Token over by RT-Thread PWM device by default |
|
|
|
+| 7 (D7) | PG11 | Yes | |
|
|
|
+| 8 (D8) | PG10 | Yes | |
|
|
|
+| 9 (D9) | PA7 | Yes | PWM3-CH2. Token over by RT-Thread PWM device by default |
|
|
|
+| 10 (D10) | PH6 | Yes | PWM12-CH1. Token over by RT-Thread PWM device by default |
|
|
|
+| 11 (D11) | PB15 | Yes | PWM12-CH2. Token over by RT-Thread PWM device by default |
|
|
|
+| 12 (D12) | PB14 | Yes | |
|
|
|
+| 13 (D13, ) | PD3 | Yes | USER LED1 |
|
|
|
+| 14 (D14) | PB9 | Yes | I2C1-SDA. Token over by RT-Thread I2C device by default |
|
|
|
+| 15 (D15) | PB8 | Yes | I2C1-SCL. Token over by RT-Thread I2C device by default |
|
|
|
+| 16 (D16) | PA0 | Yes | USER Button |
|
|
|
+| 17(D17) | PG6 | Yes | USER LED2 |
|
|
|
+| 18(D18) | PD4 | Yes | USER LED3 |
|
|
|
+| 19(D19) | PD5 | Yes | USER LED4 |
|
|
|
+| 20(D20) | PK3 | Yes | USER LED5 |
|
|
|
+| A0 | PB1 | Yes | ADC1-CH9. Token over by RT-Thread ADC device by default |
|
|
|
+| A1 | PC2 | Yes | ADC1-CH12. Token over by RT-Thread ADC device by default |
|
|
|
+| A2 | PC3 | Yes | ADC1-CH13. Token over by RT-Thread ADC device by default |
|
|
|
+| A3 | PC4 | Yes | ADC1-CH14. Token over by RT-Thread ADC device by default |
|
|
|
+| A4 | PC5 | Yes | ADC1-CH15. Token over by RT-Thread ADC device by default |
|
|
|
+| A5 | PA4 | Yes | ADC1-CH4. Token over by RT-Thread ADC device by default |
|
|
|
+| A6 | -- | | On-chip internal voltage sensor. ADC1-CH17. Token over by RT-Thread ADC device by default |
|
|
|
+| A7 | -- | | On-chip internal temperature sensor. ADC1-CH16. Token over by RT-Thread ADC device by default |
|
|
|
+
|
|
|
+> Notice:
|
|
|
+>
|
|
|
+> 1. Don't use a same hardware timer to drive PWM (analogRead) and servos at same time, because hardware timer can only generate a same frequency for 4 PWM channels. Otherwise, it could cause a failure when drive servos.
|
|
|
+
|
|
|
+> References
|
|
|
+>
|
|
|
+> 1. [STM32F469 Discovery ST Website](https://www.st.com/en/evaluation-tools/32f469idiscovery.html#documentation)
|
|
|
+
|
|
|
+## 3 Communication
|
|
|
+
|
|
|
+### 3.1 I2C Bus
|
|
|
+
|
|
|
+I2C bus is `SCL/D15` and `SDA/D14` pins. Users can directly include the `#include <Wire.h>`, which is the Arduino official I2C header file, to use the I2C bus.
|
|
|
+
|
|
|
+### 3.2 SPI Bus
|
|
|
+
|
|
|
+This board doesn't support Arduino SPI header file and functions.
|
|
|
+
|
|
|
+### 3.3 Serial
|
|
|
+
|
|
|
+This board supports to use `Serial.` method to operate `uart3` device. See [example](https://github.com/RTduino/RTduino/blob/master/examples/Basic/helloworld.cpp).
|
|
|
+
|
|
|
+### 3.4 USB Virtual Serial
|
|
|
+
|
|
|
+This board supports USB virtual serial. See [example](https://github.com/RTduino/RTduino/tree/master/examples/USBSerial). You may enable it if is needed.
|
|
|
+
|
|
|
+```Kconfig
|
|
|
+RT-Thread online packages --->
|
|
|
+ Arduino libraries --->
|
|
|
+ [*] RTduino: Arduino Ecological Compatibility Layer
|
|
|
+ [*] Enable USB Serial
|
|
|
+```
|