cancel
Showing results for 
Search instead for 
Did you mean: 

LCD display of STM32L-Discovery using HAL library

ota-s
Associate II

Hello.

I found several other people asking similar questions, but none of them have been resolved, so I will ask you a new question.

I am developing using STM32L-Discovery.Specifically, we would like to display on the LCD mounted on this evaluation board using the HAL library.

However, apparently I may not have set the LCD correctly in CubeMx.

This is because an error has occurred in the initialization function of the output LCD, HAL_LCD_Init ().

Specifically, TIMEOUT occurs in the following code and an error has occurred. 

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 other words, LCD_FLAG_RDY is not set regardless of how long.

In CubeMx, the settings are as shown below.

0690X00000AAUGXQA5.png

Can someone help me with the solution?

Thank you.

1 REPLY 1
ota-s
Associate II

​�?Update】

I have confirmed that this is not a problem with the HAL library.

Let me explain how I confirmed it.

I downloaded the sample project of AN3964-Temperature_sensor and tried it.

This consists of a library different from HAL.

But this also output an error during execution.

The error occurred in the following function:・ LCD_GLASS_Init (void)

The following points are specifically stopped. 

while (LCD_GetFlagStatus (LCD_FLAG_RDY) == RESET)

  {  }

Again, this is probably because LCD_FLAG_RDY does not become 1, that is, the step-up converter is not activated.