Yes, of course I try to copy/use any existing code I find, especially for init code.
And I try to find out how the display could be connected by looking at existing libraries, unless this is hidden too deep in a hardware abstraction layer, as is often the case with STM32.
STAR OTTO looks interesting, too, but what is the state of the project, is it available?
I installed the package, but get strange error messages when compiling with the above library:
(added here just for fun)
Arduino: 1.8.3 (Windows 10), Board: "Arduino Star OTTO"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ZinggJ\AppData\Local\Arduino15\packages -hardware C:\Users\ZinggJ\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ZinggJ\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ZinggJ\Documents\Arduino\libraries -fqbn=arduino:stm32f4:star_otto -ide-version=10803 -build-path C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_361511 -warnings=none -build-cache C:\Users\ZinggJ\AppData\Local\Temp\arduino_cache_100330 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.dfu-util.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.9.0-arduino1 -prefs=runtime.tools.arduinoSTM32load.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\arduinoSTM32load\2.0.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -verbose C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics\examples\agfx_test\agfx_test.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ZinggJ\AppData\Local\Arduino15\packages -hardware C:\Users\ZinggJ\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ZinggJ\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ZinggJ\Documents\Arduino\libraries -fqbn=arduino:stm32f4:star_otto -ide-version=10803 -build-path C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_361511 -warnings=none -build-cache C:\Users\ZinggJ\AppData\Local\Temp\arduino_cache_100330 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.dfu-util.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.9.0-arduino1 -prefs=runtime.tools.arduinoSTM32load.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\arduinoSTM32load\2.0.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -verbose C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics\examples\agfx_test\agfx_test.ino
Using board 'star_otto' from platform in folder: C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\hardware\stm32f4\1.0.1
Using core 'arduino' from platform in folder: C:\Users\ZinggJ\AppData\Local\Arduino15\packages\arduino\hardware\stm32f4\1.0.1
WARNING: Category '' in library AGFX is not valid. Setting to 'Uncategorized'
Detecting libraries used...
...removed (too long)
Missing 'maintainer' from library in C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics
Using library arduino-library-graphics at version 0.1 in folder: C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics
Error compiling for board Arduino Star OTTO.
I found a newer version of the library, which reveals more:
Arduino: 1.8.3 (Windows 10), Board: "Arduino Star OTTO"
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:32:1: error: unknown type name 'SDRAM_HandleTypeDef'
static SDRAM_HandleTypeDef sdramHandle;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:91:26: error: unknown type name 'SDRAM_HandleTypeDef'
static void LowLevelInit(SDRAM_HandleTypeDef *hsdram)
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c: In function 'STAR_SDRAM_Init':
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:205:16: error: request for member 'Instance' in something not a structure or union
sdramHandle.Instance = FMC_SDRAM_DEVICE;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:216:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.SDBank = FMC_SDRAM_BANK1;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:217:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:218:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:219:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:220:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.SDClockPeriod = FMC_SDRAM_CLOCK_PERIOD_2;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:221:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:222:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:228:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:229:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16;
^
C:\Users\ZinggJ\Documents\Arduino\libraries\arduino-library-graphics-rev_1.2\src\star_sdram.c:230:16: error: request for member 'Init' in something not a structure or union
sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
^
exit status 1
Error compiling for board Arduino Star OTTO.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
looks like the STAR OTTO display connector uses FSMC.
Unfortunately the pinout of my TFT does not correspond to the black STM32F407 boards.
Thank you David! Yes, of course I continue. My post helped me on the way to get ideas.
The inking on the board at the side of the connector is a bit hard to read, but I found out that most pins correspond to the pins of my 5 inch "Tiky" display, from same supplier.
So my first wiring will be through a long tail connector with some bent pins to the STM32F103VT6 board that matches with the "Tiky" display.
And so, as I had hoped for, I found another display that matches (nearly) to a FSMC connector, but not for the board I had in mind.
Jean-Marc
Addendum:
As I may have contributed to the confusion about STAR OTTO:
is seems not yet available for the general buyer
it is from Arduino.org, which is NOT the same as Arduino.cc, and has its own Forum:
It needs 16bit command transfers, named "(MDDI/SPI) Address" in some version of OTM8009A.pdf
I received driver source examples for STM32 and C51 from the supplier.
And added the controller class GxCTRL_OTM8009A_RV047 to my GxTFT library.
This controller class is display specific because of the special init sequence and 16bit commands.
I have updated GxTFT with more support for OTM8009A 16 bit parallel interface mode.
I have added 16 bit command transfers to all GxIO classes for parallel 16 bit interfaces.
I give up to try to support 8 bit parallel interface mode; there is insufficient information available.
(I have seen some source code for STM32 for 8 bit, but this seems to be for MIPI-DSI).
Yes, it has been used on Arduino Due with GxIO_DUE_P16_DUESHIELD or GxIO_DUE_P16_R_SHIELD, therefore it should be able to be used with GxIO_MEGA_P16_MEGASHIELD on Arduino MEGA.
Either with a corresponding wiring, or by adapting the wiring in the IO class.
Caution: carefully check the wiring; I don't remember if I used a long-tail header with bent legs and separate power connection for this.
But does this make sense? You don't get the speed FSMC would allow, and speed with be low because of bit-shuffling.
Unfortunately I am too busy now to help you with this.