LCD Driver LPC177x_8x_lcd.c clocking question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LCD Driver LPC177x_8x_lcd.c clocking question

745件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by EReyes on Mon Feb 06 21:44:11 MST 2012
I pulled the latest version on the driver library git repository. When I tried to use the LCD driver I found the clock was not being generated correctly (checked with an oscilloscope).

This is the relevant code (starts at line 114)

<code>
// Set clock
LPC_LCD->POL &= ~(0x01 << 5);
if( pConfig->panel_clk > 0) {
          clkdiv = CLKPWR_GetCLK(CLKPWR_CLKTYPE_CPU) / pConfig->panel_clk - 1;
  LPC_SC->LCD_CFG = clkdiv & 0x1F;
}
</code>

Shouldn't the fourth line be like this?

          clkdiv = CLKPWR_GetCLK( <FONT COLOR="Red">CLKPWR_CLKTYPE_PER</FONT>) / pConfig->panel_clk - 1;

I was under the impression the LCD module is clocked by the peripheral clock and not the core clock.
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

728件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by EReyes on Wed Feb 08 19:14:39 MST 2012
You are right. Turns out I wasn't setting bit 26 on LPC_LCD->POL to bypass the LCD Module's internal clock divider.

Thanks.

0 件の賞賛
返信

728件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Karl on Tue Feb 07 09:17:13 MST 2012
The description of the CLKSEL bit in table 226 says <i>...the clock source for the LCD block is CCLK</i>.
0 件の賞賛
返信