From 3696c07f0707daa106d85ccd2b81fbad1adb22dd Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 7 Feb 2022 22:12:55 +0000 Subject: stm32g4: initial platform support Have some demo code using lptim, lpuart, exti and rtc mostly working. It glitches into undefined exceptions, so it's a little concerning, but... it's all cross checked against RM0440_rev7, so it's pretty good. Signed-off-by: Karl Palsson --- rtc/stm32_rtc.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'rtc/stm32_rtc.h') diff --git a/rtc/stm32_rtc.h b/rtc/stm32_rtc.h index bc78128..d1e1c02 100644 --- a/rtc/stm32_rtc.h +++ b/rtc/stm32_rtc.h @@ -26,6 +26,31 @@ struct STM32_RTC_reg_v2ss_t { volatile uint32_t BKP[32]; /* max known 32, might be less, check DS */ }; +struct STM32_RTC_reg_v3_t { + volatile uint32_t TR; + volatile uint32_t DR; + volatile uint32_t SSR; + volatile uint32_t ICSR; + volatile uint32_t PRER; + volatile uint32_t WUTR; + volatile uint32_t CR; + uint32_t _reserved1[2]; + volatile uint32_t WPR; + volatile uint32_t CALR; + volatile uint32_t SHIFTR; + volatile uint32_t TSTR; + volatile uint32_t TSDR; + volatile uint32_t TSSSR; + volatile uint32_t ALRMAR; + volatile uint32_t ALRMASSR; + volatile uint32_t ALRMBR; + volatile uint32_t ALRMBSSR; + volatile uint32_t SR; + volatile uint32_t MISR; + volatile uint32_t SCR; +}; + + template class STM32_RTC_t : public mmio_ptr { public: -- cgit v1.2.3