[LPCOpen] Bug in lcd_17xx_40xx.c

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by pgr on Mon Nov 10 01:37:59 MST 2014
Hy all,

I just found a bug in LPCOpen in the file lcd_17xx_40xx.c, function Chip_LCD_Init().
The clock divider is not computed the right way. The LCD controller use cclk as clock source and not pclk. So the code should be:

pcd = (Chip_Clock_GetSystemClockRate() / LCD_ConfigStruct->CLK) - 1;

instead of

pcd = (Chip_Clock_GetPeripheralClockRate() / LCD_ConfigStruct->CLK) - 1;

Best regards