cancel
Showing results for 
Search instead for 
Did you mean: 

using LCD-TFT controller without HAL

sk12
Associate II

Hello, i am trying to configure the on-board TFT-LCD on STM32F429-Disc0 board and i want to do it without using HAL drivers, every tutorial on youtube or other platforms i see, are using CubeMX or HAL or both. I understand we need SPI5 to configure the ILI9341 peripheral (unlike the STM32F7 where only LTDC config is required), i feel there are less resources to - 
1) understand the data sheet of the LCD peripheral, its way complicated for a beginner  
2) understand the LTDC registers in the reference manual, and what default values should be put into them
3) creating functions to write something on the LCD screen, to draw and more, very complex and no one has explained them properly on youtube. 

I know there is a CubeMX example available which shows stm logo on screen but it also uses HAL and is complicated to understand a proper code structure and the flow of the code and what to do and when. 

Any suggestions/guidance?

4 REPLIES 4
AScha.3
Chief II

Hi,

>i want to do it without using HAL drivers,

Why ? Want more difficult challenge ?

 

1. Use Cube+HAL to get it working .

2. IF working, as you want, then replace the  HAL_SPI_Transmit(&ILI9341_SPI_PORT...) with whatever you can do better or faster .

 

 understand the data sheet of the LCD

Right, you have to read and understand.

>creating functions to write something on the LCD screen

If want to see, how its done (by others ), look on git :

https://github.com/search?q=ili9341%20stm32&type=repositories

Look, how they do - or copy a lib, that seems fine for you, and try to adapt/ get it running.

 

Then it might look like my ILI9341 TFT + F303 here:

AScha3_0-1721628713315.png

🙂

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

Hi, thanks for responding,
Till now i have done all the peripherals ADC,UART,SPI, DMA etc without any drivers on ARM-keil only.

>i want to do it without using HAL drivers,

Why ? Want more difficult challenge ?

where i am learning ATM, they dont use any HAL or any other drivers at all, they have built their own bare-metal library and keep using the functions, but i want to learn it from scratch and in-depth.
As you know in real-life industries, they refrain from using HAL because of memory constraints and cost issues so its better not to learn the controller using HAL is what i feel. 

Ok, so try and learn, how to do it bare-metal . 🙂

maybe look here, to see, how its done:

https://github.com/***ci/stm-ILI9341-spi

 

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

@sk12 wrote:

 understand the data sheet of the LCD peripheral, its way complicated for a beginner  


you can't have it both ways!

The whole point of a HAL is to save you having to delve deeply into the arcane inner workings of the hardware details - especially complicated ones like LCD controllers.

If you don't want to use the HAL, then you must be prepared to put in the time & effort to understand the hardware details.

 


@sk12 wrote:

in real-life industries, they refrain from using HAL because of memory constraints and cost issues


That's not (necessarily) true. Many will use the HAL to save the effort (ie, cost) of reinventing this wheel.