您尚未登录。

楼主 # 2021-10-10 10:19:07

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

好钜润3.5寸屏RGB888模式,无法点亮

淘宝买了好钜润3.5寸的屏,号称支持RGB888模式。等打样了pcb调试的时候,用他们提供的初始化代码无法点亮,和淘宝客服联系不回复,电话联系则告诉我只通过淘宝提供技术支持。感觉就像儿戏!版主认识他们的人吗,请问我该如何得到技术支持?

离线

楼主 #2 2021-10-10 10:35:43

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

哇酷小二 说:

嗯,我帮你问问。貌似今天他们不上班呢,可能明天回复。

谢谢版主!

离线

楼主 #6 2021-10-11 12:54:10

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

哇酷小二 说:

楼主你现在具体是什么问题呢?

我买的就是51pin的,卖家也多次确认过支持RGB888模式。这个屏使用的瑞萨R61529芯片,需要通过spi口下发初始化命令以后RGB口才可以工作。现在我按照卖家提供的参考板设计的底板,然后按照卖家提供的初始化代码下发设置,但是屏幕始终是黑的。
tiky.jpg

我们的原理图,初始化代码,RGB口时序都已经发给卖家,但是卖家始终不置一词,感觉就像在故意看笑话一样。

离线

楼主 #7 2021-10-11 13:00:30

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

哇酷小二 说:

楼主你现在具体是什么问题呢?

现在和他们协商,想买一套他们的开发板,带3.5寸屏,要求他们烧好支持RGB888模式的固件。这样我们调试的时候可以对比测试。
还不知道他们能不能做到。

离线

楼主 #9 2021-10-11 13:23:08

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

@memory
我们的初始化代码,RGB时序都是根据卖家提供的一大堆资料连蒙带猜出来的。上逻辑分析仪当然可以,但是最好卖家能确认一下我们当前的设置是不是对的。
感觉卖家的态度就是,一切都由买家自己决定。。。

下面是卖家提供的初始化代码。比如第一条指令0xB4和第二条指令0xB0,按照瑞萨R61529的手册,必须先执行0xB0指令打开寄存器保护,否则任何寄存器访问都是无效的。也就是说第一条指令0xB4是一个无效访问。

void Lcd_Initialize(void)	//LCD初始化函数
{
    LCD_SPI_CS(1);
    LCD_delay(20);
    LCD_SPI_CS(0);
    LCD_Reset();

	
 SPI_WriteComm(0xB4);
	SPI_WriteData(0x00);
	
	SPI_WriteComm(0xB0);
	SPI_WriteData(0x04);

	SPI_WriteComm(0x20);
	
	SPI_WriteComm(0x36); //Set_address_mode
 	SPI_WriteData(0x6A); //横屏
	SPI_WriteComm(0x3A); 
	SPI_WriteData(0x77);
	
	SPI_WriteComm(0xB3);
	SPI_WriteData(0x02);
	SPI_WriteData(0x00);
	SPI_WriteData(0x00);
	SPI_WriteData(0x20);
	
	
	
	SPI_WriteComm(0xc0);
	SPI_WriteData(0x03);
	SPI_WriteData(0xdf);
	SPI_WriteData(0x40);
	SPI_WriteData(0x12);
	SPI_WriteData(0x00);
	SPI_WriteData(0x01);
	SPI_WriteData(0x00);
	SPI_WriteData(0x55);// 
	
	SPI_WriteComm(0xc1);
	SPI_WriteData(0x07);
	SPI_WriteData(0x28);
	SPI_WriteData(0x08);// 
	SPI_WriteData(0x08);//
	SPI_WriteData(0x00);//
	
	SPI_WriteComm(0xc4);
	SPI_WriteData(0x70);//
	SPI_WriteData(0x00);
	SPI_WriteData(0x03);
	SPI_WriteData(0x01);
	
	SPI_WriteComm(0xc6);
	SPI_WriteData(0x1d);//1d
	
	SPI_WriteComm(0xc8);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0c);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3d);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0c);
	SPI_WriteData(0x04);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xC9);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);	
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xCA);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);	
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xD0);
	SPI_WriteData(0x95);
	SPI_WriteData(0x0A);
	SPI_WriteData(0x08);
	SPI_WriteData(0x10);
	SPI_WriteData(0x39);
	
	SPI_WriteComm(0xD1);
	SPI_WriteData(0x02);
	SPI_WriteData(0x2c);//
	SPI_WriteData(0x2c);//
	SPI_WriteData(0x44);//	
	SPI_WriteData(0x00);//0x08 
	
	SPI_WriteComm(0x11);
	LCD_delay(100);
	SPI_WriteComm(0x29);
	LCD_delay(100);
	SPI_WriteComm(0x2C);
		
		SPI_WriteComm(0x36);
