[solved] OTM8009A 4.7 inch TFT : a too optimistic buy?

Topic created by Jean-Marc Zingg

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.

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

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.

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.

Jean-Marc

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.

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.

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:

see also: Hands-on with the Arduino Star OTTO Light - General Discussion - Arduino Forum

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.

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

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

sorry, wrong example, use:

and select:

#include "myTFTs/my_3.97_800x480_OTM8009A_STM32F407ZGM4_FSMC.h"

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

Regards

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).

I think I finally found some relevant information about this display here:

http://www.lcdwiki.com/3.97inch_16BIT_Module_OTM8009A_SKU:MRB3971

See also this post

Jean-Marc

Hello,

Any chance to use it with an Arduino MEGA 2560 ?

Regards,

Nicolas

Post created by Jean-Marc Zingg

My thanks and respect for David Prentice.

Hi Nicolas,

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.

Jean-Marc