cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 RTC Alarm OUT

Denys_T
Associate II

Hi,

I'm trying to get an alarm signal on an external contact (PC13). In the program everything works as it should and the interrupt occurs, but nothing changes on the external contact. What did I miss?Screenshot_8.png

 

 

 
 
 
 
 
12 REPLIES 12
LCE
Lead III

Check the source files, is the GPIO set up correctly?

PS: </> this is for displaying source code

I make the settings in the cube, and the pc13 pin is automatically configured to RTC_OUT_ALARM. Or is something else required?

I switched the signal output to PB2 and still nothing changes, the interrupt is triggered but nothing is output to the external pin. I don’t know what to doScreenshot_10.png

LCE
Lead III

Sorry, I don't know about the Cube settings.

Sooner or later you have to check the source code that is created anyway, so why not start now? 😉

So check all the C code for RTC and GPIO setup, check the HAL functions and which registers are set (-> reference manual).

At least the interrupt triggers, so if nothing else works you could toggle that pin in the ISR.

Denys_T
Associate II

Through trial and error, I found out that the signal goes to this pin in a situation where if I set the alarm and turn off the power (VDD), only Vbat remains, then everything works and the voltage appears on PC13. If VDD remains, then only the interrupt is triggered and pc13 is not. I need the alarm signal output to turn on the LDO, so this situation suits me, but it still works somehow strangely. The RTC and alarm settings have been checked more than once, there are no problems.

Hello,

What about the bit value of RTC_ALARM_TYPE in RTC_OR register? is it configured in Open drain mode (value 0)? in that case you will not see anything on the pin.

SofLit_0-1707755903551.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

Also did you connect VBAT to VDD? PC13 is supplied from VBAT if VDD is lost.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

The output is configured as push-pull. Vbat and VDD are different sources and are not related to each other.Screenshot_11.png

How do you observe the pin?

Did you try to set it to GPIO Output (without setting it to RTC alarm - you may need to reset the backup domain if you have it powered from battery) and toggle, to see if your connections are OK?

Read out and check/post all related RTC registers content, see GPIOs controlled by the RTC subchapter of RTC chapter in RM.

JW