cancel
Showing results for 
Search instead for 
Did you mean: 

How can STM32MP151 support 9bits, SPI?

yrkim05
Associate II

Dear All,

 

I have been working on communicating with LCD module by 3 wire, 9bits SPI.

Firstly I implemented it by gpio.

I can communicated with LCD module by 3 wire, 9bits SPI.

But we encounter problem in total time in sending pixel data by SPI.

We're using 320X240 LCD.

It takes around 18 seconds to transfer all pixel data to LCD module.

Therefore I need to find another way to reduce time in communicating with LCD module.

We think that SPI driver will be faster than using GPIO.

But I wonder how to send each data in 9 bits.

If anyone have experience about SPI 9 bits, please advise.

 

1 ACCEPTED SOLUTION

Accepted Solutions

This issue is fixed with additional one signal to indicate command/data.

Data bits is 8 bits.

 

View solution in original post

4 REPLIES 4
Uwe Bonnes
Principal III

Probably you are using SPI/ HAL and HAL is not fast. Look at all the posts where people had problems with HAL/SPI and speed and hwo the speed problem can be resolved.

AScha.3
Chief II

Hi,

why you want 9bit SPI ?  (all TFT i use, are on RGB 5-6-5 , 16bit color ; so need 2 x 8bit transfer )

+

18 sec is a "bit long" time; just afair i needed about 300ms full screen ("CLS") write on 320X240 TFT,

just with standard HAL calls . (blocking mode)

A bit optimized its about 90ms full screen fill , with HAL calls. (Direct DMA->SPI gets it in 6ms - but display shows strange colors, maybe the display chip dont "like" this speed; so i left it with using HAL -> SPI ).

So you do something wrong, maybe there is a delay in your prog or SPI speed very low ?

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

SPI in higher end STM32 can move programmable number of data bits. 9 bits is possible. See RM0441 page 2558. Register SPI_CFG2, field DSIZE.

(Not sure about the details, have not used this mode. If DSIZE is 9 bit and data register is written as 32 bits, will this transmit 3*9 = 27 bits or 9 bits once?)

 

 

 

This issue is fixed with additional one signal to indicate command/data.

Data bits is 8 bits.