-
Notifications
You must be signed in to change notification settings - Fork 51
[Enhancement] Implement RTC Seconds Interrupt for STM32F1xx #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implement built-in RTC Seconds Interrupt
Only enable Seconds interrupt on stm32f1xx
Only available on core version > 1.9.0
@fpistm |
Well second interrupt for all should be fine for all series but to keep genericity this should not be dependent of a dedicated alarm. |
I'm fairly certain that only the F1xx series actually has a seconds interrupt, that's why I was thinking about using the unused alarm. I went through a number of the other series in STM32CubeMX configuration and only the F1xx series seemed to have the seconds interrupt available. If it isn't available would it be best to only put support in for seconds interrupts on the F1xx series? |
Right, I'm thinking about the periodic auto-wakeup which can be used for this. But maybe I'm wrong. |
You may be onto something there, I ignored that option initially because I was thinking it only triggered an interrupt on PC13 but it seems that may be an optional feature. I'll look into using the PWUT to implement this feature for other variants. |
I've only got a few different STM32F1xx based boards at the moment so can't test the Periodic wakeup timer, I'm waiting for some new dev boards to arrive in the mail before I can continue with this, might be a couple of weeks |
Disable check for STM32F1XX variants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Astyle change have to be fixed.
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else LGTM
Do we have a test application to demonstrate this (for ex a simple LED on and off on each 1second interrupt
please have a look at https://github.com/FRASTM/STM32RTC/tree/seconds_int |
This one has been superseded by #57. |
Implement the built-in Seconds interrupt functionality
Currently working for stm32f1xx only as the core code is already in place. I would like to implement this feature for all variants but the core HAL drivers for each variant would need to be updated to enable the seconds interrupt.
Requires core > 1.9.0 so that rtc.h and rtc.c are included from this library.
EDIT
It looks like this interrupt is not available on other variants.
For all variants that don't support the Seconds Interrupt, this could be implemented using AlarmB since its not currently accessible, might need to be able to choose between enable Seconds Interrupts or enable AlarmB to make it safe on these variants if AlarmB is going to be implemented in a future version though?
Using RTC in F0, F2, F3, F4 and L1 App note AN3371