STM32L073 LCD Controller
Just getting started with this uC and the ST toolset. I am trying to initialize the LCD controller but the init fails at:
if (HAL_LCD_Init(&hlcd) != HAL_OK)
{
Error_Handler();
}
More specifically it times out at:
/*!< Wait Until the LCD Booster is ready */
while(__HAL_LCD_GET_FLAG(hlcd, LCD_FLAG_RDY) == RESET)
{
if((HAL_GetTick() - tickstart ) > LCD_TIMEOUT_VALUE)
{
hlcd->ErrorCode = HAL_LCD_ERROR_RDY;
return HAL_TIMEOUT;
}
}
in the stm32l0xx_hal_lcd.c file.
Looks like the "LCD booster" is not getting turn on. I used the ioc configurator to setup the LCD.
Here is the generated init code:
/* USER CODE END LCD_Init 1 */
hlcd.Instance = LCD;
hlcd.Init.Prescaler = LCD_PRESCALER_1;
hlcd.Init.Divider = LCD_DIVIDER_16;
hlcd.Init.Duty = LCD_DUTY_1_2;
hlcd.Init.Bias = LCD_BIAS_1_4;
hlcd.Init.VoltageSource = LCD_VOLTAGESOURCE_INTERNAL;
hlcd.Init.Contrast = LCD_CONTRASTLEVEL_0;
hlcd.Init.DeadTime = LCD_DEADTIME_0;
hlcd.Init.PulseOnDuration = LCD_PULSEONDURATION_0;
hlcd.Init.HighDrive = LCD_HIGHDRIVE_0;
hlcd.Init.BlinkMode = LCD_BLINKMODE_OFF;
hlcd.Init.BlinkFrequency = LCD_BLINKFREQUENCY_DIV8;
hlcd.Init.MuxSegment = LCD_MUXSEGMENT_DISABLE;
if (HAL_LCD_Init(&hlcd) != HAL_OK)
{
Error_Handler();
}
Thanks
Rich
