Skip to content
Snippets Groups Projects
Select Git revision
  • blink_multi_rocket
  • master default protected
  • blink_rocket
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • schneider/bsec
  • rahix/bma
  • rahix/bhi
  • schleicher-test
  • schneider/schleicher-test
  • freertos-btle
  • ch3/api-speed-eval2
  • schneider/mp-for-old-bl
  • ch3/leds-api
  • ch3/genapi-refactor
  • ch3/dual-core
  • dualcore
  • v0.0
21 results

rtc.c

Forked from card10 / firmware
Source project has a limited visibility.
  • rahix's avatar
    1b575b03
    fix(rtc): Fix rtc values not being synchronized · 1b575b03
    rahix authored
    
    Use RTC_GetTime() instead of RTC_GetSecond() because otherwise a read
    immediately following the RTC alarm will return the previous value.
    RTC_GetTime() will return E_BUSY a number of times before finally being
    successful and returning a timestamp.  To keep the system load minimal
    during this waiting, the task is put to sleep for 4ms everytime the read
    fails.  This value might need further adjustment.
    
    Signed-off-by: default avatarRahix <rahix@rahix.de>
    Verified
    1b575b03
    History
    fix(rtc): Fix rtc values not being synchronized
    rahix authored
    
    Use RTC_GetTime() instead of RTC_GetSecond() because otherwise a read
    immediately following the RTC alarm will return the previous value.
    RTC_GetTime() will return E_BUSY a number of times before finally being
    successful and returning a timestamp.  To keep the system load minimal
    during this waiting, the task is put to sleep for 4ms everytime the read
    fails.  This value might need further adjustment.
    
    Signed-off-by: default avatarRahix <rahix@rahix.de>