cancel
Showing results for 
Search instead for 
Did you mean: 

SSD1289+discovery stm32f4

alireza_roozitalab
Associate III
Posted on January 19, 2014 at 19:48

hello every one , i tried to show picture on 3.2'' tft lcd that use SSD1289 driver,

i can fill , write char and ... correctly

but i cant show picture , many pixels writes wrong and this wrong changes with reset of board! this problem Cause the picture that shown , cant be Recognizable

thanks

alireza roozitalab
3 REPLIES 3
elec_st
Associate III
Posted on January 21, 2014 at 09:40

i use fsmc and i have your problem i can fill color and display text char  but picture not display  correct  .and my lcd hang in any time and many times my lcd is failed to start up or stop work ??

the problem is gpio and fsmc time are faster than lcd module ssd1289

try to low it's speed try this this work not good's alot but work

                GPIO_InitTypeDef  GPIO_InitStructure;

        

        RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD |   RCC_AHB1Periph_GPIOE, ENABLE);

     GPIO_PinAFConfig(GPIOD, GPIO_PinSource0, GPIO_AF_FSMC);                // D2

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource1, GPIO_AF_FSMC);                // D3

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource4, GPIO_AF_FSMC);                // NOE -> RD

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource5, GPIO_AF_FSMC);                // NWE -> WR

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource7, GPIO_AF_FSMC);                // NE1 -> CS

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource8, GPIO_AF_FSMC);                // D13

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource9, GPIO_AF_FSMC);                // D14

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource10, GPIO_AF_FSMC);                // D15

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource11, GPIO_AF_FSMC);                // A16 -> RS

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource14, GPIO_AF_FSMC);                // D0

  GPIO_PinAFConfig(GPIOD, GPIO_PinSource15, GPIO_AF_FSMC);                // D1

 

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource7, GPIO_AF_FSMC);                // D4

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource8, GPIO_AF_FSMC);                // D5

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource9, GPIO_AF_FSMC);                // D6

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource10, GPIO_AF_FSMC);                // D7

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource11, GPIO_AF_FSMC);                // D8

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource12, GPIO_AF_FSMC);                // D9

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource13, GPIO_AF_FSMC);                // D10

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource14, GPIO_AF_FSMC);                // D11

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource15, GPIO_AF_FSMC);                // D12

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5 |

                                  GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 |

                                  GPIO_Pin_11 | GPIO_Pin_14 | GPIO_Pin_15;

 

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;

  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;

  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

  GPIO_InitStructure.GPIO_PuPd  = GPIO_PuPd_NOPULL;  //NOPULL UP

  GPIO_Init(GPIOD, &GPIO_InitStructure);

 

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 |

                                  GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 |

                                  GPIO_Pin_15;

 

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;

  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;

  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

  GPIO_InitStructure.GPIO_PuPd  = GPIO_PuPd_NOPULL;   //NOPULL UP

  GPIO_Init(GPIOE, &GPIO_InitStructure);

    

    

    

    

alireza_roozitalab
Associate III
Posted on January 24, 2014 at 20:35

thanks for your replay

i change the speed like your code but the problem not solved,i see many board with stm32f407igt and SSD1289 lcd but not have this problem (with some fsmc port configs differences) , i cant understand why?

elec_st
Associate III
Posted on January 25, 2014 at 22:48

test code at low cpu frequency  like 42MHz .