原创 AT91SAM9RL64 AT91SAM9261 AT91SAM9263 LCDC 定时设置区别

2009-11-5 10:56 3537 5 5 分类: MCU/ 嵌入式

AT91SAM9263


HFP: Horizontal Front Porch


Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles Bit21..31


AT91SAM9261 - 6260G


HFP: Horizontal Front Porch


Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles Bit21..31


AT91SAM9261 - 6260K


HFP: Horizontal Front Porch


Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+2) LCDDOTCK cycles Bit21..31


AT91SAM9RL64


HFP: Horizontal Front Porch
Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles. Bit21..31


 


IAR EWARM 


ioat91sam9261.ddf


ioat91sam9261s.ddf


ioat91sam9263.ddf


ioat91sam9rl64.ddf


sfr = "LCDC_TIM2.HFP",  "Memory", 0x0060080c, 4, base="16", bitRange="22-31"


正确的是 bitRange="21-31"


at91lib V1.5


//------------------------------------------------------------------------------
/// Sets the horizontal timings of the LCD controller. Meaningful for both
/// STN and TFT displays.
/// \param hbp  Number of idle LCDDOTCLK cycles at the beginning of a line.
/// \param hpw  Width of the LCDHSYNC pulse, in LCDDOTCLK cycles.
/// \param hfp  Number of idel LCDDOTCLK cycles at the end of a line.
//------------------------------------------------------------------------------
void LCD_SetHorizontalTimings(
    unsigned int hbp,
    unsigned int hpw,
    unsigned int hfp)
{
    ASSERT(((hbp-1) & 0xFFFFFF00) == 0,
           "LCD_SetHorizontalTimings: Wrong hbp value.\n\r");
    ASSERT(((hpw-1) & 0xFFFFFFC0) == 0,
           "LCD_SetHorizontalTimings: Wrong hpw value.\n\r");
    ASSERT(((hfp-1) & 0xFFFFFF00) == 0,
           "LCD_SetHorizontalTimings: Wrong hfp value.\n\r");


    AT91C_BASE_LCDC->LCDC_TIM2 = (hbp-1) | ((hpw-1) << 8) | ((hfp-1) << 24);


正确的是 | ((hfp-2) << 21);



}

是否hfp占用了b24..b31 ? 或者应该是 ((hfp-1) << 21); 或者 ((hfp-2) << 21)


点击开大图c3483965-4219-48f0-a32b-1a90684480f7.jpg


点击开大图


 


从这些资料可以看出正确的是 ((hfp-2) << 21)


1. 修改 at91lib


2. 修改 IAR DDF 文件


 

文章评论0条评论)

登录后参与讨论
我要评论
0
5
关闭 站长推荐上一条 /2 下一条