how to interface the LCD as rgb565 with spi initialization ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to interface the LCD as rgb565 with spi initialization ?

Jump to solution
3,439 Views
nandishguruling
Contributor III

Hi ALL

I need to interface the lcd 3.5 (st7789s) as rgb565 parallel  with SPI initialization, i configured the Lcd pins as per my board(SABRE|Automotive-Infotainment|i.MX6|NXP ), but i am struggling to SPI initialization on imx6 linux3.10 version,
And i attached the both data sheet of LCD and Board schematic, can anybody give me a solution for this,

Thanks in Advance,

Best regards

nandish

1 Solution
2,485 Views
art
NXP Employee
NXP Employee

You can use any empty SPI interface of i.MX6 and existing SPI driver of the Linux BSP to configure the display driver IC. In case of half-duplex SPI data interface (single data input/output pin, as described in the LCD data sheet), you can connect the MOSI and MISO signals of selected i.MX6 SPI port together and configure the MOSI signal as pulled-up open-drain (assuming the i.MX6 SPI port operating in the Master mode).


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

6 Replies
2,484 Views
justinsmith
Contributor I

If I recall correctly in 3-Line mode, the LCD wants to see a D/C Bit followed by the SPI data in each transaction.

That's a 9-Bit transfer. [D/C-1Bit][payload-8Bit]

This issue is that the I.mx6 has issues doing 9-Bit SPI transfers with the BSP Linux SPI code.

Consider Changing the IMx pin settings on the display to support 4-line "Serial". At least then you can use a GPIO to act as a D/C Line, and use a supported 8-Bit SPI transfer.

After that you still need to find the correct initialization values to send over the SPI for your display. (Which is the tricky part unless you have excellent support from the LCD Vendor.)

Regards,

J

0 Kudos
2,481 Views
art
NXP Employee
NXP Employee

Refer to the Chapter 38 of the attached document.

0 Kudos
2,483 Views
nandishguruling
Contributor III

Hi Artur,

i did those steps very beginning, but modification of source code to initialize the spi i am not getting

0 Kudos
2,486 Views
art
NXP Employee
NXP Employee

You can use any empty SPI interface of i.MX6 and existing SPI driver of the Linux BSP to configure the display driver IC. In case of half-duplex SPI data interface (single data input/output pin, as described in the LCD data sheet), you can connect the MOSI and MISO signals of selected i.MX6 SPI port together and configure the MOSI signal as pulled-up open-drain (assuming the i.MX6 SPI port operating in the Master mode).


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,483 Views
nandishguruling
Contributor III

HI Artur,

Thanks for your suggestion, yes i am using the empty SPI interface and i configured the lcd pins as per my board and please find attached data sheet of lcd in that sheet i mentioned my board pins also, but the issue is i am not getting the how to SPI initialization on imx6 linux3.10 version,file-page1.jpg

0 Kudos
2,483 Views
nandishguruling
Contributor III

file-page2.jpg

0 Kudos