#if LCD_RGB_ORIENTATION //是否旋转90度
 SPI_WriteData(0x09);
#else
 SPI_WriteData(0x08);
#endif

 
}

离线

楼主 #11 2021-10-11 13:30:58

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

@memory
这是我们的初始化代码,可以看到读device id都是成功的,就是代码中的byte1和byte2。感觉spi口时序已经对了。

{	
	unsigned char byte1,byte2;
	
	/* Initialize the pins */
	if (r61408_enable_gpio(cfg) != 0)
		return ;

	gpio_set_value(cfg->csx_pin, 1);
	mdelay(20);
	gpio_set_value(cfg->csx_pin, 0);
	gpio_set_value(cfg->reset_pin, 0);
	mdelay(200);
	gpio_set_value(cfg->reset_pin, 1);
	mdelay(200);

#if 1
	// Enter read mode
	SPI_WriteComm(0xB0);
	SPI_WriteData(0x04);

	SPI_WriteComm(0xBF);
	SPI_ReadData();

	printf("DDB0=%x, DDB1=%x\n", SPI_ReadData(), SPI_ReadData());
	byte1 = SPI_ReadData();
	byte2 = SPI_ReadData();

	// Enter read mode
	SPI_WriteComm(0xB0);
	SPI_WriteData(0x04);
			
  if (byte1==0x15 && byte2==0x29) {
  	printf("R61259 found!\n");
		r61529_Reg_Fill();

  }

	gpio_set_value(cfg->csx_pin, 1);  	
		  	
#else 
#endif

}
static void r61529_Reg_Fill(void)
{
	SPI_WriteComm(0xB4);
	SPI_WriteData(0x00);
	
	SPI_WriteComm(0xB0);
	SPI_WriteData(0x04);

	SPI_WriteComm(0x20);
	
	SPI_WriteComm(0x36); //Set_address_mode
 	SPI_WriteData(0x6A); //
	SPI_WriteComm(0x3A); 
	SPI_WriteData(0x77);
	
	SPI_WriteComm(0xB3);
	SPI_WriteData(0x02);
	SPI_WriteData(0x00);
	SPI_WriteData(0x00);
	SPI_WriteData(0x20);
	
	
	
	SPI_WriteComm(0xc0);
	SPI_WriteData(0x03);
	SPI_WriteData(0xdf);
	SPI_WriteData(0x40);
	SPI_WriteData(0x12);
	SPI_WriteData(0x00);
	SPI_WriteData(0x01);
	SPI_WriteData(0x00);
	SPI_WriteData(0x55);// 
	
	SPI_WriteComm(0xc1);
	SPI_WriteData(0x07);
	SPI_WriteData(0x28);
	SPI_WriteData(0x08);// 
	SPI_WriteData(0x08);//
	SPI_WriteData(0x00);//
	
	SPI_WriteComm(0xc4);
	SPI_WriteData(0x70);//
	SPI_WriteData(0x00);
	SPI_WriteData(0x03);
	SPI_WriteData(0x01);
	
	SPI_WriteComm(0xc6);
	SPI_WriteData(0x1d);//1d
	
	SPI_WriteComm(0xc8);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0c);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3d);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0c);
	SPI_WriteData(0x04);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xC9);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);	
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xCA);
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);	
	SPI_WriteData(0x06);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x16);
	SPI_WriteData(0x24);
	SPI_WriteData(0x30);
	SPI_WriteData(0x48);
	SPI_WriteData(0x3D);
	SPI_WriteData(0x28);
	SPI_WriteData(0x20);
	SPI_WriteData(0x14);
	SPI_WriteData(0x0C);
	SPI_WriteData(0x04);
	
	SPI_WriteComm(0xD0);
	SPI_WriteData(0x95);
	SPI_WriteData(0x0A);
	SPI_WriteData(0x08);
	SPI_WriteData(0x10);
	SPI_WriteData(0x39);
	
	SPI_WriteComm(0xD1);
	SPI_WriteData(0x02);
	SPI_WriteData(0x2c);//
	SPI_WriteData(0x2c);//
	SPI_WriteData(0x44);//	
	SPI_WriteData(0x00);//0x08 
	
	SPI_WriteComm(0x11);
	mdelay(100);
	SPI_WriteComm(0x29);
	mdelay(100);
	SPI_WriteComm(0x2C);
		
	SPI_WriteComm(0x36);
