Skip to content

LispEngineer/stm-f7-spi-display

Repository files navigation

STM32 SPI Display Demo

  • Author: Douglas P. Fields, Jr.
  • Date: 2024-11-09
  • Copyright 2024 Douglas P. Fields, Jr.
  • License: MIT (as per original SPI code)
    • Portions from STM/STM code generation

Goals:

  • Make an ILI9341 display work on a Nucleo-F767ZI board.
  • Improve performance of original code

Software Used

Hardware

Other possibilities:

Nucleo-144 Pinout

See STM UM1974 Rev 10 page 32 section 6.13

D13 PA5  SPI1_SCK
D12 PA6  SPI1_MISO
D51 PD7  SPI1_MOSI
D10 PD14 SPI1_DC
D9  PD15 SPI1_CS
D8  PF12 SPI1_RESET

Display non-data connections

  • VCC - 5V
  • GND - GND
  • LED - 3.3V (backlight, instructions say use 100 ohm resistor)

Software Notes

Chip configuration

  • NVIC
    • SPI1 Global Interrupt: Enable
  • SPI1

Doug's notes

  • This is really slow
    • Area fills call the HAL 2 bytes at a time
    • There is no DMA or sending buffer
  • The image dump is really fast due to a single HAL call
  • I don't readily see how this can be easily done with DMA given the need to toggle the CS and CD GPIOs occasionally and in sync with the SPI data

TODO

  • Figure out how to use 8-bit color so we can double the speed of the I/O we do with bitmaps
    • DOesn't seem to be a way to do this
  • Use a smaller pixel buffer than 320x240x2 bytes (150k)
    • Maybe use an Nk buffer and loop through it when needed
    • But at least big enough for a decent font size like 16x26 which is 832 bytes
    • I was thinking more like 16k or 8k pixels
      • This would require 19 writes to blank the whole screen
  • Rewrite this all with queues and DMA
    • Have reusable buffers
    • Have callbacks when requests are completed

About

Get an SPI display working with STM32F7xx board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages