STM32L152 Wait Until the LCD Booster is ready
Hi All,
I am having an issue getting the LCD to work on the STM32L152. I'm using STM32CubeMX to initialise the code. I have written the code to update the LCD on the Discovery Dev board. It does work, but only if I run one of the examples (temperature or current) first. Then if I load my code the LCD works just fine. When I re-power the board it fails again until I run one of the examples again.
It fails before it gets to my code - while initialising the LCD so I'm assuming there is something else that needs to be set.
The code fails/Times-outs in the HAL driver here at the bottom of the HAL_LCD_Init function. I assume the converter cct is not being switched on? If so, what am I missing?
Many Thanks
/*!< 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;}The initializeation code generated by STM32CubeMX is unchanged
int main(void)
{/* USER CODE BEGIN 1 *//* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();MX_ADC_Init();MX_LCD_Init();MX_TS_Init();/* USER CODE BEGIN 2 */#lcd-converter #lcd-booster