Hello,
I believe there is a bug in the lcd-related part of at91lib:
- In the function "LCD_SetHorizontalTimings" the horizontal front porch is treated as a 8-bit value starting from bit 24 of LCDC_TIM2, whereas according to the datasheet HFP is a 11-bit value starting from bit 21 of LCDTIM2.
- Similarly (but not identically), the AT91SAM9RL64.h header file defines HFP as "#define AT91C_LCDC_HFP (0x3FF << 22)" which appears to be wrong for the same reason.
It's not a huge issue, but either the datasheet or the sources are wrong.

Could you please fix it...?
cheers,
Max