Not able to start display on Matrix Orbital EVE3-50A-TPN
Posted: Sun Oct 03, 2021 4:14 am
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-
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!
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)
I will appreciate any help I can get to get my LCD running.
Thanks!