Not able to start display on Matrix Orbital EVE3-50A-TPN

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
alphaaviral
LCD?
Posts: 2
Joined: Sun Oct 03, 2021 3:34 am

Not able to start display on Matrix Orbital EVE3-50A-TPN

Post by alphaaviral »

Hi,

I am using STM32F429ZIT as the SPI host for my EVE3-50A-TPN display. I have migrated the code at https://github.com/MatrixOrbital/Basic-EVE-Demo-STM32 to fit my connections and MCU.

Connections-
I have connected the power, ground, CLK, MISO, MOSI, RST and CS_N accordingly. I've however left the other pins including the pins for powering the backlight disconnected (as they are optional).

The issue-
I am able to read 0x7C from REG_ID register. I am also able to read 0x00 from REG_CPU_RESET. However, on executing the code further, the display is not coming on even after writing a display list to RAM_DL.

Here's my code-

Code: Select all

	//rd8 is reading 8 bits from given address
	//wr8 is writing 8 bits to given address

	HostCommand(HCMD_CLKINT)
	HostCommand(HCMD_ACTIVE);
	HAL_Delay(1000);

	while(0x7C != rd8(RAM_REG));
	while(0x0 != rd16(REG_CPU_RESET+RAM_REG));

	wr32(REG_FREQUENCY + RAM_REG, 0x3938700); // Configure the system clock to 60MHz

	// turn off screen output during startup
	wr8(REG_GPIOX + RAM_REG, 0);             // Set REG_GPIOX to 0 to turn off the LCD DISP signal
	wr8(REG_PCLK + RAM_REG, 0);              // Pixel Clock Output disable

	// load parameters of the physical screen to the Eve
	// All of these registers are 32 bits, but most bits are reserved, so only write what is actually used
	
	wr16(REG_HCYCLE + RAM_REG, HCYCLE);                    // Set H_Cycle to 928
	wr16(REG_HOFFSET + RAM_REG, HOFFSET);                 // Set H_Offset to 88
	wr16(REG_HSYNC0 + RAM_REG, HSYNC0);                    // Set H_SYNC_0 to 0
	wr16(REG_HSYNC1 + RAM_REG, HSYNC1);                    // Set H_SYNC_1 to 48
	wr16(REG_VCYCLE + RAM_REG, VCYCLE);                    // Set V_Cycle to 525
	wr16(REG_VOFFSET + RAM_REG, VOFFSET);                 // Set V_OFFSET to 32
	wr16(REG_VSYNC0 + RAM_REG, VSYNC0);                    // Set V_SYNC_0 to 0
	wr16(REG_VSYNC1 + RAM_REG, VSYNC1);                    // Set V_SYNC_1 to 3
	wr8(REG_SWIZZLE + RAM_REG, SWIZZLE);                   // Set SWIZZLE to 0
	wr8(REG_PCLK_POL + RAM_REG, PCLK_POL);              // Set PCLK_POL to 1
	wr16(REG_HSIZE + RAM_REG, HSIZE);                         // Set H_SIZE to 800
	wr16(REG_VSIZE + RAM_REG, VSIZE);                         // Set V_SIZE to 480
	wr8(REG_CSPREAD + RAM_REG, CSPREAD);                 // Set CSPREAD to 0  
	wr8(REG_DITHER + RAM_REG, DITHER);                     // Set DITHER to 1     
        
        wr16(REG_TOUCH_RZTHRESH + RAM_REG, 1200);      // set touch resistance threshold
        wr8(REG_TOUCH_MODE + RAM_REG, 0x02);              // set touch on: continuous - this is default
        wr8(REG_TOUCH_ADC_MODE + RAM_REG, 0x01);      // set ADC mode: differential - this is default
        wr8(REG_TOUCH_OVERSAMPLE + RAM_REG, 15);      // set touch oversampling to max

 	wr16(REG_GPIOX_DIR + RAM_REG, 0x8000);             // Set Disp GPIO Direction 
        wr16(REG_GPIOX + RAM_REG, 0x8000);                 // Enable Disp (if used)

  	wr16(REG_PWM_HZ + RAM_REG, 0x00FA);                // Backlight PWM frequency

	wr8(REG_PWM_DUTY + RAM_REG, 32);                  // Backlight PWM duty (on)

  	// write first display list (which is a clear and blank screen)
 	wr32(RAM_DL+0, CLEAR_COLOR_RGB(0,0,0));
	wr32(RAM_DL+4, CLEAR(1,1,1));
  	wr32(RAM_DL+8, DISPLAY());
  	wr8(REG_DLSWAP + RAM_REG, DLSWAP_FRAME);          // swap display lists
  	wr8(REG_PCLK + RAM_REG, PCLK);                              // after this display  should be visible on the LCD (However it is not)

