teddybearwh teddybearwh

TWR-LCD could not work correctly with V4 core coldfire

Discussion created by teddybearwh teddybearwh on Oct 14, 2010
Latest reply on Oct 14, 2010 by teddybearwh teddybearwh

     Recently, I met a problem when working on the TWR-LCD. The ssd1289 is accessible to the V4 core coldfire 5441x on the primary elevator through 16-bit flexbus.

 

1. I set SW1.1(PS2) ON, SW1.2(PS0) OFF, SW1.3(JM_ELE) ON.

2. I set flexbus CSAR0 0xC0000000, CSMR0 0x00010001, CSCR0 0x00000380. I also set GPIO PAR_FBCTL 0xff, PAR_BE 0x5f, PAR_CS 0x01.

3. I tried with a simple test code to fully fill the screen with only one color. Following is my code, CONFIG_LCD_CMD_ADDRESS=0xC0000000, CONFIG_LCD_DATA_ADDRESS=0xC0010000,

 

*((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0001;

 udelay(15000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0003;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0xAEAC;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x000C;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0007;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x000D;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x000F;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x000E;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x2900;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x001E;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x00B3;

 udelay(15000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0001;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x2B3F;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0002;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0600;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0010;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0011;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x60B0;  

 udelay(15000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0005;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0006;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0016;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0xEF1C;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0017;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0003;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0007;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0233;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x000B;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x5312;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x000F;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 udelay(20000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0041;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0042;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0048;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0049;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x013F;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x004A;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x004B;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 udelay(20000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0030;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0707;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0031;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0704;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0032;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0204;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0033;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0201;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0034;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0203;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0035;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0204;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0036;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0204;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0037;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0502;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x003A;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0302;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x003B;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0500;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0023;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0024;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0025;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x8000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0044;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0xEF00; 

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0045;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0046;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x013F; 

 udelay(20000);
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x004e;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;
 
 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x004f;
 *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0x0000;

 *((unsigned short*)CONFIG_LCD_CMD_ADDRESS)=0x0022;

 udelay(1000);
 for (j = 0;j < 320; j++) {
  for (i = 0;i < 240; i++) {
   *((unsigned short*)CONFIG_LCD_DATA_ADDRESS)=0xffff;
  }

 

   But there is nothing on the screen, I couldn't find the reason. Anyone could give me a help?

Outcomes