stm32f429 tft lcd ili9341 factory
STM32F429 has also LTDC driver for LCD like that, but this driver we will use later. For now we will use SPI for driving in serial mode and some other pins for controlling.
Remember: This library can also be used, if you are not using STM32F429 Discovery. It can be used in previous STM32F4 Discovery board. All pins can be changed in defines.h file which is included in project.
You can refer to the examples under STM32CubeF4 package to see their structure and get inspired from them to configure your files: STM32Cube_FW_F4_V1.21.0\Projects\STM32F429I-Discovery\Applications\STemWin
ARM Cortex-M4 32b MCU+FPU, 225DMIPS, up to 2MB Flash/256+4KB RAM, USB OTG HS/FS, Ethernet, 17 TIMs, 3 ADCs, 20 comm. interfaces, camera & LCD-TFT, Adaptive real-time accelerator (ART AcceleratorTM) allowing 0-wait state execution from Flash memory, frequency up to 180 MHz, and DSP instructions
I have tried to compile the example file GxTFT_FSMC_BlackSTM32F407V.ino. The necessary assisting files should be in place including STM32GENERIC in the hardware folder. After having worked for quite some time Arduino IDE stops with an error message. I list the last page of the verbose output:
"C:\Users\Peas\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DF_CPU=168000000L -mthumb -DSTM32GENERIC -DRAM_LENGTH=131072 -DFLASH_LENGTH=524288 -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD -DSTM32F4 -DARDUINO=10807 -DARDUINO_BLACK_F407VE -DARDUINO_ARCH_STM32 -DSTM32F407VE -DHSE_VALUE=8000000 -DMENU_SERIAL_AUTO=SerialUSB "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino/stm32" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino/usb" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/CMSIS" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/CMSIS_Inc" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/CMSIS_Src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/HAL_Inc" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/HAL_Src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/stm32_chip" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\variants\BLACK_F407VE" "-IC:\Users\Peas\Documents\Arduino\libraries\GxTFT\src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\libraries\SPI\src" "-IC:\Users\Peas\Documents\Arduino\libraries\Adafruit_GFX_Library" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\libraries\stm32_dma\src" "C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp" -o "C:\Users\Peas\AppData\Local\Temp\arduino_build_724464\libraries\GxTFT\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp.o"
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp: In constructor "GxIO_STM32F407ZGM4_FSMC::GxIO_STM32F407ZGM4_FSMC(bool)":
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp:97:11: error: "PG12" was not declared in this scope
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp:98:11: error: "PG0" was not declared in this scope
It has 40 pins interface and SD card and Flash reader design. It is a powerful and mutilfunctional module for your project. The Screen include a controller ILI9341, it"s a support 8/16 bit data interface , easy to drive by many MCU like arduino families? STM32, AVR and 8051. It is designed with a touch controller in it . The touch IC is XPT2046 , and touch interface is included in the 40 pins breakout. It is the version of product only with touch screen and touch controller.
262K color320*2403.2 inchWide viewing angleILI9341 : 320 TFT Driver X 240 RGBIntegrated Power, Gate and Source Driver With RAMXPT2046-WIRE TOUCH,WIRE TOUCH, UP TO 125kHz CONVERSION RATE, SERIAL INTERFACEVoltage type : 5v or 3v voltage input voltage?input is selectable. Because TFT can only work under 3.3 V voltage, so when the input voltage VIN is 5V, need through the 3.3 V voltage regulator IC step down to 3.3V , when the input voltage of 3.3 V, you need to use the zero resistance make J2 short , is equivalent to not through the voltage regulator IC for module and power supply directly.Note: the factory TFT module, are the 5 v power supply. By default.Carrying on board SD holder, its work to SPI mode.By the use of Stylus we can write anything on Display.
Please see the DT028CTFT for reference designs. The schematics between the A and the C are the same with the exception that the A does not have the IPS interface.
IMPORTANT The touchscreen has a maximum frequency of 2MHz, which is probably slower than you want your TFT SPI clock. So in the routine that reads touch coordinates (ili9341_touch_pressed_t ili9341_touch_coordinate(ili9341_t *,uint16_t *,uint16_t *) in ILI9341/ili9341.c), make sure to adjust the lines that modify the SPI clock so that your baud rate is less than 2MHz before communicating with the touchscreen (e.g. MODIFY_REG(lcd->spi_hal->Instance->CR1, SPI_CR1_BR, SPI_BAUDRATEPRESCALER_128)), and then restored to whatever setting you use here immedaitely afterwards. See the comments in that source file for both locations.
If using the touchscreen, you will probably want to set Hardware NSSP=Disabled (slave/chip-select) in favor of a software implementation, since you will need one signal for the TFT and a separate one for the touchscreen. Any two unused GPIO digital output pins will work.
If using the touchscreen, override the EXTI callback (void HAL_GPIO_EXTI_Callback(uint16_t)) somewhere in your application code and call ili9341_touch_interrupt(ili9341_t *) from inside that callback.