FAQ

屏幕ID读取失败

  • Check if the power supply is correct

  • Check if the IO voltage matches (our chip supports 1.8V IO, and many LCDs are 3.3V)

  • Check if the screen reset time is sufficient

  • Try reducing the interface frequency

  • Check the timing

DSI屏幕切换到低速模式

1.Reduce the system clock to 48M 在drv_io.c内,将HAL_RCC_HCPU_ClockSelect(RCC_CLK_MOD_SYS, XXX); XXX就是系统时钟频率,改成RCC_SYSCLK_HXT48(晶体时钟48MHz) This is to reduce the speed at which LCDC sends data to DSI

2.Adjust the frequency of DSI LP mode to the range supported by the screen (generally 6~20Mbps), 如下配置时LP模式频率 = 480MHz / 16 / 4 = 7.5Mbps(其中480MHz为freq, 16 为固定值, 4为TXEscapeCkdiv) alt text

3.Change all commands to LP mode (low-speed mode) for transmission alt text

屏幕不亮

  • Check if the ID can be read

  • First turn off TE to prevent the absence of TE signal from causing the LCD controller not to send data

  • Check if the sent data is all black

屏幕颜色格式的设置

Our LCD controller can convert framebuffer of different formats to the LCD output interface, ensuring that the configurations on both sides of framebuffer and LCD output are correct

Example of framebuffer color format setting (framebuffer in RGB565 format) alt text

Example of LCD controller output color format (DSI output RGB888) alt text

*The framebuffer is first converted into RGB888 format data after being sent to the LCDC controller, and then sent to the DSI link controller to output RGB888 data again

屏幕显示花屏

  • Check if the color format of the framebuffer and the color format sent out by the LCD controller are correct(参考前面FAQ《屏幕颜色格式的设置》)

  • Check whether the screen area output by the IC and the resolution of the liquid crystal glass are consistent,参考《屏驱IC、液晶玻璃、刷新区域、framebuffer的相对位置关系》章节。 alt text

  • Whether there is no data sent, displaying the default GRAM data(改变framebuffer,检查屏幕是否有变化)

屏幕显示(部分)绿色背景

其中一个实例如下图: alt text

  • Check if the offset of the area where the LCD accepts data is correct alt text

  • Check if the sent data is correct

对齐要求和屏幕分辨率不符合的死机

The reason for the crash: For some customers, the screen resolution is 320x385, but the alignment requirement is 2, according to which the resolution must be even numbers(比如320x386),上层或者驱动在刷屏时会自动对齐到偶数,导致刷屏区域超过分辨率,就会出现断言。

Solution approach: Still provide a screen with resolution that meets the alignment requirements, only modify the driver code。

Solutions:

  • When defining the screen resolution in Kconfig, it needs to be configured according to the aligned resolution, virtually creating a screen that meets the alignment requirements。

    • The corresponding macros in Kconfig are LCD_HOR_RES_MAX and LCD_VER_RES_MAX

    • 比如上面的例子是配成320x386

  • In the xxxx_SetRegion function of the LCD driver, check whether the incoming parameters exceed the real resolution, and consult the screen factory on how to deal with it。

    • Some screens are directly intercepted,比如上面的例子中检查Ypos1,超过385的就直接改成385

    • Some screens can be directly refreshed without covering the first row。

上层图形库不动,只换屏幕

This issue refers to the practice of “crash due to misalignment requirements and screen resolution”, just intercept at the driver level, still provide a screen that meets the requirements。

屏驱IC、液晶玻璃、刷新区域、framebuffer的相对位置关系

alt text

死机

如下图所示,It is a relatively common screen refresh timeout crash, the reason is that the screen’s TE signal was not waited for, resulting in a timeout crash,The timeout time is defined in MAX_LCD_DRAW_TIME, the default is 500ms。

alt text

图片内的标号

寄存器含义说明

1

“draw core timeout” - represents the screen refresh did not wait for TE, resulting in a timeout crash

2

STATUS=1 means the LCDC controller is always busy(比如等TE信号), TE=3 only need to look at bit0, if bit0 is 1, it means LCDC needs to wait for the TE signal before refreshing the screen, 0 means no need to wait for the TE signal。 Log里面打印了2遍TE寄存器的值,可以观察这期间TE信号是否有来。

3

CANVAS’s TL, BR are the coordinates of the refresh area,TL的高16bit是y0, 低16bit是x0; BR的高16bit是y1, 低16bit是x1; 组成刷新区域{x0,y0,x1,y1}

4

LAYER0’s TL, BR are the left side of the area where the framebuffer is located, the format is similar to the above-mentioned CANVAS’s TL, BR;
SRC is the data address of the framebuffer

Solutions:

  1. If this crash occurs as soon as the device is turned on, it is highly likely that there is a problem with the screen drive, check the screen power-on, reset, screen initialization code, etc.。

  2. If this crash occurs during sleep wake-up, it may be that the reset time for initialization is not enough, or the process of turning off the screen during sleep does not meet the requirements。

  3. If the system crashes suddenly during screen refresh, it may be due to unstable screen drive (e.g., mismatched IO levels, excessively high speed) or electrostatics causing the screen drive IC to crash.