2015-06-18 06:25 AM
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 .2015-06-18 08:30 AM
/* 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.
2015-06-19 07:48 AM
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.2015-06-19 08:39 AM
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 handSTM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\RTC\LSI_Calib\main.cPC13 is an odd pin as it's in the Low Power Domain.