MCB4357: how to disable EMC and still use LCD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCB4357: how to disable EMC and still use LCD

508 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jeffh on Fri Jul 26 11:30:29 MST 2013
I would like to use the LCD/touchscreen with the EMC disabled so I can use the I2C1 interface. The I2C1 data line is shared with the EMC DQM3 line so I cannot use both. I tried to disable EMC by not calling SystemSetupMemory() in sysinit_keil_mcb_18574357.c but this also seems to disable the LCD.  Can someone show me how to disable EMC but keep all LCD functionality for the MCB4357 board or just free up the DQM3 line so I can use I2C1? Thanks.
Labels (1)
0 Kudos
4 Replies

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pcalton on Wed Aug 28 08:58:42 MST 2013
I2C1 SDA is available on 2 different pins
PE_13 - where it conflicts with DQMOUT3
P2_3 - where it doesnt

Can you just move the I2C1 SDA to P2_3?

Theres a tool somewhere in the download section called PinMux that is good for helping you juggle all the pins the peripherals use to find a combination that gives you access to what you need.

0 Kudos

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Tue Jul 30 01:12:50 MST 2013
I can imagine your image looks corrupted. When using the RGB interface, you always need to transfer all pixels to the LCD :)
Even when using just 8bpp, the full screen would require 76.800 bytes. There's no continuous region on the LPC4357 where you can fit that into.

Probably you're best choice is to configure the EMC for 16-bit mode. This eliminates the requirement for DQMOUT3, while still being able to use at least half of the available SDRAM memory, allowing your framebuffer to reside in the external SDRAM.
0 Kudos

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jeffh on Fri Jul 26 15:54:29 MST 2013
Thanks.  I will try to put the frame buffers in internal RAM.  Is it possible to configure the LCD to only use 128x128 of the actual 240x320 size so I can fit the buffer into internal RAM?  I tried changing the board init settings:
const LCD_Config_T MCB4300_LCD = {
8,/*!< Horizontal back porch in clocks */
4,/*!< Horizontal front porch in clocks */
4,/*!< HSYNC pulse width in clocks */
128,//240,/*!< Pixels per line */
4,/*!< Vertical back porch in clocks */
3,/*!< Vertical front porch in clocks */
4,/*!< VSYNC pulse width in clocks */
128,//320,/*!< Lines per panel */
0,/*!< Invert output enable, 1 = invert */
1,/*!< Invert panel clock, 1 = invert */
1,/*!< Invert HSYNC, 1 = invert */
1,/*!< Invert VSYNC, 1 = invert */
1,/*!< AC bias frequency in clocks (not used) */
6,/*!< Maximum bits per pixel the display supports */
LCD_TFT,/*!< LCD panel type */
LCD_COLOR_FORMAT_RGB,/*!< BGR or RGB */
0/*!< Dual panel, 1 = dual panel display */
};

and different emWin settings:
// Display orientation
//
//#define DISPLAY_ORIENTATION  0
//#define DISPLAY_ORIENTATION               (GUI_MIRROR_X | GUI_MIRROR_Y)
  #define DISPLAY_ORIENTATION (GUI_SWAP_XY | GUI_MIRROR_Y)
//#define DISPLAY_ORIENTATION (GUI_SWAP_XY | GUI_MIRROR_X)

but the resulting image is always corrupted.
0 Kudos

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Fri Jul 26 13:44:45 MST 2013
Do you place the LCD frame buffers in internal RAM, or why can you disable the EMC?
0 Kudos