cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB TIMx clock source?

suads
Associate III

Hi,

I want to calibrate the RTC. So I need one timer to count the pulses from RTC.

The RTC clock source.(LSE external oscillator 32768 Hz) needs to be the clock source for one of the timers. In the reference design (RM0434) page 682 there are multiple clock source but I don't see the RTC_CLK.

1 ACCEPTED SOLUTION

Accepted Solutions

Which STM32WB?

The clocks arrangement differs between STM32 models significantly.

If your mcu is governed by RM0434, LSE is connected through TIM2_OR1.ETR_RMP to TIM2's ETR, which can be used e.g. as clock to TIM2 when set to External Clock mode 2, ie. TIM2_SMCR.ECE is set.

JW

View solution in original post

5 REPLIES 5
TDK
Guru

Non-LP timers can't be clocked from LSE. Looks like LPTIM1 can be clocked off of LSE.

Not sure I understand your method, though. You can't calibrate anything if both RTC and (LP)TIM are clocked from LSE.

If you feel a post has answered your question, please click "Accept as Solution".
suads
Associate III

Hi TDK,

I m referring to this document it is for another board(document AN4759),

0693W00000HoTTAQA3.pngI skipped the LPTIM section in the reference design. I thought all timers can be.

As I understand you only the LPTIMx can be configured to use the LSE oscillator?

Which STM32WB?

The clocks arrangement differs between STM32 models significantly.

If your mcu is governed by RM0434, LSE is connected through TIM2_OR1.ETR_RMP to TIM2's ETR, which can be used e.g. as clock to TIM2 when set to External Clock mode 2, ie. TIM2_SMCR.ECE is set.

JW

It Is a custom board using STM32WB55CGU6

OK so that should be covered by RM0434 and thus work as I described above.

JW