Boards / STM32

STM32F407 + ILI9341 SPI

Black pill / Discovery style wiring using SPI1 and an XPT2046 touch panel.

At a glance

MakerGeneric
MCUSTM32F4 (F401 / F407 / F411)
Cortex-M4F @ 84-180 MHz, 96-192 KB SRAM
DisplayIlitek ILI9341, 240 x 320 px, SPI (4-wire serial), 16-bit colour
TouchXPTek XPT2046 (resistive, SPI)
BacklightPB11, dimmable (PWM)
PSRAMNo
Graphics libraryLovyanGFX

Display pins

ILI9341 on SPI (4-wire serial): SPI clock 40 MHz, host VSPI, BGR colour order, inversion off.

SignalPin
SCK / CLKPA5
MOSI / SDAPA7
MISO / SDOPA6
CSPB0
DC / RSPB1
RESETPB10
BacklightPB11

Touch pins

XPT2046: 2000 kHz, shares the display bus.

SignalPin
SCKPA5
MOSIPA7
MISOPA6
CSPB12
IRQ / PENIRQPB13

Check your revision. Needs the STM32duino core. SPI1 pins are remappable - check your variant.

Designing for it in LCD Wizard

The parts

ILI9341. The most common hobby TFT. 2.2"-2.8" modules, usually with an XPT2046 resistive panel.

XPT2046. The classic 4-wire resistive controller. Needs calibration. Can share the display SPI bus with its own CS.

STM32F4 (F401 / F407 / F411). Use the STM32duino core. FSMC gives a fast parallel bus on F407 and up.

LovyanGFX. Widest panel and bus coverage, DMA on ESP32. Configured with a C++ config class.

Designs for this board

Nobody has published a design for this board yet. Publish yours from the designer and it appears here and in the gallery.

Next