cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L073 RTC/LCD clock frequency

SZano
Associate III

The RTC/LCD clock can be derived from HSE (prescaled). In this case, the prescaler must be chosen appropriately so as to get an RTC/LCD frequency within the admissible range.

Using CubeMX, when the limits are exceeded, the tooltip says:

* (tooltip over the HSE-to-HSE_RTC prescaler): frequency must be in [0, 1] MHz

* (tooltip over RTC): frequency must be in [0, 1000] kHz

* (tooltip over LCD): frequency must be 1000 kHz

The reference manual RM0367 says something different, though:

* Section 7.2 (Clocks):

The RTC/LCD clock which is derived from the following clock sources:

– LSE clock,

– LSI clock,

– 4 MHz HSE_RTC (HSE divided by a programmable prescaler).

* Section 7.2.12 (RTC and LCD clock):

The RTC and LCD have the same clock source which can be either the LSE, the LSI, or the HSE 4 MHz clock (HSE divided by a programmable prescaler).

* Section 7.2.15 (Internal/external clock measurement using TIM21):

The HSE_RTC frequency (HSE divided by a programmable prescaler) being relatively high (4 MHz), the relative frequency measurement is not very accurate.

* Section 7.3.1 (Clock control register (RCC_CR)):

RTCPRE[1:0] ... These bits are set and reset by software to obtain a 4 MHz clock from HSE.

* Section 17.4.1 (LCD functional description):

The frequency generator allows you to achieve various LCD frame rates starting from an LCD input clock frequency (LCDCLK) which can vary from 32 kHz up to 1 MHz.

3 different clock sources can be used to provide the LCD clock (LCDCLK/RTCCLK):

• 32 kHz Low speed external RC (LSE)

• 32 kHz Low speed internal RC (LSI)

• High speed external (HSE) divided by 2, 4, 8 or 16 to obtain a 1 MHz clock

* Table 181 (Revision history):

14-Nov-2016: HSE RTC clock source frequency changed to 4 MHz.

What is the proper frequency for LCD clock, when derived from HSE?

0 REPLIES 0