The behaviour of the code is rather erratic. On reading the registers to which I have written a value (eg - REG_HCYCLE), I am sometimes getting the value I have written and I am getting a random value at other times.

I will appreciate any help I can get to get my LCD running.
Thanks!

Raquel
Matrix Orbital
Matrix Orbital
Posts: 805
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: Not able to start display on Matrix Orbital EVE3-50A-TPN

Post by Raquel »

Hello Aviral,

Thank you for posting on the forum.

I have replied to your enquiry directly, but I will also post it here.

The quickest way to check the EVE3-50A-TPN hardware is to connect to the PC via the USB2SPI bridge.
Try this demo out: https://github.com/MatrixOrbital/Basic-EVE-Demo

As for your STM32 connection, it looks like you have enough for communication, but try to also connect power on pins 16/15 (VCC and GND). You may leave the backlight connections off.
Some things you want to confirm:
- make sure you are writing the correct display timings
- slow down the SPI bus to see if that changes code behavior
- scope out your signals
Hope these help.
Raquel Malinis
Design and Development
Matrix Orbital

Rudolph
LCD Guru
Posts: 67
Joined: Wed Feb 28, 2018 11:09 am

Re: Not able to start display on Matrix Orbital EVE3-50A-TPN

Post by Rudolph »

I received an EMail from this forum regarding the EVE3-50A and am a bit puzzled by this message.
Not by the content but by the way it is presented to me.
There does not seem to be a way to directly answer the EMail in order to reach out to the one who sent it.

Anyways, I am hoping I am in the right thread to answer the inquiry. :-)
The first part was where my EVE library is, it is here: https://github.com/RudolphRiedel/FT800-FT813
Actually helping with using the STM32F429ZIT to display images on the EVE3-50A is somewhat tricky for me though
since I am not actively using any STM32 controller.

I do have an example for Arduino though: https://github.com/RudolphRiedel/FT800- ... PlatformIO
And among the 15 different boards it builds now there is the nucleo_f446re board which is doing SPI over DMA with HAL code in EVE_target.cpp.

Additionally there is this thread: https://github.com/RudolphRiedel/FT800- ... ussions/25
There is a EVE_Test_STM32_RiTFT50.zip which contains an now older PlatformIO project that builds across several STM32 for stm32cube:
STM32L073 SUCCESS 00:00:01.056
STM32F030 SUCCESS 00:00:01.002
STM32F103 SUCCESS 00:00:01.026
STM32F303 SUCCESS 00:00:01.134
STM32F446 SUCCESS 00:00:01.436
STM32G474 SUCCESS 00:00:01.163
STM32G431 SUCCESS 00:00:01.182
nucleo_f439zi SUCCESS 00:00:01.426

This is however non-functional as I have not figured out a way to make a SystemClock_Config() that would work across several boards.
So it builds and has all the code in place to use the SPI but there is no code in place to actually initialise the chip.

Doing better support for STM32 is on my to-do list but there are very few STM32 I would consider using for a project.
And these I would like to try out are currently not available anywhere.

Post Reply