Skip to main content
Explorer
March 6, 2025
Solved

RTC_OUT remap not working?

  • March 6, 2025
  • 1 reply
  • 714 views

Hi,

Im currently working on a project with an STM32L452 that uses a Temperature Compensated Crystal Oscillator (TCXO) as the Low-Speed External (LSE) clock source. The TCXO is responsible for clocking the RTC. To fully calibrate the TCXO, I have designed the hardware in such a way that I can fine-tune the input capacitance of the oscillation signal line using a trimmer capacitor.

In order to adjust the trimmer capacitor properly, I need to measure the period duration of the signal. My plan is to use a frequency counter for this measurement. Specifically, I would like to connect the frequency counter to pin PB2, which can be configured as RTC_OUT. Unfortunately, I cannot use the default PC13 pin for this purpose due to other design constraints.

According to the reference manual, enabling the RTC_OUT function on PB2 should simply require setting two bits: the COE bit in the RTC->CR register and the RTC_OUT_RMP bit in the RTC->OR register.

Despite following these steps, Im not seeing any output on PB2 when I attempt to measure the signal — the frequency counter shows nothing. I have verified that my test setup is functional because when I connect the frequency counter directly to the oscillation signal from the TCXO, I get a valid period duration reading. However, I assume this method introduces some capacitance from the probe itself, leading to inaccurate measurements.

I wouldd really appreciate any guidance on why PB2 is not outputting the RTC signal and how I might resolve this issue.

Thanks in advance!

 

    This topic has been closed for replies.
    Best answer by STOne-32

    Dear @Lennart-Lutz ,

    may be you need at start to active the PB2 port , Set the pin PB2 to its alternate function mode and Configure the alternate function for RTC output. Have a look on datasheet and Reference Manual .

    hope it helps you 

    STOne-32

    1 reply

    STOne-32Answer
    Technical Moderator
    March 7, 2025

    Dear @Lennart-Lutz ,

    may be you need at start to active the PB2 port , Set the pin PB2 to its alternate function mode and Configure the alternate function for RTC output. Have a look on datasheet and Reference Manual .

    hope it helps you 

    STOne-32