Open trlafleur opened 6 years ago
Hi @trlafleur ,
it looks like the D21 (and probably all Atmel/Microchip CortexM0 family) defines WDT
as the watchdog register, thus shadowing the original WDT bitfield definition.
Adding
#ifdef WDT
#undef WDT
#endif
at the top of the sketch makes the code compile as expected, however I agree that this is ugly. I'll contact Microchip for a clarification but I doubt they'll be willing to change the define since it could break user code/libraries.
This simple test of the PM->RCAUSE.bit.WDT bit cause an error in a CMSIS Macro... Other bits in RCAUSE work fine...
Arduino 1.85 SAMD21 1.6.19 CMSIS-Atmel 1.1.0