Content originally posted in LPCWare by hlsa on Wed Apr 23 23:27:53 MST 2014
Hello Georg,
I assume that you want to use the emWin graphics library. I do have it running with the LPC4357 with a 24bit RGB interface. Please find the relevant code attached.
Some important hints:
- I am using the systick timer to generate a 1ms interrupt for "SysTick_Handler". You can also use a timer interrupt, if your systick timer is already in use.
- Check your LCD pins in LCD_X_Init.
- Adapt the LCD controller configuration in LCD_X_Init. You will find the relevant data in the datasheet of your LCD.
- I am using the SDRAM beginning at 0x28000000 as a frame buffer. If you want to use any other RAM, change this address.
- I am using multiple frame buffers (#define NUM_BUFFERS 3). This requires three times the memory space for the frame buffer. Example: My LCD has 320 x 240 = 76800 Pixels. At 24bpp each pixel requires 4 bytes. Hence the total size of one frame buffer is 230400 Bytes. 3 frame buffers require 691200 Bytes. My advice: try to get it running with one frame buffer. Add the other ones later. See emWin documentation about multibuffering.
- I am using my own file structure. E.g. I have summarized all required CMSIS header files in McuLib.h. You may want/need to adapt this to your file structure.
- Do not forget to include the emWin library to your linker. I use the iSystem Debugger instead of LpcExpresso. Hence I cannot tell you, how it is done in LpcExpresso.
Good luck,
Holger