C
STM32F769I Discovery Kit
This topic provides you the necessary information about STM's STM32F769I discovery kit.
Board features
- STM32F769NIH6 MCU (ARM Cortex-M7)
- 4” capacitive touch LCD display (800x480)
- 512+16+4 Kbytes of RAM
- 128-Mbit SDRAM
- 2 MB Flash memory
- 512-Mbit Quad-SPI NOR Flash memory
More information fromSTM32F769I Discovery Website
Supported color depths
The reference port for this board supports 32bpp color depth. The board also supports 16bpp and 24bpp, but they are not implemented in the reference port. See QUL_COLOR_DEPTH and Color depth for more information.
Partial framebuffer support
This board supports the partial framebuffer strategy. To enable it, set QUL_PLATFORM_PARTIAL_FRAMEBUFFER and rebuild the Platform library.
Using the partial framebuffer can significantly lower the memory requirements of an application, but can lead to reduced performance and potential visual tearing artifacts for complex applications.
Tearing
The display has its own frame memory. With the default full framebuffer, the platform port sends each finished frame to it over the DSI link, timed by the display's tearing effect signal so that it never shows a partly written frame. The LCD-TFT controller (LTDC) reads the frame out of SDRAM and streams it to the DSI host.
The LTDC runs at 34.75 MHz, well below the 41.66 Mpixel/s that the two DSI lanes carry at 500 Mbit/s in RGB888. Keep that margin if you change the LTDC clock, the DSI lane rate, or the color format. With the LTDC at or just below the link rate, SDRAM traffic from the application while a frame is being sent can shift the rest of a row sideways on the display, which looks like tearing. No error flag is raised. On this board, 41.7 MHz and 39.7 MHz both showed it under load, and 34.75 MHz did not. To check a clock configuration, run an application that takes longer to draw a frame than the display takes to refresh, with full-screen transitions of content with vertical edges, and watch for rows that are displaced sideways.
The LTDC clock must not be too low either. The display refreshes its frame memory one vertical line at a time, from the left edge of the screen to the right, so with the default full framebuffer the port sends the left half of each frame while the display shows the right half, and the other way round. The tearing effect scanline in platform_display.cpp is chosen for 34.75 MHz, at which sending a full-height half takes 5.7 ms, and the left half has a 6.2 ms window before the display wraps around to the left area. At a lower clock, move that scanline earlier; the port computes how long a half takes from the clock set in setLcdClockConfiguration(). The partial framebuffer configuration sends one rectangle per refresh instead, with its own scanline, and this timing does not apply to it.
SDRAM traffic still costs drawing time. The renderer reads the SparkCache and GlyphLayoutCache allocations for every glyph it draws, and a port can serve those from internal memory instead; see Memory allocation in Qt Quick Ultralite platform abstraction.
Where to place them is a trade-off between internal RAM and drawing time, and the gain grows with the amount of text drawn per frame. Measured on this board with a full screen of scrolling Tamil text, a heavy case, and no text cache: with about 100 KB of glyph caches in internal memory it draws at 61 fps (15.6 ms per frame), and at 51 fps (17.2 ms) with them in SDRAM. Neither tears. Measure your own application before giving up internal RAM for them.
Reading debug messages
By default, the output of qul_printf and Qul::PlatformInterface::log calls are redirected to STLink virtual COM Port, which is exposed on the host machine via USB. The serial configuration is the following:
Baud rate: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow control: NoneHardware acceleration
The reference port utilizes the STMicroelectronics Chrom-Art Accelerator (DMA2D) for hardware accelerated graphics.
DMA2D is a specialized direct memory access (DMA) accelerator dedicated to image manipulation. It can perform the following operations:
- Fill an image with a specific color.
- Copy a source image into a destination image.
- Copy a source image into a destination image with a pixel format conversion.
- Blend two complete source images with a different pixel formats and copy the result into a destination image with pixel format conversion.
All of the listed operations can be done for a part or whole image.
For more information, refer to STMicroelectronics' documentation:
- STM32F7 - Chrom-ART
- RM0410 Reference manual section Chrom-Art Accelerator controller (DMA2D).
Monotype data tables in QSPI
The reference linker scripts place the Monotype data tables in external Quad Serial Peripheral Interface (QSPI) flash, as explained in Placing Monotype data tables in external flash.
In the Qt Quick Ultralite Thermostat Demo, Qul::validateMonotypeDataTableChecksums() is called to validate the data tables. It is up to the application to decide whether to keep these data tables in internal or external flash, and whether to perform data validation.
Hardware configuration
STM32CubeMX
The hardware configuration for the STM32f769I-DISCOVERY board is comprised of STM32CubeMX generated code and peripheral BSP drivers from the STM32Cube MCU Package for STM32F7 series repository.
All the STM32CubeMX generated code (except the system clock configuration) is located in the stm32f769i-discovery-common/3rdparty/Core folder. The folder includes configurations for:
- GPIO -
gpio.c - UART -
uart.c - System timer -
stm32f7xx_hal_timebase_tim.c - Interrupt routines -
stm32f7xx_it.c
System clock configuration
The system clock configuration is located in Qt Quick Ultralite platform source file stm32f769i-discovery-common/platform_clock.cpp. The SystemClock_Config() function is declared weak, so that it can be overridden by a custom clock configuration.
System tick timer
The TIM6 timer instance is used as the systick timer. The initialization function is located in the STM32CubeMX generated source file stm32f769i-discovery-common/3rdparty/Core/Src/stm32f7xx_hal_timebase_tim.c.
Display timer
With the default full framebuffer, the TIM7 timer instance and its interrupt time when each half of a frame is sent to the display, as described in the Tearing section. The application must not use or reconfigure TIM7, or define its own TIM7_IRQHandler(). The timer is initialized in initializePanelTimer() in the Qt Quick Ultralite platform source file stm32f769i-discovery-common/platform_display.cpp. The partial framebuffer configuration does not use TIM7.
Interrupt handlers
The interrupt handlers are located in Qt Quick Ultralite platform source file stm32f769i-discovery-common/3rdparty/Core/Src/stm32f7xx_it.c. Also, the display related DSI interrupt callbacks, the TIM7 interrupt handler, and touch interrupt pin callback are present in Qt Quick Ultralite platform source file stm32f769i-discovery-common/platform_irq.cpp.
Quad serial peripheral interface (QSPI)
For the QSPI configuration, check BSP_QSPI_Init() for peripheral settings and BSP_QSPI_MspInit() for pinout/clock configuration from the Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_qspi.c file of STM32Cube MCU package repository.
SDRAM
The SDRAM configuration is located in the STM32Cube MCU package repository file Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_sdram.c.
Touch panel
The I2C1 hardware instance is used as a communication interface for the touch controller IC. The I2C configuration for the touch panel IC is located in the STM32Cube MCU package repository path (Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery.c). The I2Cx_Init() function contains the required configurations for I2C.
Display
You can find the display configurations (LTDC and DSI interface configuration) in Qt Quick Ultralite platform source file stm32f769i-discovery-common/platform_display.cpp. For more information on the display configurations, see the initializeLcdPeripherals() function.
The clock settings for LTDC are given by the setLcdClockConfiguration() function, while the DSI clock configurations are given by the setDsiPllConfiguration() function. The BSP_LCD_MspInit() function, located in the STM32Cube MCU package repository file Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_lcd.c, contains the general purpose input/output (GPIO) as well as the interrupts and exceptions (NVIC) settings for the LTDC, DMA2D and DSI interfaces.
Random number generator (RNG)
You can find the RNG peripheral initialization in Qt Quick Ultralite platform source file platform/boards/st/common/platform_rng.cpp.
USART
The USART1 hardware instance is used for logs over the virtual COM port. You can find the peripheral configuration in Qt Quick Ultralite platform source file stm32f769i-discovery-common/3rdparty/Core/Src/uart.c. The clock settings are defined in the SystemClock_Config() function of the Qt Quick Ultralite platform source file stm32f769i-discovery-common/platform_clock.cpp.
Known issues or limitations
Due to limited SDRAM bandwidth, accessing SDRAM with the CPU may cause visual artifacts while the framebuffer is being scanned by the display controller, due to LTDC FIFO Underrun. LTDC FIFO Underrun error may occur in applications that have a lot of UI elements and heavy animations, causing visual glitches. Apart from simplifying the UI, consider using a different build type for the Qt Quick Ultralite core library. For example, Debug or Release instead of MinSizeRel.
RLE decompression
The CPU on this board cannot blend compressed images directly onto the framebuffer in SDRAM. Such images are decompressed into intermediate buffers of a limited size, before blending them using DMA2D onto the framebuffer in SDRAM. This approach has a significant performance overhead to blend RLE-compressed images compared to the uncompressed images.
Performance can be improved to some degree by increasing the size of qul_scratch_buffer in platform_stm32.cpp, at the cost of more RAM usage.
Available under certain Qt licenses.
Find out more.