====== Adafruit Feather STM32F405 Express ====== Carte de développement au Adafruit comprenant un micro-contrôleur STM32F405. {{::feather_boards_pinouts800.jpg|}} ===== 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 | xx | xx | | 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'instanciation. ==== Library / Dépendence ==== Dans ''platformio.ini'', ajouter la lib_dep suivante : ''adafruit/Adafruit NeoPixel'' ==== Code typique ==== #include #define NPX_PIN 8 Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, NPX_PIN, NEO_GRB + NEO_KHZ800); strip.begin(); uint32_t color = strip.Color(128, 128, 128); strip.setPixelColor(0, color); strip.show(); ===== Port STEMMA QT / Qwiic ===== A la base, c'est une extension I2C (SCL/SDA/3.3V/GND). Mais comme SCL/SDA peuvent être reparamétrés en RX/TX de l'USART1, ça peut devenir une extension Serial1 ! => 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="SDA" / TX="SCL" * USART3 RX="RX" / TX="TX" * USART6 RX="5" / TX="6" C'est bien **USART3** qui est utilisé pour le serial USB, et non l'USART1 ! On utilisera la variable ''SerialUSB''. Donc pour utiliser, par exemple, l'USART1, il suffit de créer un '' HardwareSerial '' de cette manière : HardwareSerial ser1 = HardwareSerial(SDA, SCL); HardwareSerial ser6 = HardwareSerial(5,6); ===== PlatformIO ===== 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, avec des build_flags tels qu'indiqué ci-dessous : [env:adafruit_feather_f405] platform = ststm32 board = adafruit_feather_f405 framework = arduino build_flags = -w -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC -D USBCON -D USBD_VID=0x0483 -D USB_MANUFACTURER="Unknown" -D USB_PRODUCT="\"FEATHER_F405\"" upload_protocol = dfu lib_deps = Adafruit NeoPixel ===== Liens Externes ===== Produit : https://adafru.it/4382 Information produit : https://learn.adafruit.com/adafruit-stm32f405-feather-express