Hi,
I like to use the built in RTC module on the "Adafruit Grand Central M4 (SAMD51)" board. I get the following errors. I used the example that was provided by Arduino for this header file, and it came back with the same error messages, see below:
S:\MyProject\AVR\Arduinosketchbook\libraries\RTCZero\src\RTCZero.cpp:46:7: error: 'struct Pm' has no member named 'APBAMASK'
46 | PM->APBAMASK.reg |= PM_APBAMASK_RTC; // turn on digital interface clock
| ^~~~~~~~
S:\MyProject\AVR\Arduinosketchbook\libraries\RTCZero\src\RTCZero.cpp:46:23: error: 'PM_APBAMASK_RTC' was not declared in this scope; did you mean 'MCLK_APBAMASK_RTC'?
46 | PM->APBAMASK.reg |= PM_APBAMASK_RTC; // turn on digital interface clock
| ^~~~~~~~~~~~~~~
| MCLK_APBAMASK_RTC
S:\MyProject\AVR\Arduinosketchbook\libraries\RTCZero\src\RTCZero.cpp:55:28: error: 'struct Pm' has no member named 'RCAUSE'
55 | if ((!resetTime) && (PM->RCAUSE.reg & (PM_RCAUSE_SYST | PM_RCAUSE_WDT | PM_RCAUSE_EXT))) {
| ^~~~~~
S:\MyProject\AVR\Arduinosketchbook\libraries\RTCZero\src\RTCZero.cpp:55:42: error: 'PM_RCAUSE_SYST' was not declared in this scope; did you mean 'RSTC_RCAUSE_SYST'?
55 | if ((!resetTime) && (PM->RCAUSE.reg & (PM_RCAUSE_SYST | PM_RCAUSE_WDT | PM_RCAUSE_EXT))) {
| ^~~~~~~~~~~~~~
| RSTC_RCAUSE_SYST
S:\MyProject\AVR\Arduinosketchbook\libraries\RTCZero\src\RTCZero.cpp:55:59: error: 'PM_RCAUSE_WDT' was not declared in this scope; did you mean 'RSTC_RCAUSE_WDT'?
55 | if ((!resetTime) && (PM->RCAUSE.reg & (PM_RCAUSE_SYST | PM_RCAUSE_WDT | PM_RCAUSE_EXT))) {
| ^~~~~~~~~~~~~
| RSTC_RCAUSE_WDT