Skip to main content
ota-s
Associate II
August 29, 2019
Question

LCD display of STM32L-Discovery using HAL library

  • August 29, 2019
  • 1 reply
  • 3322 views

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.

This topic has been closed for replies.

1 reply

ota-s
ota-sAuthor
Associate II
September 3, 2019

​�?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.