🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core2 RTC

    Scheduled Pinned Locked Moved Core 2
    3 Posts 3 Posters 7.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sheepDog
      last edited by sheepDog

      Hello,
      the library RTC control then BM8563. It is possible to get and set time and date.

      If I set the time, the display on the screen was correct, but the RTC stopped running.
      I used these lines to setup time and date:

          RTC_DateTypeDef RTC_DateStruct;
          RTC_DateStruct.WeekDay = 3;
          RTC_DateStruct.Month   = 9;
          RTC_DateStruct.Date    = 23;
          RTC_DateStruct.Year    = 2020;
          M5.Rtc.SetData(&RTC_DateStruct);
          RTC_TimeTypeDef RTC_TimeStruct;
          RTC_TimeStruct.Seconds = 0;
          RTC_TimeStruct.Minutes = 0;
          RTC_TimeStruct.Hours   = 12;
          M5.Rtc.SetTime(&RTC_TimeStruct);
      

      There is a stop bit at BM8563 but how can I set it correct with the M5Core2 RTC-library?

      V 1 Reply Last reply Reply Quote 0
      • V Offline
        vgamlc @sheepDog
        last edited by

        I have the same problem, the time is right but the date is wrong. please a solution

        1 Reply Last reply Reply Quote 0
        • S Offline
          sirpenrose
          last edited by

          Try to replace

          M5.Rtc.SetData(&RTC_DateStruct);
          with
          M5.Rtc.SetDate(&RTC_DateStruct);

          it worked for me.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post