Go Down

Topic: [solved] OTM8009A 4.7 inch TFT : a too optimistic buy? (Read 2095 times) previous topic - next topic

ZinggJM

This TFT looked interesting, so I bought it - without first searching for information.

https://www.aliexpress.com/item/IPS-4-7-inch-40PIN-16M-TFT-LCD-Module-OTM8009A-Drive-IC-8-16Bit-8080-Interface/32638122740.html

It seems to be known in the STM32 community - I will search there also - but most information found by google is with Asian letters.

I found one library for "Arduino", but have not yet found out for which package this library is.

A closer look reveals it is for STAR OTTO, so this is one more thing for me to learn about.

https://github.com/arduino-org/arduino-library-graphics

This post serves the following purposes:

- as a warning until more information is found

- as a request for help and information

- as a place to report any findings
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

david_prentice

It looks like a regular MIPI controller with standard User commands.

Yes,  the Manufacturer commands look fairly complex.   But you only need to use them in setup() e.g. your tft.begin() method.

The library link seems to have an indecipherable "OTM8009A_Init" method.
You have bought the display.  You can try to follow it.

As a general rule,   you should execute a proven init by using / adapting the existing code.
Hand-editing is prone to typos.

David.

ZinggJM

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)

Code: [Select]
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.


Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

ZinggJM

I found a newer version of the library, which reveals more:

https://github.com/alfran/arduino-library-graphics/tree/rev_1.2


Code: [Select]
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.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

david_prentice

Go on.   You have experience with an SSD1963 and 8080-16 interface.

Most MIPI controllers will start up by themselves.   Ok,  you might want to adjust Manufacturer Power and Panel registers.

I have no knowledge about Star Otto.

David.

ZinggJM

#5
Aug 15, 2017, 01:44 pm Last Edit: Aug 16, 2017, 05:56 pm by ZinggJM
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:

http://www.arduino.org/forums/star

see also: https://forum.arduino.cc/index.php?topic=479484.0
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

ZinggJM

This display matches the FSMC TFT connector of the STM32F407ZG-M4 board:
STM32F407ZGT6-Development-Board-ARM-M4-STM32F4-cortex-M4-core-Board-Compatibility-Multiple-Extension
But needs addition of 5V to the 5V pin for backlight (NC on STM32 board).

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.

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Mode30

Hi, 
Can you  post a working example code for ips 3.97 inches  HD TFT LCD display  OTM8009A please?


ZinggJM

#8
Jun 23, 2019, 02:48 pm Last Edit: Jun 23, 2019, 05:51 pm by ZinggJM Reason: other example
Hi,  
Can you  post a working example code for ips 3.97 inches  HD TFT LCD display  OTM8009A please?


https://github.com/ZinggJM/GxTFT/tree/master/examples/GxTFT_FSMC_STM32F407ZGM4

sorry, wrong example, use:

https://github.com/ZinggJM/GxTFT/tree/master/examples/GxTFT_myTFTs_graphicstest

and select:

Code: [Select]
#include "myTFTs/my_3.97_800x480_OTM8009A_STM32F407ZGM4_FSMC.h"

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Mode30

Thanks, ZinggJM
My display is on its way.ill update everything when I receive it and do the test.

Regards

ZinggJM

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).
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

ZinggJM

No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Go Up