2023-03-06 10:05 AM
Hello everyone,
I'm using Nucleo-STM32L476RE board to print some datas on a ILI9341 LCD 2.8" screen.
By using STM32CubeMX, I added the software pack X-CUBE-DISPLAY. But after generating the code on the STM32CubeIDE, I am not able to program correctly the board since I cannot find some sample of usage of the BSP functions.
Can someone help me find a sample project showing how to use this library (especially for ILI9341).
Thanks in advance.
2023-03-15 06:32 AM
Hi, did you made any progress? I also try to interface an LCD with ILI9341 controller, but there is no real documentation available for the BSP library...
2023-03-15 06:39 PM
BSP drivers are perhaps not inclusive of all drivers. On the web, there are many examples of drivers for the ILI9341. The main elements of a display driver are (in this case),
1) an SPI driver to write to the chip and display memory at the lowest level. Make sure you don't exceed the chip's clock rate. Bear in mind that the requirements of the chip say that the CS line should be down during a command sequence (CASET, RASET, DATA, for example
.
2) Because of this, you cannot use hardware controlled CS on this chip.
3) an initialization sequence. Examples of this are on the net for the ILI9341 chip.
4) the driver has to be able to read and write registers
5) the driver has to be able to read and write memory. The chip uses (IIRC) a "memory window" that has to be set up to control which area on the chip is written to. It is not memory mappable.
6) further restrictions are needed if you use an operating system or have multiple SPI devices on the same interface.
Find other examples of the non BSP driver and use them. It's possible to use BSP and non BSP drivers.
BSP drivers are often quite limited, and only work well with software examples.