STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 26| LCD SPI initialization coding part-3

  • Post author:
  • Post category:Blog

 

LCD SPI initialization coding part-3

 

Here, instead of writing GPIO_MODER_MODE7_Pos (Figure 1), you can use the LCD_RESX_PIN macro. However, you have to multiply it by 2 (Figure 3).

Figure 1. RESX Code
Figure 1. RESX Code

 

You can use the LCD_RESX_PIN macro because it is set to GPIO_PIN_7.

LCD SPI initialization coding part-3
Figure 2. Macros

Make sure to define these macros (as shown in Figure 2). The GPIO_PIN_0 macro should be set to 0. Therefore, you need to write these macros from 0 to 15 and define them with the corresponding values (as shown in Figure 2).

 

LCD SPI initialization coding part-3
Figure 3. Code

 

We have just finished initializing our reset pin. For the other two pins, CSX and D/CX, you can use the same method. The code for CSX and D/CX is shown in Figure 3.

 

FastBit Embedded Brain Academy Courses

Click here: https://fastbitlab.com/course1

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply