cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F105 RTC alarm output not working

Taylor.Sean
Associate II
Posted on June 18, 2015 at 15:25

I have the STM32F105 RTC alarm working correctly internal to the chip, but I cannot get the alarm to control pin PC13.

I have the BKP register configured to set the alarm output

        BKP_RTCOutputConfig(BKP_RTCOutputSource_Alarm);

and I've read the BKP memory to make sure the bit is set and BKP has not been cleared for any reason.

I have tried with and without setting PC13 to alternate function:

 GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;

  GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;

  GPIO_Init(GPIOC, &GPIO_InitStruct);

But so far I have never seen the output on PC13 move when the alarm triggers.

Have I missed something obvious: there are no examples in the std peripheral library to work off.  Thanks in advance .
3 REPLIES 3
Posted on June 18, 2015 at 17:30

/* To output signals on Tamper pin, the tamper functionality
must be disabled (by default this functionality is disabled) */
BKP_TamperPinCmd(DISABLE);
/* Enable the RTC Alarm Output on Tamper Pin */
BKP_RTCOutputConfig(BKP_RTCOutputSource_Alarm);

there are no examples in the std peripheral library to work off. I found enough to infer.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Taylor.Sean
Associate II
Posted on June 19, 2015 at 16:48

I had found the same and you'll notice I had the function call in my code.

I have tried with and without BKP_TamperPinCmd(DISABLE);  though this should not make a difference as the power up default is for the tamper function to be disabled.

I can still get no output from the PC13/Tamper/RTC pin, either with my own code, or running a modified RTC/LSI_Calib demo code (modified to run on my board).

I am using the LQFP64 and I think the pin defaults to PC13, with tamper/RTC being an alternate function.  I don't see any code in the SPL examples to set PC13 to the alternate function.
Posted on June 19, 2015 at 17:39

I'm able to see the 1PPS signal on PC13 of an F107 with very little configuration.

Slightly modified this to run on the board I have to hand

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\RTC\LSI_Calib\main.c

PC13 is an odd pin as it's in the Low Power Domain.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..