cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-DISPLAY with Half-Duplex SPI

sbaker
Associate II

I am attempting to use the X-CUBE-DISPLAY module generated from STM32CubeMX for a ST7789V display. The configuration requires the selection of the LCD BUS IO driver to be a SPI port in Full-Duplex Master mode. However my display only has a single SDA line for input and output, so the SPI has to be configured in Half-Duplex Master mode. X-CUBE-DISPLAY will not allow this SPI port to be selected, so the code generation fails.

Is there a way for the X-CUBE-DISPLAY to work with a half-duplex SPI peripheral? 

2 REPLIES 2
Kristian
Associate

Hi sbaker

I just had the same issue, and just starting to look for a solution.
If you got any insights I would appreciate it very much.

Currently trying out to changes in 
__weak HAL_StatusTypeDef MX_SPI2_Init(SPI_HandleTypeDef* hspi)
//hspi->Init.Direction = SPI_DIRECTION_2LINES;
hspi->Init.Direction = SPI_DIRECTION_1LINE;

Best regards

mathiasmarkussen
ST Employee

Hello,

The X-CUBE-DISPLAY cube is no longer updated, and should be considered deprecated.

I would advise that you take inspiration for your project setup from one of the provided Board Setups using SPI as a display interface instead.

You should choose one for a Nucleo kit as close in specification to your setup as possible with either the RVA15MD or GFX01M2 display module.

They will be setup for partial frame buffer using SPI. You would mostly need to copy and/or implement the relevant functions from TouchGFXHAL.cpp and the display driver included with the project.