请教NUC972配置LCD时序参数
NUC972驱动LCD,输出1024*768 24bit色,按照LCD时序要求,需要配置HV脉冲宽度,前肩,后肩这些参数,但是NUC972的LCD时序控制参数很怪,没有明确指出如何计算对应的前肩,后肩参数,无论怎么试都看不到正确的行场驱动波形,有没有大神用过这种芯片来配置1024*768,还不吝赐教,谢谢 这玩意现在供货正常了吗 你是改动哪里 xml2028 发表于 2021-10-18 12:27这玩意现在供货正常了吗
一直不缺货 redworlf007 发表于 2021-10-18 14:09
一直不缺货
缺是不缺,价格贵了而已。{:lol:} xjavr 发表于 2021-10-18 18:18
缺是不缺,价格贵了而已。
贵的不多,相比stm。 lcd一般是忽略hs vs吧?只要de信号正常就可以 看LCD寄存器规格,需要配置的参数HTT,HRS,HRE,HDEND,HS,HE,看官方LCD时序说明,HTT好理解,HRS,HRE,就很模糊了,跟HBP的关系没有明确指出来,HDEND,HS,HE都好理解,现在需要配置1024*768 VGA时序,看看大神些有没有用来配置过这种时序参数 typedef struct {
char acName; /*Full name <vendor>_<model>*/
int iWidth;
int iHeight;
int isize; /*!< CRTCSIZE register value */
int ihr; /*!< CRTCHR register value */
int ihsync; /*!< CRTCHSYNC register value */
int ivr; /*!< CRTCVR register value */
int facetype;
int iclock;
}LCD_PANEL;
{// 7
"LQ150X1LX9A 15\"", // 15"
1024,
768,
0x032804AE,//BA,
0x04100401,
0x0499047B,
0x03180310,
1, // face type 0-tft 1-lvds
30000000,
},
// cmd 16to18 busw databusw
VPOST->DEV_CTRL = VPOSTB_CMDHIGH | VPOSTB_CM16t18LOW | VPOSTB_CMD8 | VPOSTB_DATA16or18 |
// mpu_mode colors dev type
VPOSTB_MPU80 | VPOSTB_COLORTYPE_256K |VPOSTB_DEVICE_SYNC_HIGHCOLOR;
//rt_kprintf("ctrl = %x\n", VPOST->DEV_CTRL);
VPOST->CRTC_SIZE=_aKnownLcdPanels.isize;
VPOST->CRTC_DEND=_aKnownLcdPanels.iWidth | (_aKnownLcdPanels.iHeight << 16);
VPOST->CRTC_HR =_aKnownLcdPanels.ihr;
VPOST->CRTC_HSYNC =_aKnownLcdPanels.ihsync;
VPOST->CRTC_VR =_aKnownLcdPanels.ivr; sea_star 发表于 2021-10-19 11:40
// cmd 16to18 busw databusw ...
按照你的参数配置,还是不行,看波形,明显没有HBP了 五年前的
outpw(REG_CLK_HCLKEN, inpw(REG_CLK_HCLKEN) | (1 << 25));
// Configure multi-function pin for LCD interface
//GPG6 (CLK), GPG7 (HSYNC)
outpw(REG_SYS_GPG_MFPL, (inpw(REG_SYS_GPG_MFPL) & (~0xFF000000)) | 0x22000000);
//GPG8 (VSYNC), GPG9 (DEN)
outpw(REG_SYS_GPG_MFPH, (inpw(REG_SYS_GPG_MFPH) & (~0xFF)) | 0x22);
//DATA pin
//GPA0 ~ GPA7 (DATA0 ~ 7)
outpw(REG_SYS_GPA_MFPL, 0x22222222);
//GPA8 ~ GPA15 (DATA8 ~ 15)
outpw(REG_SYS_GPA_MFPH, 0x22222222);
//GPD8~D15 (DATA16 ~ 17)
outpw(REG_SYS_GPD_MFPH, (inpw(REG_SYS_GPD_MFPH) & (~0xFF)) | 0x22);
// LCD clock is selected from UPLL and divide to 20MHz
outpw(REG_CLK_DIVCTL1, (inpw(REG_CLK_DIVCTL1) & (~0xff1f)) |
((300000000l / _aKnownLcdPanels.iclock - 1) << 8) | 0x18);
outpw(REG_CLK_PCLKEN0, inpw(REG_CLK_PCLKEN0)| 0x08); // GPIO clk
GPIO_OpenBit(GPIOD, LCDRL,DIR_OUTPUT, PULL_UP);
GPIO_SetBit (GPIOD, LCDRL);
GPIO_OpenBit(GPIOD, LCDUD,DIR_OUTPUT, PULL_UP);
if (_aKnownLcdPanels.facetype == 1)
GPIO_SetBit (GPIOD, LCDUD);
else
GPIO_ClrBit (GPIOD, LCDUD);
VPOST->DEV_CTRL = 0;
// cmd 16to18 busw databusw
VPOST->DEV_CTRL = VPOSTB_CMDHIGH | VPOSTB_CM16t18LOW | VPOSTB_CMD8 | VPOSTB_DATA16or18 |
// mpu_mode colors dev type
VPOSTB_MPU80 | VPOSTB_COLORTYPE_256K |VPOSTB_DEVICE_SYNC_HIGHCOLOR;
//rt_kprintf("ctrl = %x\n", VPOST->DEV_CTRL);
VPOST->CRTC_SIZE=_aKnownLcdPanels.isize;
VPOST->CRTC_DEND=_aKnownLcdPanels.iWidth | (_aKnownLcdPanels.iHeight << 16);
VPOST->CRTC_HR =_aKnownLcdPanels.ihr;
VPOST->CRTC_HSYNC =_aKnownLcdPanels.ihsync;
VPOST->CRTC_VR =_aKnownLcdPanels.ivr;
rt_hw_interrupt_install(IRQ_LCD, vpostIntHandler, RT_NULL, "LCD");
rt_hw_interrupt_control(IRQ_LCD, 0x41, 0x3F);
rt_hw_interrupt_umask(IRQ_LCD);
VPOST->DCCS |= VPOSTB_DISP_INT_EN;
VPOST->INT_CS |= VPOSTB_UNDERRUN_EN;
VPOST->INT_CS |= VPOSTB_DISP_F_EN;
// Set scale to 1:1
vpostVAScalingCtrl(1, 0, 1, 0, VA_SCALE_INTERPOLATION);
// Set display color depth
vpostSetVASrc(_sys_setup.sysset.sys.Bpp); sea_star 发表于 2021-10-21 09:46
五年前的
outpw(REG_CLK_HCLKEN, inpw(REG_CLK_HCLKEN) | (1 DEV_CTRL = VPOSTB_CMDHIGH | VPOSTB_ ...
谢谢,我再试试看
页:
[1]