Skip to main content
Graeme Gets
Associate
June 14, 2018
Question

FCRSF not being set (LCD_WaitForSynchro)

  • June 14, 2018
  • 1 reply
  • 722 views
Posted on June 14, 2018 at 09:52

Hi, 

When I write to the FCR register (via HAL_LCD_Init) , the FCRSF is not being set afterwards and so the LCD_WaitForSynchro is failing.

/* Loop until FCRSF flag is set */

while(__HAL_LCD_GET_FLAG(hlcd, LCD_FLAG_FCRSF) == RESET)

{

if((HAL_GetTick() - tickstart ) > LCD_TIMEOUT_VALUE)

{

hlcd->ErrorCode = HAL_LCD_ERROR_FCRSF;

return HAL_TIMEOUT;

}

}

This is code generated for the STM32L152c discovery board by STMCube32. I assume this is to do with domain clock sync, but not sure what the fault is. 

Many Thanks

#fcrst #lcd #fcr
This topic has been closed for replies.

1 reply

Graeme Gets
Associate
July 16, 2018
Posted on July 16, 2018 at 15:20

I have figured this out. The RTC Clock Select was not being set. Once I added 

RCC->CSR |= RCC_CSR_RTCSEL_LSE; 

to select the Low-Speed External clock, it worked and the FCRSF flag is being set. The default value is Zerto is 'No Clock' and as the LCD shares the RTC clock signal this needs to be set before it can work.

Hope this helps