Skip to content
Snippets Groups Projects
Select Git revision
  • cafdfb7af3628aac5110770097b6cb4fdd70b9d5
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

modpybrtc.c

Blame
    • puuu's avatar
      cafdfb7a
      esp8266/modpybrtc: Handle RTC overflow. · cafdfb7a
      puuu authored
      ESP-SDK system_get_rtc_time() returns uint32 and therefore overflow
      about every 7:45h.  Let's write the last state of system_get_rtc_time()
      in RTC mem and use it to check for overflow. This commit require running
      pyb_rtc_get_us_since_2000() at least once within 7 hours to avoid
      overflow.
      cafdfb7a
      History
      esp8266/modpybrtc: Handle RTC overflow.
      puuu authored
      ESP-SDK system_get_rtc_time() returns uint32 and therefore overflow
      about every 7:45h.  Let's write the last state of system_get_rtc_time()
      in RTC mem and use it to check for overflow. This commit require running
      pyb_rtc_get_us_since_2000() at least once within 7 hours to avoid
      overflow.
    compile.c 140.14 KiB