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

    Core2 RTC

    Core 2
    3
    3
    6.6k
    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
      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
        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
          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
          • First post
            Last post