#if LCD_RGB_ORIENTATION //
 SPI_WriteData(0x09);
#else
 SPI_WriteData(0x08);
#endif
	
}

最近编辑记录 wuyu (2021-10-11 13:32:14)

离线

楼主 #13 2021-10-11 16:53:25

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

@哇酷小二
谢谢回复!
我读device id都成功了,是不是说明spi口的时序肯定ok了?

离线

楼主 #16 2021-10-12 09:34:16

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

@哇酷小二
试过了大佬的代码,还是黑屏。csx在整个初始化期间都是拉低的。

最近编辑记录 wuyu (2021-10-12 09:37:46)

离线

楼主 #17 2021-10-14 18:04:36

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

今天收到了卖家的3.5寸开发套件。

用示波器测量了一下,发现开发套件的时序当中,csx信号每个周期都有拉低/再拉高的操作,貌似这样操作和瑞萨手册不符。参照修改了代码,测试还是黑屏。打算用逻辑分析仪抓一下spi上的所有波形,居然发现这个MCU速度还挺高,手头的逻辑分析仪器16Msps采样率居然无法抓全它的时钟!
IMG_20211014_162231[1].jpg

大家看看有什么好的建议继续调试下去?

最近编辑记录 wuyu (2021-10-14 18:07:16)

离线

楼主 #20 2021-10-15 12:56:50

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

司徒 说:

2個的Registers做測試,依序做讀寫讀寫動作,可以驗證SPI數據的傳送問題,釐清後,假如還有問題,可以往RGB888方向查看~

我选取了set_address_mode 0x36 寄存器测试,每次写入以后用get_address_mode 0x0B 寄存器读回。
b0.jpg
发现写入0x6A,读回是0x68;
写入0x08,读回是0x08。
是不是可以认定写入基本是成功了?

离线

楼主 #22 2021-10-15 19:10:54

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

司徒 说:

找2個8-bits都可以讀寫的Register,使用迴圈從0~255依序讀寫,資料沒問題的話,SPI介面基本上可以排除~可以往屏初始化問題查找
你方便發一下這個屏驅動的PDF嗎?

我现在不在电脑前,你百度r61529看一下。我没有找到特别合适的寄存器做这个测试。
今天想办法用示波器抓了卖家开发板的spi时序,基本和他提供的初始化代码吻合,他的spi时钟将近50MHz,一般的逻辑分析仪不好抓。
这个问题已经比较吊诡了,感觉没有思路了。

离线

楼主 #23 2021-10-24 16:56:18

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

司徒 说:

2個的Registers做測試,依序做讀寫讀寫動作,可以驗證SPI數據的傳送問題,釐清後,假如還有問題,可以往RGB888方向查看~

这个屏还没有调出来。现在在查RGB口,对比时序发现有个问题。卖家开发板HSYNC和VSYNC信号之间似乎有个相位差,大概32个时钟左右。而通常mpu的lcd控制器,HSYNC和VSYNC是完全同步的。请问会是这个问题吗?R61529驱动,是不是哪里可以设置这个相位差?
I6-1.jpg
TIKY-1.jpg

离线

楼主 #25 2021-10-26 10:04:24

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

哇酷小二 说:

TKM32F499GT8评估板资料集
https://whycan.com/t_5861.html


18、TK499_LCD_TK035F5589_TK80_DMA例程.rar

楼主你用的是这个Demo吗? 是基于这个Demo 修改吗?

你发的这个例程是并口的,我用的是spi串口初始化的。我看了一下寄存器设置也不太一样。

离线

楼主 #26 2022-11-26 11:36:42

wuyu
会员
注册时间: 2021-10-10
已发帖子: 32
积分: 13

Re: 好钜润3.5寸屏RGB888模式,无法点亮

这个屏当时没有点亮,还劳烦论坛的@司徒大佬过来相帮。
后来才发现,问题并不在spi口通讯上。r61529这个芯片,初始化的时候是需要借用到LCD pixel clock的,如果缺失这个clock,初始化就会失败,也就是黑屏。
先打RGB接口的时钟,然后再调用spi初始化,屏就工作了。

离线

页脚

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

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