cancel
Showing results for 
Search instead for 
Did you mean: 

FCRSF not being set (LCD_WaitForSynchro)

Graeme Gets
Associate II
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
1 REPLY 1
Graeme Gets
Associate II
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