nopnop2002 / Arduino-STM32-8bitTFT

8bit parallel TFT Library for Arduino_Core_STM32
Apache License 2.0
15 stars 10 forks source link

16-bit mode with FSMC #7

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hey! I am using STM32F407VET6 board: https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0 This board has a 16-bit FSMC interface. This interface makes it easier to work with the TFT display and significantly speed up drawing on the display. I found the only library that works with this interface: https://github.com/stevstrong/Adafruit_TFTLCD_16bit_STM32 The library is running and the display shows an image. But this library only works with Arduino_STM32 core: https://github.com/rogerclarkmelbourne/Arduino_STM32 But this is not a complete core. Support for F407 series microcontrollers is very limited. Many functions do not work correctly or do not work at all. Arduino_Core_STM32 core is very good: https://github.com/stm32duino/Arduino_Core_STM32 But I did not find support for TFT displays with FSMC in it. Can you modify the library to support 16-bit displays with FSMC interface?

nopnop2002 commented 2 years ago

Hello.

I have this. https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0

But I have never used the 16-bit FSMC interface. As far as the following page is seen, it looks like a normal GPIO. https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0#TFT-LCD-header

I wonder why this library doesn't work on ST-CORE. https://github.com/stevstrong/Adafruit_TFTLCD_16bit_STM32

I'll check if it works too.

ghost commented 2 years ago

If I use the Adafruit_TFTLCD_16bit_STM32 library in conjunction with the Arduino_Core_STM32 core, then an error appears during compilation: fsmc.h file not found The Arduino_Core_STM32 core does not contain the fsmc.h file. I opened the Adafruit_TFTLCD_16bit_STM32.h library and removed the call to the fsmc.h file, but the following errors appear:

In file included from E:\Home Made\Создать\1 STM32 LCD шилд\graphicstest\graphicstest.ino:3: C:\Users\�����\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32\src/Adafruit_TFTLCD_16bit_STM32.h: In function 'void writeCommand(uint16_t)': C:\Users\�����\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32\src/Adafruit_TFTLCD_16bit_STM32.h:61:22: error: 'fsmcCommand' was not declared in this scope 61 | #define lcdCommand (*fsmcCommand) | ^~~~~~~~~~~ C:\Users\�����\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32\src/Adafruit_TFTLCD_16bit_STM32.h:65:25: note: in expansion of macro 'lcdCommand' 65 | #define writeCmd(d) { lcdCommand = d; } | ^~~~~~~~~~ C:\Users\�����\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32\src/Adafruit_TFTLCD_16bit_STM32.h:193:62: note: in expansion of macro 'writeCmd' 193 | void inline writeCommand(uint16_t c) { CS_ACTIVE_CD_COMMAND; writeCmd(c); } | ^~~~~~~~ exit status 1 Ошибка компиляции для платы Generic STM32F4 series.

nopnop2002 commented 2 years ago

FSMC is Flexible Static Memory Controller (FSMC) support.

FSMC is a function for connecting SRAM and FLASH to the outside of STM32. You can use FSMC to connect a parallel LCD.

It is a bug of this library that this library does not work on ST-CORE. https://github.com/stevstrong/Adafruit_TFTLCD_16bit_STM32

You should make a request. https://github.com/stevstrong/Adafruit_TFTLCD_16bit_STM32/issues

https://github.com/stm32duino/Arduino_Core_STM32/issues