RobertoBenjami/stm32_graphics_display_drivers

ILI9488 Hardware SPI not working (but software mode works)

DesmondZuo opened this issue · 3 comments

stm32_caplcd_test.zip

Hi RobertoBenjami!

I'm trying to use an ILI9488 screen and recently saw this library. It has been super helpful, thanks a lot for your effort!

However, I ran into an issue using hardware SPI. The whole project file is attached.

I set up the hardware SPI1 in CubeIDE and configured the lcd_io_spi.h, it will not work if I set the LCD_SPI to 1 (i.e. SPI1), however when I switch it to 0 and keep everything else, the code works.

I would really like to use hardware mode for DMA support. Could you help me to see whether I have done anything wrong during the configuration?

Best regards,
Desmond

There are several configuration errors:

  • no need to set spi in cubeide (causes a collision)
  • #define LCD_SPI_SPD_WRITE change 0 to 3
  • #define LCD_SPI_SPD_READ change 0 to 4
    (if already running the speed can be increased)
  • #define LCD_SPI_AFR 0 change to 5 (datasheet: table 9)

if you also want DMA:

  • #define LCD_DMA_TX 2, 3, 3, 0 (ref datasheet: table 28)
  • #define LCD_DMA_RX 2, 3, 2, 0 (ref datasheet: table 28)

Thank you very much!
Will try later and update if working

Hi!

It worked! Thanks a lot for helping!