stm32duino / STM32RTC

Arduino RTC library for STM32.
135 stars 49 forks source link

RTC_Seconds example not working on Nucleo G071RB #78

Closed Khelicon closed 2 years ago

Khelicon commented 2 years ago

I am using an STM32 RTC_Seconds example to test one second interrupt on my Nucleo G071RB (STM32G071RB) board but the interrupt does not work on my Nucleo board. I also checked on the Agafia SG0 board (STM32G071CBT6) but the second interrupt does not work.

On looking into the source files, the STM32G71x MCU has OneSecond_IRQn defined in rtc.h as #define ONESECOND_IRQn RTC_TAMP_IRQn

that uses global RTC/TAMP interrupt RTC_TAMP_IRQn = 2, /*!< RTC interrupt through the EXTI line 19 & 21 defined in stm32g071xx.h file

ABOSTM commented 2 years ago

Hi @harji2130, Thanks for reporting this issue, you are right there is a bug especially for STM32G0 implementatio, which is slightly different from other STM32 series.

I proposed a fix : #79 Fell free to test it.

drucknase commented 2 years ago

Hi, I have a similar effect with the STM32L073LZ. So the RTC second example is not working. Can you confirm? When will the new version as proposed on fix #79 be available?

fpistm commented 2 years ago

Hi, I have a similar effect with the STM32L073LZ. So the RTC second example is not working. Can you confirm? When will the new version as proposed on fix #79 be available?

The fix only apply for G0. @ABOSTM could you check if the same is valid for L0, please?

ABOSTM commented 2 years ago

PR #79 has been updated to take into account similar issue on L0, F0, U5, L5

fpistm commented 2 years ago

All series tested. Thanks @ABOSTM .