Communicates between Arduino-programmed AVR and Maxim DS3231 RTC: splice of Ayars' (http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html) and Jeelabs/Ladyada's (https://github.com/adafruit/RTClib) libraries
Immediately after uploading, the device loses its Serial connection to the computer. The connection must be restored with a quick double-tap of the reset button before code can be uploaded again.
The other constructors, that use numeric parameters, do not cause this problem in a declaration statement. However, I might have seen a similar result when using the RTClib::now() function farther along in a program. Can't remember.
Perhaps DateTime should be approached with caution on SAMD21 hardware because this repo was written for 8-bit AVR chips. I wonder whether an attempt to read or write some memory location that is not 32-bit aligned may be causing a hard fault which hangs up the CPU.
In the interest of preserving compactness when compiled for AVRs, it may be desirable to create an alternate code body for DateTime to be compiled for the SAMD21G18A architecture. Putting this issue out there for the community to consider. Hope someone who knows the DateTime code intimately can address this issue with skill, before I try to wrap my amateurish hands around it.
The following constructor caused a hard fault on a SAMD21 device:
DateTime (const char* date, const char* time);
The following minimal snippet illustrates the trouble:
Immediately after uploading, the device loses its Serial connection to the computer. The connection must be restored with a quick double-tap of the reset button before code can be uploaded again.
The other constructors, that use numeric parameters, do not cause this problem in a declaration statement. However, I might have seen a similar result when using the RTClib::now() function farther along in a program. Can't remember.
Perhaps DateTime should be approached with caution on SAMD21 hardware because this repo was written for 8-bit AVR chips. I wonder whether an attempt to read or write some memory location that is not 32-bit aligned may be causing a hard fault which hangs up the CPU.
In the interest of preserving compactness when compiled for AVRs, it may be desirable to create an alternate code body for DateTime to be compiled for the SAMD21G18A architecture. Putting this issue out there for the community to consider. Hope someone who knows the DateTime code intimately can address this issue with skill, before I try to wrap my amateurish hands around it.
David