cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152 LCD programm hangs in the function LCD_Init()

XPeng
Associate

hi,

i am working on the STM32L and i have a problem with the lcd, no matter wich programm i am testing it's not working the programm hangs in the function LCD_Init() at :

 /*!< Wait Until the LCD Booster is ready */ 

 while(LCD_GetFlagStatus(LCD_FLAG_RDY) == RESET)

i tried to reboot the stm32l but still not working

is there something i can do to fix it ? or is it out of use ?

1 REPLY 1
felixkv
Associate

I al facing similar to above issue. I could not able to configure the internal voltage source. The while(__HAL_LCD_GET_FLAG(hlcd, LCD_FLAG_RDY) == RESET) never sets if the internal voltage source is selected. My configurations are listed below,

hlcd.Instance = LCD;

hlcd.Init.Prescaler = LCD_PRESCALER_1;

hlcd.Init.Divider = LCD_DIVIDER_31;

hlcd.Init.Duty = LCD_DUTY_1_4;

hlcd.Init.Bias = LCD_BIAS_1_3;

hlcd.Init.VoltageSource = LCD_VOLTAGESOURCE_INTERNAL;

hlcd.Init.Contrast = LCD_CONTRASTLEVEL_6;

hlcd.Init.DeadTime = LCD_DEADTIME_0;

hlcd.Init.PulseOnDuration = LCD_PULSEONDURATION_4;

hlcd.Init.HighDrive = LCD_HIGHDRIVE_0;

hlcd.Init.MuxSegment = LCD_MUXSEGMENT_DISABLE;

hlcd.Init.BlinkMode = LCD_BLINKMODE_OFF;

hlcd.Init.BlinkFrequency = LCD_BLINKFREQUENCY_DIV8;

 

Anybody faced similar issue. Anyone can support for solution