Skip to content

SW example in charge of demonstrating the usage of the LTDC/HDMI converter on STM32N6 DK board

License

Notifications You must be signed in to change notification settings

stm32-hotspot/stm32n6570-dk-ltdc-to-hdmi

Repository files navigation

LTDC to HDMI with DCMIPP Preview Example

Important

This repository has been created using the git submodule command. Please refer to the "How to clone" section for more details.

This example demonstrates how to use the ADV7513 LTDC to HDMI adapter board (MB1227) to connect an HDMI display to the STM32N6570-DK board, replacing the MB1860B LCD board.

By default, the firmware is configured with an output resolution of 800x480 (WVGA) to get an identical display and layout between the LCD board and when using the HDMI adpater. For enhanced visualization or compatibility issues with different HDMI display, the output resolution can be configured to 720p (1280x720) or VGA (640x480) in main.c.

Hardware Support

  • STM32N6570-DK discovery board (MB1939-N6570-C02 Rev CR1).
    • Note: OTP for XSPI IOs must already be configured.
  • LTDC to HDMI board (MB1227B) connected to an HDMI display.
  • One of the following camera modules:

Hardware connection

The LTDC to HDMI adapter board (MB1227) serves as a replacement for the LCD display board (MB1860). Follow these steps to connect the adapter:

  1. Remove the LCD Display Board: Unscrew the LCD display board (MB1860) from its position.
  2. Connect the Flat Cable: Attach one end of the flat cable to the LCD socket CN3. Connect the other end of the flat cable to the HDMI adapter board (MB1227) as shown in the following picture. Ensure the cable orientation matches the picture.

Note the male-to-male adapter between the two flat cables to perform the required pin swap.

board

Software Environment

How to clone

This repository has been created using the git submodule command. Please check the instructions below for proper use.

  1. To clone this repository along with the linked submodules, option --recursive has to be specified as shown below.

    git clone --recursive https://github.com/STMicroelectronics/STM32N6570-DK-LTDC-to-HDMI.git

  2. To get the latest updates, in case this repository is already on your local machine, issue the following two commands (with this repository as the current working directory).

    git pull git submodule update --init --recursive

Quickstart

  • Set the boot mode in development mode (both boot switches BOOT0 & BOOT1 to the right).
  • Ensure HDMI cable is connected before running the firmware.
  • Open your preferred toolchain.
  • Rebuild all files and load your image into target memory. Code can be executed in this mode for debugging purposes.

Next, this program can be run in boot from flash mode. This is done by following the instructions below:

STM32_SigningTool_CLI -bin build/Project.bin -nk -t ssbl -hv 2.3 -o build/Project-signed.bin

export DKEL="<STM32CubeProgrammer_N6 Install Folder>/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr"
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w bin/ai_fsbl.hex
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w build/Project-signed.bin 0x70100000

Note: build/Project.bin path is for Makefile build, adapt to your environment.

  • Set the boot mode in boot from external Flash (both boot switches BOOT0 & BOOT1 to the right).
  • Press the reset button. The code then executes in boot from external Flash mode.

Limitations

  • No support for hot plug & cable reconnect.
  • Limited resolution options (WVGA, 720p, VGA).
  • No double buffering implemented in this example.

Tips for display compatibility issues

  • Experiment with different resolutions, HDMI pixel clock and timings.
  • Test using different HDMI displays.

Tips for bandwidth issues

  • Reduce the LTDC pixel clock (PCLK) frequency.
  • Use only one layer (disable foreground layer).
  • Play with DCMIPP IP-Plug and/or camera timings.
  • Avoid simultaneous PSRAM access with other hardware resources.

Resources

About

SW example in charge of demonstrating the usage of the LTDC/HDMI converter on STM32N6 DK board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published