Skip to content
Snippets Groups Projects
Select Git revision
  • 756c13dfa4172ae5722f491fbbbbf9c4494cd27c
  • ctx default
  • master protected
  • rahix/bhi160-cleanup
  • schneider/ble-hid
  • schneider/bsec
  • schneider/212-reset-hardware-when-entering-repl
  • schneider/exnostat-remove-gapple
  • schneider/g-watch
  • schneider/ble-time
  • schneider/bonding-fail-if-full
  • schneider/bonding-naming
  • schneider/rng-btle
  • schneider/trng-enable-fix
  • schneider/sdk-0.2.1-12
  • schneider/ble-critical-section
  • schneider/covid-tracing
  • schneider/ble-fixes-2020-3
  • schneider/spo2-playground
  • schneider/mpy-portstate
  • schneider/fix-ble-mac-write
  • v1.15
  • v1.14
  • v1.13
  • v1.12
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
40 results

rtc.c

Forked from card10 / firmware
Source project has a limited visibility.
  • Ferdinand Bachmann's avatar
    756c13df
    epicardium/rtc: fix numerically unstable subsecond decoding · 756c13df
    Ferdinand Bachmann authored
    the subsecond encoding function from epic_rtc_set_milliseconds and the
    corresponding decoding function from epic_rtc_get_milliseconds are not
    numerically stable.
    
    i.e., encoding 5 milliseconds to 20 subsecs and immediately afterwards decoding
    that yields 4 milliseconds.
    
    Adding a bias of 999 (0.24 milliseconds) to the decoding function makes it
    numerically stable, while never decoding any subsecond value to more than 999
    milliseconds.
    756c13df
    History
    epicardium/rtc: fix numerically unstable subsecond decoding
    Ferdinand Bachmann authored
    the subsecond encoding function from epic_rtc_set_milliseconds and the
    corresponding decoding function from epic_rtc_get_milliseconds are not
    numerically stable.
    
    i.e., encoding 5 milliseconds to 20 subsecs and immediately afterwards decoding
    that yields 4 milliseconds.
    
    Adding a bias of 999 (0.24 milliseconds) to the decoding function makes it
    numerically stable, while never decoding any subsecond value to more than 999
    milliseconds.