diff options
author | Karl Palsson <karlp@tweak.net.au> | 2022-02-07 23:12:55 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-04-16 21:37:28 +0200 |
commit | 3696c07f0707daa106d85ccd2b81fbad1adb22dd (patch) | |
tree | 5870b4364cee9d4d55e11129875f8bd4bd126d69 /rtc | |
parent | e115add00df34b9aabc97980dcb51204d624bd63 (diff) |
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 <karlp@tweak.net.au>
Diffstat (limited to 'rtc')
-rw-r--r-- | rtc/stm32_rtc.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 <typename T> class STM32_RTC_t : public mmio_ptr<T> { public: |