RTCZero.h, RTCZero.cpp:46:7: error: 'struct Pm' has no member named 'APBAMASK'

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

I don't know if there was a change, but:

For now we are not supporting the SAMD51. Maybe in the future :slight_smile:

Source: https://github.com/SodaqMoja/Sodaq_wdt/issues/3

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.