adafruit_feather_stm32f405_express
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
adafruit_feather_stm32f405_express [2020/06/09 23:36] – [PlatformIO] 192.168.19.1 | adafruit_feather_stm32f405_express [2023/03/19 21:35] (Version actuelle) – [USART] 192.168.19.1 | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Carte de développement au Adafruit comprenant un micro-contrôleur STM32F405. | Carte de développement au Adafruit comprenant un micro-contrôleur STM32F405. | ||
+ | |||
+ | {{:: | ||
+ | |||
+ | ===== Pinout ===== | ||
+ | |||
+ | Il n'y a pas de schéma de pinout classique sur le net pour cette board, donc je vais faire ça à la main. | ||
+ | La première colonne correspond au label présent sur le pin correspondant de la board. | ||
+ | |||
+ | ^ Pin label ^ Names ^ Use ^ Alternate Use | | ||
+ | | RST | Reset | xx | xx | | ||
+ | | 3.3 | 3.3V | xx | xx | | ||
+ | | 3.3 | 3.3V | xx | xx | | ||
+ | | GND | Ground | ||
+ | | A0 | A0 / GPIO 16 / PA4 | xx | xx | | ||
+ | | A1 | A1 / GPIO 17 / PA5 | xx | xx | | ||
+ | | A2 | A2 / GPIO18 / PA6 | xx | xx | | ||
+ | | A3 | A3 / GPIO19 / PA7 | xx | xx | | ||
+ | | A4 | A4 / GPIO20 / PC4 | xx | xx | | ||
+ | | A5 | A5 / GPIO21 / PC5| xx | xx | | ||
+ | | SCK | SCK / GPIO23 / PB13 | xx | I2S2 Clock, CAN2 TX | | ||
+ | | MO | MOSI / GPIO25 / PB15 | xx | I2S2 SD | | ||
+ | | MI | MISO / GPIO24 / PB14 | xx | I2S2ext SD | | ||
+ | | RX | RX / GPIO 0 / PB11 | xx | I2C2 SDA | | ||
+ | | TX | TX / GPIO 1 / PB10 | xx | I2C2 SCL | | ||
+ | | B0 | xx | xx | xx | | ||
+ | | Bat | xx | xx | xx | | ||
+ | | En | xx | xx | xx | | ||
+ | | USB | xx | xx | xx | | ||
+ | | 13 | GPIO 13 / PC1 | Connected to the red LED next to the USB jack | No PWM or alternate uses | | ||
+ | | 12 | GPIO 12 / PC2 | xx | I2S2ext SD, SPI2 MISO | | ||
+ | | 11 | GPIO 11 / PC3 | xx | I2S2 SD, SPI2 MOSI | | ||
+ | | 10 | GPIO 10 / PB9 | xx | CAN1 TX, I2C1 SDA | | ||
+ | | 9 | GPIO 9 / PB8 | xx | CAN1 RX, I2C1 SCL | | ||
+ | | 6 | GPIO 6 / PC6 | xx | USART6 TX, I2S2 MCK | | ||
+ | | 5 | GPIO 5 / PC7 | xx | USART6 RX, I2S3 MCK | | ||
+ | | SCL | SCL / GPIO 15 / PB6 | xx | USART1 TX, CAN2 TX | | ||
+ | | SDA | SDA / GPIO 14 / PB7 | xx | USART1 RX | | ||
+ | |||
+ | |||
+ | ===== LED NeoPixel ===== | ||
+ | |||
+ | La LED NeoPixel est supportée par la librairie Adafruit NeoPixel. Utiliser le pin 8 (Arduino) pour l' | ||
+ | |||
+ | ==== Library / Dépendence ==== | ||
+ | |||
+ | Dans '' | ||
+ | |||
+ | ==== Code typique ==== | ||
+ | |||
+ | <code cpp> | ||
+ | #include < | ||
+ | |||
+ | #define NPX_PIN 8 | ||
+ | |||
+ | Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, | ||
+ | |||
+ | strip.begin(); | ||
+ | |||
+ | uint32_t color = strip.Color(128, | ||
+ | strip.setPixelColor(0, | ||
+ | strip.show(); | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Port STEMMA QT / Qwiic ===== | ||
+ | |||
+ | A la base, c'est une extension I2C (SCL/ | ||
+ | => Wiring, de haut en bas (cf photo début de page) : | ||
+ | * SCL / UART1.TX | ||
+ | * SDA / UART1.RX | ||
+ | * 3.3V | ||
+ | * GND | ||
+ | |||
+ | |||
+ | ===== USART ===== | ||
+ | |||
+ | IL existe 3 USART sur cette board : | ||
+ | * USART1 RX=" | ||
+ | * USART3 RX=" | ||
+ | * USART6 RX=" | ||
+ | |||
+ | C'est bien **USART3** qui est utilisé pour le serial USB, et non l' | ||
+ | |||
+ | On utilisera la variable '' | ||
+ | |||
+ | Donc pour utiliser, par exemple, l' | ||
+ | |||
+ | <code cpp> | ||
+ | HardwareSerial ser1 = HardwareSerial(SDA, | ||
+ | HardwareSerial ser6 = HardwareSerial(5, | ||
+ | </ | ||
===== PlatformIO ===== | ===== PlatformIO ===== | ||
Ligne 7: | Ligne 98: | ||
Pour un usage correct avec platform.io (Upload + Monitor), il est nécessaire que le fichier platformio.ini du projet soit configuré de manière spécifique, | Pour un usage correct avec platform.io (Upload + Monitor), il est nécessaire que le fichier platformio.ini du projet soit configuré de manière spécifique, | ||
- | ```ini | + | < |
[env: | [env: | ||
platform = ststm32 | platform = ststm32 | ||
Ligne 22: | Ligne 113: | ||
lib_deps = | lib_deps = | ||
| | ||
- | + | </ | |
- | ``` | + | |
adafruit_feather_stm32f405_express.1591738575.txt.gz · Dernière modification : 2020/06/09 23:36 de 192.168.19.1