zephyr/samples
Andy Ross b8ffd9acd6 sys_clock: Make clock_always_on true by default
This flag is an indication to the timer driver that the OS doesn't
care about rollover conditions of the tick count while idling, so the
system doesn't need to wake up once per counter flip[1].  Obviously in
that circumstance values returned from k_uptime_get_32() are going to
be wrong, so the implementation had an assert to check for misuse.

But no one understood that from the docs, so the only place these APIs
were used in practice were as "guards" around code that needed to call
k_uptime_get_32(), even though that's 100% wrong per docs!

Clarify the docs.  Remove the incorrect guards.  Change the flag to
initialize to true so that uptime isn't broken-by-default in tickless
mode.  Also move the implemenations of the functions out of the
header, as there's no good reason for these to need to be inlined.

[1] Which can be significant.  A 100MHz ARM using the 24 bit SysTick
    counter rolls over at about 6 Hz, and if it had to come out of
    idle at that rate it would be a significant power issue that would
    swamp the gains from tickless.  Obviously systems with slow
    counters like nRF or 64 bit ones like RISC-V or x86's TSC aren't
    as affected.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
application_development cmake: Fall back to ZEPHYR_BASE when the board is not in BOARD_ROOT 2018-10-01 09:46:46 -04:00
basic tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
bluetooth tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
boards tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
cpp_synchronization tests/samples: rename 'app' tag to something meaningful 2018-10-16 09:17:51 -04:00
display samples: add sample for character framebuffer 2018-10-16 14:54:47 -04:00
drivers tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
hello_world tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
mpu tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
net sys_clock.h: Make "global variable" APIs into proper functions 2018-10-16 15:03:10 -04:00
nfc/nfc_hello tests/samples: rename 'app' tag to something meaningful 2018-10-16 09:17:51 -04:00
philosophers sys_clock: Make clock_always_on true by default 2018-10-16 15:03:10 -04:00
sensor tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
shields tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
subsys tests/samples: cleanup tags 2018-10-16 09:17:51 -04:00
synchronization tests/samples: rename 'app' tag to something meaningful 2018-10-16 09:17:51 -04:00
testing/integration cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts 2018-08-15 04:06:50 -07:00
xtensa_asm2 coccicnelle: Ignore return of memset 2018-09-14 16:55:37 -04:00
kernel.rst doc: spelling fixes in samples/ and boards/ 2017-06-12 18:28:08 -04:00
samples.rst samples: Provide x-nucleo-iks01a1 shield sample 2018-09-21 18:51:26 -04:00