&spi0{
status = "okay";
st7789v: st7789v@0{
compatible = "sitronix,st7789v";
reg = <0>;
status = "okay";
spi-max-frequency = <32000000>;
spi-cpol;
spi-cpha;
rotate = <0>;
fps = <10>;
buswidth = <8>;
rgb;
dc-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; // PB4
reset-gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>; // PB5
//led-gpios = <&pio 1 7 GPIO_ACTIVE_LOW>; // PB7
width = <240>;
height= <320>;
debug = <0>;
};
};
开机
usbhid: USB HID core driver
[ 1.092172] fbtft_of_value: width = 240
[ 1.096011] fbtft_of_value: height = 320
[ 1.099968] fbtft_of_value: buswidth = 8
[ 1.103888] fbtft_of_value: debug = 0
[ 1.107547] fbtft_of_value: rotate = 0
[ 1.111304] fbtft_of_value: fps = 10
[ 1.122424] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.132420] mmc0: new high speed SD card at address 21b7
[ 1.139811] mmcblk0: mmc0:21b7 APPSD 480 MiB
[ 1.146192] mmcblk0: p1 p2
[ 1.691784] random: fast init done
[ 1.740803] Console: switching to colour frame buffer device 30x40
[ 1.747711] graphics fb0: fb_st7789v frame buffer, 240x320, 150 KiB video memory, 4 KiB buffer memory, fps=10, spi0.0 at 32 MHz
开机后雪花飘飘,执行
# ./usr/bin/fb-test
fb-test 1.1.0 (rosetta)
fb res 240x320 virtual 240x320, line_len 480, bpp 16
直接白屏
# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
变成雪花飘飘
播放视频白屏闪烁
离线
降低fps至10,时钟频率设置为32000000,也一样
离线
离线
请问有遇到开机log里显示是初始化成功,但屏幕没有亮的情况吗
离线
我这个问题解决了,在初始化ST7789v时候,适当增加休眠时间。
static int init_display(struct fbtft_par *par)
{
par->fbtftops.reset(par);
mdelay(200); //fixed
write_reg(par,0x11);//Sleep exit
mdelay(100); //fixed
write_reg(par,0x11);
mdelay(100); //fixed
write_reg(par,0x3A,0x05); //65k mode
write_reg(par,0xc5,0x1a);
write_reg(par,0x36,0x70); // 屏幕显示方向设置
//-------------ST7789V Frame rate setting-----------//
write_reg(par,0xb2,0x05,0x05,0x00,0x33,0x33);
write_reg(par,0xb7,0x35);
//--------------ST7789V Power setting---------------//
write_reg(par,0xbb,0x3f);
write_reg(par,0xc0,0x2c);
write_reg(par,0xc2,0x01);
write_reg(par,0xc3,0x0f);
write_reg(par,0xc4,0x20);
write_reg(par,0xc6,0x11);
write_reg(par,0xd0,0xa4,0xa1);
write_reg(par,0xe8,0x03);
write_reg(par,0xe9,0x09,0x09,0x08);
write_reg(par,0xe0,0xd0,0x05,0x09,0x09,0x08,0x14,0x28,0x33,0x3f,0x07,0x13,0x14,0x28,0x30);
write_reg(par,0xe1,0xd0,0x05,0x09,0x09,0x08,0x03,0x24,0x32,0x32,0x3b,0x14,0x13,0x28,0x2f);
write_reg(par,0x21);
write_reg(par,0x11);
mdelay(200); //fixed
write_reg(par,0x29);
mdelay(200);
return 0;
}
离线
@twzy
这个是主线的吗,哪个版本支持spi_lcd呀
离线
请问有遇到开机log里显示是初始化成功,但屏幕没有亮的情况吗
屏幕PWM没有驱动吧
离线
请问有遇到开机log里显示是初始化成功,但屏幕没有亮的情况吗
dev目录有没有fb,可以用工具fb-test测试
离线
离线
屏幕PWM没有驱动吧
那PWM怎么驱动?
离线
dev目录有没有fb,可以用工具fb-test测试
串口是这样显示的,但屏幕只亮了背光
离线
542396750@qq.com 说:dev目录有没有fb,可以用工具fb-test测试
串口是这样显示的,但屏幕只亮了背光
https://img-blog.csdnimg.cn/4ec30b4259aa41e8ac0d6abf1eaba6e5.png
dev看下是不是有两个fb,会不会是还有一个RGB接口的屏幕没删掉
离线