确认过板子硬件是没有问题的,用IO口直接驱动能点亮,但是直接用芯片内部驱动就会出现卡死的问题。麻烦各位帮忙分析分析。感谢各位!下面是我的初始化代码:
void LCD_GLASS_Init(void)
{
LCD_InitTypeDef LCD_InitStructure;
LCD_GPIOConfig(); /*!< Configure the LCD Glass GPIO pins */
/*!< Configure the LCD interface -------------------------------------------*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_LCD, ENABLE); /*!< Enable LCD APB1 Clock */
LCD_InitStructure.LCD_Prescaler = LCD_Prescaler_8;
LCD_InitStructure.LCD_Divider = LCD_Divider_16;
LCD_InitStructure.LCD_Duty = LCD_Duty_1_8;
LCD_InitStructure.LCD_Bias = LCD_Bias_1_4;
LCD_InitStructure.LCD_VoltageSource = LCD_VoltageSource_Internal;
LCD_Init(&LCD_InitStructure);
//LCD_HighDriveCmd(ENABLE);
/*!< Configure the Pulse On Duration*/
LCD_PulseOnDurationConfig(LCD_PulseOnDuration_2);
/*!< Configure the LCD Contrast (3.51V) */
LCD_ContrastConfig(LCD_Contrast_Level_5);
/*!< Wait Until the LCD FCR register is synchronized */
LCD_WaitForSynchro();
/*!< Enable LCD peripheral */
LCD_Cmd(ENABLE);
/*!< Wait Until the LCD is enabled */
while(LCD_GetFlagStatus(LCD_FLAG_ENS) == RESET)
{
}
/*!< Wait Until the LCD Booster is ready */
while(LCD_GetFlagStatus(LCD_FLAG_RDY) == RESET)
{
}
}
一直卡在最后一个while,请问该怎么解决这个问题啊?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>