看了这个外设的说明,发现没有initialion。。。那就从头介绍吧
一、 介绍说明
LCDC有两个独立的控制器,同步Raster Controller 和 异步LCD InterfaceDisplay Driver (LIDD) controller。
同步Raster Controller:It supports a wide variety of monochrome and full-color displaytypes and sizes by use of programmable timing controls, a built-in palette, and a gray-scale/serializer.Graphics data is processed and stored in frame
异步LIDD controller:The LIDD Controller supports the asynchronous LCD interface. It provides full-timing programmabilityof control signals and output data.
二、clock
1.Pixel Clock 计算如下:where CLKDIV is a field in the LCD_CTRL register and should not be 0 or 1.
-
Passive (STN:STN的每个点只有点亮和熄灭两种状态,可以通过“抖动算法”来实现灰度或彩色显示。STN属于无源Passive型LCD,一般最高能显示65536种色彩) mode.LCD_PCLK only transitions when valid data is available for output. It does nottransition when the horizontal clock is asserted or during wait state insertion.
-
Active (TFT:液晶为每个像素都设有一个半导体开关,其加工工艺类似于大规模集成电路) mode.LCD_PCLK continuously toggles as long as the Raster Controller is enabled.
2.Horizontal Clock (LCD_HSYNC) :每行结束clock
3.Vertical Clock (LCD_VSYNC) :all lines in a frame have been transmitted to the LCD 帧结束clock
三、DMA
When the Raster Controller is used, the DMA engine reads data from a frame buffer and writes it to theinput FIFO (如上第一幅图所示). The Raster Controller requests data from the FIFO for framerefresh; as a result, the DMA’s job is to ensure that the FIFO is always kept full.
When the LIDD Controller is used, the DMA engine accesses the LIDD Controller's address and/or dataregisters.
In addition, the LIDD_CTRL register (for LIDD Controller) or the RASTER_CTRL register (for RasterController) should also be configured appropriately, along with all the timing registers.
To enable DMA transfers, the LIDD_DMA_EN bit (in the LIDD_CTRL register) or the LCDEN bit (in theRASTER_CTRL register) should be written with 1.
这篇博客详细介绍了LCDC的两个控制器——同步Raster Controller和异步LIDD Controller,包括它们的功能和工作原理。同时,讲解了Pixel Clock、Horizontal Clock、Vertical Clock的计算和作用。此外,还讨论了在使用Raster Controller和LIDD Controller时,DMA的工作方式,并强调了正确配置LIDD_CTRL或RASTER_CTRL寄存器以及所有定时寄存器的重要性,以启用DMA传输。
601

被折叠的 条评论
为什么被折叠?



