美文网首页
IMX8MM-LCD-ILI9806E调试流程

IMX8MM-LCD-ILI9806E调试流程

作者: Lazy_Caaat | 来源:发表于2020-05-20 12:28 被阅读0次

/Documentation/devicetree/bindings/leds/backlight

/Documentation/devicetree/bindings/pwm

image.png
image.png

lcd_reset ----->SAI5_RXFS
DSI_BL_PWM ----->GPIO1_IO15

TPS61160

When the CTRL pin is constantly high, the FB voltage is regulated to 200mV typically. However, the CTRL pin
allows a PWM signal to reduce this regulation voltage; therefore, it achieves LED brightness dimming. The
relationship between the duty cycle and FB voltage is given by Equation 2.
Where
  Duty = duty cycle of the PWM signal
  200 mV = internal reference voltage

可以直接给高电平,这样Vfb就是200mV
根据手册I-LED=Vfb/Rset=200mv/10欧=20ma

也可以给PWM信号,频率在10-40Khz之间,通过占空比来控制Vfb=duty*200mv
根据手册I-LED=Vfb/Rset=duty*200mv/10欧=duty*20ma
The CTRL pin is used for the control input for both dimming modes, PWM dimming and 1 wire dimming. The dimming mode for the TPS61160/1 is selected each time the device is enabled. The default dimming mode is PWM dimming.

To enter the 1 wire mode, the following digital pattern on the CTRL pin must be recognized by the IC every time the IC starts from the shutdown mode.
  1. Pull CTRL pin high to enable the TPS61160/1, and to start the 1 wire detection window.
  给CTRL引脚一个持续的上拉,之后会进入单总线检测窗口期
  2. After the EasyScale detection delay (tes_delay, 100µs) expires, drive CTRL low for more than the EasyScale detection time (tes_detect, 260µs).
在EasyScale检测延迟(detection delay)(tes_延迟,100微秒)到期后,再给CTRL一个超过(detection time)260us的低电平,过了260us的detection time后就进入ES(EasyScale )模式窗口期了,给一个高电平就会进入ES模式
  3. The CTRL pin has to be low for more than EasyScale detection time before the EasyScale detection window (tes_win, 1msec) expires. EasyScale detection window starts from the first CTRL pin low to high transition.
满足以上三个条件就会进入单总线模式
The IC immediately enters the 1 wire mode once the above 3 conditions are met. the EasyScale communication can start before the detection window expires. Once the dimming mode is programmed, it can not be changed
without another start up. This means the IC needs to be shutdown by pulling the CTRL low for 2.5ms and
restarts. See the Dimming Mode Detection and Soft Start (Figure 13) for a graphical explanation.
image.png

1.先把背光调出来,根据原理图,背光芯片是tps61160,第五脚名字为CTRL,是一个多功能引脚(高电平使能芯片),接的是GPIO1_IO15。


GPIO复用寄存器

定义在uboot目录/arch/include/dt-bindings/pinctrl/pins-imx8mm.h
或者内核目录./include/dt-bindings/pinctrl/pins-imx8mm.h

MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15
这个定义就是把(GPIO1_IO15)这个PAD复用成GPIO1_IO15
这样直接给高电平,背光就会一直亮。

MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT
这个定义就是把(GPIO1_IO15)这个PAD复用成PWM4
这样可以根据占空比来控制背光亮度。

image.png

我们需要把这个GPIO改为输出高电平,这样屏幕背光就会点亮了。
看上面的图,想要配置成上拉模式的话,需要把PE PS设置为11。


输入模式
速率
找到pad ctrl寄存器

根据上图可知,PE就是用来控制PE的,HYS是用来控制IS的,PUE控制PS,所以我们需要把PE=1 HYS=0 PUE=1 ODE=0 FSEL=1X DSE=01X 注意DSE决定了驱动强度,过强会导致信号过冲,过弱会导致信号上升/下降时间过长。

0x152

所以我们想输出高电平的话,最后的配置就是

MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15    0x152

MX8MM_IOMUXC_SAI5_RXFS_GPIO3_IO19

相关文章

  • IMX8MM-LCD-ILI9806E调试流程

    /Documentation/devicetree/bindings/leds/backlight /Docume...

  • 鸿蒙学习之路—应用真机运行

    调试流程 使用真机设备进行调试前,需要对HAP进行签名后进行调试。详细的调试流程如下图所示 申请签名 手动签名方案...

  • 调试流程

    js执行了,但是样式不对: 1.先看核心代码最外部调用代码 2.再看内部函数getData() 4.继续往下找,此...

  • iOS开发知识体系

    一、基础模块按照App的开发(开发、调试测试、发布、上线)流程,进行划分 开发阶段启动流程界面布局架构设计 调试测...

  • Java基础语法_Day12

    一、Eclipse断点调试 Eclipse断点调试概述 Eclipse的断点调试可以查看程序的执行流程和解决程序中...

  • gcc相关

    gcc编译常用指令 gcc编译过程 gdb调试流程 第一步生成调试文件 第二步 根据指令调试

  • Debug hacks--gdb调试

    gdb流程如下: 1. 带着调试选项编译,构建调试对象。 2. 启动调试器。 2.1. 设置断点。 2.2.显示栈...

  • tf.debugger调试实例

    使用tf的debugger调试十分简单,总分为以下几个流程:# 1. import tensorflow的调试模块...

  • iOS逆向工程(八):动态调试

    动态调试 一、什么是动态调试 动态调试就是将程序运行起来,通过打断点、打印等方式,查看参数、返回值、函数调用流程等...

  • 远程调试 WebView

    最近项目调试线上webView嵌套网页, 通过远程调试Webview就可以 操作流程 在您的原生 Android ...

网友评论

      本文标题:IMX8MM-LCD-ILI9806E调试流程

      本文链接:https://www.haomeiwen.com/subject/vurcnhtx.html