Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Has anyone integrated the ATSAMD51 on-chip clock/calendar wi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Has anyone integrated the ATSAMD51 on-chip clock/calendar wi

by User_UMjT7KxnxP8YN8 on Fri Aug 24, 2018 3:48 pm

Just wasted my morning recreating the Wifi101 client.remoteIP() method. Chastened, I thought I'd ask about the clock/calendar integration before starting to work on that.

User_UMjT7KxnxP8YN8
 
Posts: 170
Joined: Tue Jul 17, 2018 1:28 pm

Re: Has anyone integrated the ATSAMD51 on-chip clock/calenda

by adafruit_support_mike on Sat Aug 25, 2018 1:52 am

Not so far as we know.

No worries though.. the advice "don't reinvent the wheel" is mostly used by people outside the highly active, multibillion dollar industry of reinventing the wheel.

In terms of code, you now have a much deeper understanding of client.remoteIP() than most people. That will come in handy if you ever run into problems with it.

adafruit_support_mike
 
Posts: 61443
Joined: Thu Feb 11, 2010 2:51 pm

Re: Has anyone integrated the ATSAMD51 on-chip clock/calenda

by User_UMjT7KxnxP8YN8 on Sat Aug 25, 2018 1:00 pm

When you get older, wasting time weighs on your mind more, as you realize you have less to go around than you did 40 or 50 years ago. Plus, it's more likely you'll forget any insights before you need them again, ROFL!

I'll tackle the clock and post a breadcrumb here for others to follow when I post it on Github.

If I remember...

User_UMjT7KxnxP8YN8
 
Posts: 170
Joined: Tue Jul 17, 2018 1:28 pm

Re: Has anyone integrated the ATSAMD51 on-chip clock/calenda

by User_UMjT7KxnxP8YN8 on Mon Aug 27, 2018 3:24 pm

adafruit_support_mike wrote:Not so far as we know..


Just came across "RFC: Add rtc module #745" in github.

I see steps in the right direction in this update like setting the clock prescaler to 1024, but am not sure if the modified code has been incorporated into the SAMD51 core in the Arduino environment and if so, how to go about accessing it.

Can you point me in the right direction?

https://github.com/adafruit/circuitpyth ... /745/files

User_UMjT7KxnxP8YN8
 
Posts: 170
Joined: Tue Jul 17, 2018 1:28 pm

Re: Has anyone integrated the ATSAMD51 on-chip clock/calenda

by User_UMjT7KxnxP8YN8 on Fri Aug 09, 2019 1:11 pm

For the benefit of anyone looking for Metro M4 Express or Grand Central RTC functionality, I ended up writing a set of C functions that set it up. They can be found at https://github.com/SapientHetero/Real-time-Clock-for-ATSAMD51. I didn't need a full-blown Arduino library, just the ability to get the current UTC time in seconds, which is stored in "RTCticks" and can be read using
Code: Select all | TOGGLE FULL SIZE
uint32_t rtcGetUnixTime(void);
.

To call this from an Arduino sketch you'll need to put the following in your sketch:
Code: Select all | TOGGLE FULL SIZE
extern "C" { #include "rtcFunctions.h" }

User_UMjT7KxnxP8YN8
 
Posts: 170
Joined: Tue Jul 17, 2018 1:28 pm

Re: Has anyone integrated the ATSAMD51 on-chip clock/calenda

by dbj1906 on Thu Mar 19, 2020 11:25 pm

Hey, wanted to circle back on this to see if there is a know full RTC library for the SAMD51. I guess I can hack one together if I can't find anything already built....

dbj1906
 
Posts: 22
Joined: Sun Apr 09, 2017 10:30 am

Please be positive and constructive with your questions and comments.


cron