您尚未登录。

楼主 # 2021-11-03 22:43:52

ArduinoTM
会员
注册时间: 2020-02-10
已发帖子: 4
积分: 4

关于F1C200s在U-boot中实现LCD-swap_r_b交换蓝色与红色的方法

最近在调试kmakise大佬画的黑猫F1C200s板时发现lcd的红色与绿色io口互换了,导致u-boot显示logo色彩出现错误
nono_swap
经过多番查证,发现了这么一个寄存器

7.2.5.7. TCON0_CTL_REG (Default Value: 0x00000000)
Offset: 0x040
Register Name: TCON0_CTL_REG
R/W Default/Hex Description
31 R/W 0 TCON0_En
0: disable
1: enable
Note: It executes at the beginning of the first blank line of TCON0 timing.
30:29 / / /
28 R/W 0 TCON0_Work_Mode
0: normal
1: dynamic freq
27:26 / / /
25:24 R/W 0 TCON0_IF
00: HV(Sync+DE)
01: 8080 I/F
1x:reserved
23 R/W 0 TCON0_RB_Swap
0: default
1: swap RED and BLUE data at FIFO1
22 / / 21 R/W 0 20 / 19:9 / 8:4

在u-boot中通过内存操作命令验证:

=> md 0x01c0c040
01c0c040: 80000100 f000000a 01df010f 02140030    ............0...
01c0c050: 0240000b 00280009 00000000 00000000    ..@...(.........
01c0c060: 00000000 00000000 00000000 00000000    ................
01c0c070: 00000000 00000000 00000000 00000000    ................
01c0c080: 00000000 00000000 13000000 00000000    ................
01c0c090: 00000000 00000000 00000000 00000000    ................
01c0c0a0: 00000000 00000000 00000000 00000000    ................
01c0c0b0: 00000000 00000000 00000000 00000000    ................
01c0c0c0: 00000000 00000000 00000000 00000000    ................
01c0c0d0: 00000000 00000000 00000000 00000000    ................
01c0c0e0: 00000000 00000000 00000000 00000000    ................
01c0c0f0: 00000000 ffffffff 00000000 30030000    ...............0
01c0c100: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c110: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c120: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c130: 30030000 30030000 30030000 30030000    ...0...0...0...0

修改内存值80800100

=> mw.l 0x01c0c040 80800100
01c0c040: 80800100 f000000a 01df010f 02140030    ............0...
01c0c050: 0240000b 00280009 00000000 00000000    ..@...(.........
01c0c060: 00000000 00000000 00000000 00000000    ................
01c0c070: 00000000 00000000 00000000 00000000    ................
01c0c080: 00000000 00000000 13000000 00000000    ................
01c0c090: 00000000 00000000 00000000 00000000    ................
01c0c0a0: 00000000 00000000 00000000 00000000    ................
01c0c0b0: 00000000 00000000 00000000 00000000    ................
01c0c0c0: 00000000 00000000 00000000 00000000    ................
01c0c0d0: 00000000 00000000 00000000 00000000    ................
01c0c0e0: 00000000 00000000 00000000 00000000    ................
01c0c0f0: 00000000 ffffffff 00000000 30030000    ...............0
01c0c100: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c110: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c120: 30030000 30030000 30030000 30030000    ...0...0...0...0
01c0c130: 30030000 30030000 30030000 30030000    ...0...0...0...0

查找uboot源码,发现了lcd初始化部分的内存操作代码,按照格式写测试代码
swap_r_bcode
插电,开机电流轻松跑上去,问题解决
r_b_swap

离线

楼主 #4 2021-11-05 07:55:52

ArduinoTM
会员
注册时间: 2020-02-10
已发帖子: 4
积分: 4

Re: 关于F1C200s在U-boot中实现LCD-swap_r_b交换蓝色与红色的方法

geekchun 说:

之前我也遇到过,感谢楼主分享

“插电,开机电流轻松跑上去,问题解决”
哈哈,看到这句似曾相识,楼主是不是看维修厮的视频了

没错,老维修厮了,hhhhhhh
午安大电牛警告⚠️

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn