4132 views|5 replies

87

Posts

0

Resources
The OP
 

2.8-inch TFTLCD cannot display [Copy link]

This post was last edited by fdsf on 2018-12-21 13:06 The 2.8-inch TFTLCD screen not only cannot display, but also the backlight cannot work. The backlight driver is in the LCD initialization code. I have pasted some important codes and I sincerely ask the big guys to help me review them. I have been searching for several days but still can’t find them. I began to suspect that it is a problem with the hardware. Thank you very much! ! ! I am using NE1, the address line is A16, The base address is set to: #define LCD_BASE ((u32)(0x60000000 | 0x0001FFFE)) #define LCD ((LCD_TypeDef *) LCD_BASE) PE1 port connected to LCD backlight PD7 connected to LCD_CS PD11 connected to LCD_RS Other settings are exactly the same as Atom Brother's template FSMC initialization configuration is as follows: GPIO_InitTypeDef GPIO_InitStructure; FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure; FSMC_NORSRAMTimingInitTypeDef readWriteTiming; FSMC_NORSRAMTimingInitTypeDef writeTiming; RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC,ENABLE); //Enable FSMC clock RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE|RCC_APB2Periph_GPIOD, ENABLE);//Enable PORTE, PORTD GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1; //PE1 push-pull output backlight GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //Push-pull output GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOE,&GPIO_InitStructure);
        
        //PORTD复用推挽输出  
        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10|GPIO_Pin_14|GPIO_Pin_15;                                         
        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;                  //复用推挽输出   
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        GPIO_Init(GPIOD, &GPIO_InitStructure);
           
        //PORTE复用推挽输出  
        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_PP;                  //复用推挽输出   
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        GPIO_Init(GPIOE, &GPIO_InitStructure);                                                                                                                  

          //PORTD12复用推挽输出 A16        
        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7|GPIO_Pin_11;         //        //PORTD复用推挽输出  
        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;                  //复用推挽输出   
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        GPIO_Init(GPIOD, &GPIO_InitStructure);

        readWriteTiming.FSMC_AddressSetupTime = 0x01;         //地址建立时间(ADDSET)为2个HCLK 1/36M=27ns
        readWriteTiming.FSMC_AddressHoldTime = 0x00; //Address hold time (ADDHLD) mode A is not used readWriteTiming.FSMC_DataSetupTime = 0x0f; //The data retention time is 16 HCLKs, because the LCD driver IC cannot read data too fast, especially for the 1289 IC. readWriteTiming.FSMC_BusTurnAroundDuration = 0x00; readWriteTiming.FSMC_CLKDivision = 0x00; readWriteTiming.FSMC_DataLatency = 0x00; readWriteTiming.FSMC_AccessMode = FSMC_AccessMode_A; //Mode A writeTiming.FSMC_AddressSetupTime = 0x00; //Address setup time (ADDSET) is 1 HCLK writeTiming.FSMC_AddressHoldTime = 0x00; //Address hold time (A writeTiming.FSMC_DataSetupTime = 0x03; ////The data saving time is 4 HCLKs writeTiming.FSMC_BusTurnAroundDuration = 0x00; writeTiming.FSMC_CLKDivision = 0x00; writeTiming.FSMC_DataLatency = 0x00; writeTiming.FSMC_AccessMode = FSMC_AccessMode_A; //Mode A FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;// Here we use NE1. FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; // Do not reuse data addresses FSMC_NORSRAMInitStructure.FSMC_MemoryType =FSMC_MemoryType_SRAM;// FSMC_MemoryType_SRAM; //SRAM FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;//The memory data width is 16bit FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode =FSMC_BurstAccessMode_Disable;// FSMC_BurstAccessMode_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;   FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait=FSMC_AsynchronousWait_Disable;
  FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;   
  FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;  
  FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;        //  存储器写使能
  FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;   
  FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable; // 读写使用不同的时序
  FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
  FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &readWriteTiming; //读写时序
  FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &writeTiming;  //写时序

  FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);  //初始化FSMC配置

  FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);  // 使能BANK1 232)] FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &writeTiming; //Write timing FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); //Initialize FSMC configuration FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE); // Enable BANK1 232)] FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &writeTiming; //Write timing FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); //Initialize FSMC configuration FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE); // Enable BANK1




MP3播放器原理图&PCB.rar

2.7 MB, downloads: 14

基于是stm32的MP3播放器code.rar

2.34 MB, downloads: 12

This post is from stm32/stm8

Latest reply

Your question is quite big. Are you sure the MCU you are using is STM32F103VB? If so, then this is a medium-density product and does not have a FSMC bus.   Details Published on 2018-12-21 15:48
 

672

Posts

0

Resources
2
 
Have you done anything in the PE1 code? You only posted the initialization code. Generally, fsmc is fine. If you still have questions, please post the complete code and hardware.
This post is from stm32/stm8

Comments

PE1 can be configured separately, but it does not work when it is configured in LCD_Init(). I will upload the schematic diagram and all the codes later.  Details Published on 2018-12-21 13:02
 
 

87

Posts

0

Resources
3
 
Sodium Citrate posted on 2018-12-21 12:55 Have you done anything in the PE1 code? You only posted the initialization code, which is usually fine for fsmc. If you still have questions, please post the complete code and hardware.
If you take PE1 out and configure it separately, it can be operated, but if you configure it in LCD_Init(), it will not work. I will package the schematic diagram and all the codes later.
This post is from stm32/stm8
 
 

664

Posts

104

Resources
4
 
Your question is quite big. Are you sure the MCU you are using is STM32F103VB? If so, then this is a medium-density product and does not have a FSMC bus.
This post is from stm32/stm8

Comments

It is STM32F103VB. I was wondering if there is FSMC bus before. Now that you said that, I don't know. But thank you anyway.  Details Published on 2018-12-21 16:49
It is STM32F103VB. I was wondering if there is FSMC bus before. Now that you said that, I don't know. But thank you anyway.  Details Published on 2018-12-21 16:22
 
 
 

87

Posts

0

Resources
5
 
gs001588 posted on 2018-12-21 15:48 Your question is quite big. Are you sure the MCU you use is STM32F103VB? If so, then this is a medium-density product and does not have a FSMC bus.
It is indeed STM32F103VB. . . . I was wondering whether there is a FSMC bus before, but after you said that, oh. But thank you anyway.
This post is from stm32/stm8
 
 
 

87

Posts

0

Resources
6
 
gs001588 posted on 2018-12-21 15:48 Your question is quite big. Are you sure the MCU you are using is STM32F103VB? If so, then this is a medium-density product without FSMC bus.
If you change the MCU to STM32F103VET6, can you still operate it with NE1 of Bank1?
This post is from stm32/stm8
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list