cancel
Showing results for 
Search instead for 
Did you mean: 

does anybody have source code for LG4571 display (480 x 800)

MNapi
Senior III

there is nothing on  github.

 

there is initialization by SPI before the LTDC works

is there a sequence like you initialize it first over SPI then

MX_LTDC_Init() or it does not matter

I do have the initialization code but I am missing something

void SLGDP4571_Int(void)
{

SPI_WriteComm(0x20);

SPI_WriteComm(0x3A);
SPI_WriteData(0x70);

SPI_WriteComm(0xB1);
SPI_WriteData(0x10);
SPI_WriteData(0x14);
SPI_WriteData(0x06);

SPI_WriteComm(0xB2);
SPI_WriteData(0x00);
SPI_WriteData(0xC8);

SPI_WriteComm(0xB3);
SPI_WriteData(0x11);
SPI_WriteData(0xFF);

SPI_WriteComm(0xB4);
SPI_WriteData(0x10);

SPI_WriteComm(0xB6);
SPI_WriteData(0x08);
SPI_WriteData(0x18);
SPI_WriteData(0x02);
SPI_WriteData(0x40);
SPI_WriteData(0x10);

SPI_WriteComm(0xB7);
SPI_WriteData(0x00);
SPI_WriteData(0x10);
SPI_WriteData(0x01);

SPI_WriteComm(0xC3);
SPI_WriteData(0x04);
SPI_WriteData(0x05);
SPI_WriteData(0x04);
SPI_WriteData(0x04);
SPI_WriteData(0x01);

SPI_WriteComm(0xC4);
SPI_WriteData(0x22);
SPI_WriteData(0x03);
SPI_WriteData(0x00);
SPI_WriteData(0x1A);
SPI_WriteData(0x1A);
SPI_WriteData(0x05);
SPI_WriteData(0x00);
SPI_WriteData(0x04);

SPI_WriteComm(0xC5);
SPI_WriteData(0x6C);

SPI_WriteComm(0xC6);
SPI_WriteData(0x23);
/****
SPI_WriteComm(0xC8);
SPI_WriteData(0x01);
SPI_WriteData(0x01);
SPI_WriteData(0x03);
SPI_WriteData(0xFF);
***/

SPI_WriteComm(0xD0);
SPI_WriteData(0x00);
SPI_WriteData(0x43);
SPI_WriteData(0x64);
SPI_WriteData(0x25);
SPI_WriteData(0x10);
SPI_WriteData(0x02);
SPI_WriteData(0x71);
SPI_WriteData(0x44);
SPI_WriteData(0x04);

SPI_WriteComm(0xD1);
SPI_WriteData(0x00);
SPI_WriteData(0x43);
SPI_WriteData(0x64);
SPI_WriteData(0x25);
SPI_WriteData(0x10);
SPI_WriteData(0x02);
SPI_WriteData(0x71);
SPI_WriteData(0x44);
SPI_WriteData(0x04);

SPI_WriteComm(0xD2);
SPI_WriteData(0x00);
SPI_WriteData(0x43);
SPI_WriteData(0x64);
SPI_WriteData(0x25);
SPI_WriteData(0x10);
SPI_WriteData(0x02);
SPI_WriteData(0x71);
SPI_WriteData(0x44);
SPI_WriteData(0x04);

SPI_WriteComm(0xD3);
SPI_WriteData(0x00);
SPI_WriteData(0x43);
SPI_WriteData(0x64);
SPI_WriteData(0x25);
SPI_WriteData(0x10);
SPI_WriteData(0x02);
SPI_WriteData(0x71);
SPI_WriteData(0x44);
SPI_WriteData(0x04);

SPI_WriteComm(0xC2);
SPI_WriteData(0x08);
HAL_Delay(20);
SPI_WriteComm(0xC2);
SPI_WriteData(0x18);
HAL_Delay(20);
SPI_WriteComm(0xC2);
SPI_WriteData(0xB8);
HAL_Delay(20);
SPI_WriteComm(0xB5);
SPI_WriteData(0x01);
HAL_Delay(20);
SPI_WriteComm(0x29);
HAL_Delay(20);

}

 

 

1 REPLY 1
SofLit
ST Employee

Hello @MNapi ,

Please use </> button to share your code.. I've edited your post then.. 

Please refer to the tips on how to post a thread.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.