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>
This was another "global variable" API. Give it function syntax too.
Also add a warning, because on nRF devices (at least) the cycle clock
runs in kHz and is too slow to give a precise answer here.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This just got turned into a function from a "variable" API, but
post-the-most-recent-patch it turns out to be degenerate anyway.
Everyone everywhere should always have been using the kconfig variable
directly, and it was only a weirdness in the tickless API that made it
confusing. Fix.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This was only used in a few places just to indirect the already
perfectly valid SYS_CLOCK_TICKS_PER_SEC value. There's no reason for
these to ever have been kconfig units, and in fact the distinction
appears to have introduced a hidden/untested bug in the power
subsystem (the two variables were used interchangably, but they were
defined in reciprocal units!).
Just use "ticks" as our time unit pervasively, and clarify the docs to
explain that.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The existing API defined sys_clock_{hw_cycles,ticks}_per_sec as simple
"variables" to be shared, except that they were only real storage in
certain modes (the HPET driver, basically) and everywhere else they
were a build constant.
Properly, these should be an API defined by the timer driver (who
controls those rates) and consumed by the clock subsystem. So give
them function syntax as a stepping stone to get there.
Note that this also removes the deprecated variable
_sys_clock_us_per_tick rather than give it the same treatment.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The kernel.h file had a bunch of internal APIs for timeout/clock
handling mixed in. Move these to sys_clock.h, which it always
included (in a weird location, so move THAT to kernel_includes.h with
everything else).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Configure spi chip select based on pinmap defines, add support
for hardware chip select control support.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Add monochrome character framebuffer for monochrome
graphic dot matrix displays and electrophoretic displays.
These displays are mostly monochrome and can only display
black and some other color, for example white. Typically,
a byte controls 8 pixels, arranged vertically or horizontally
depending on the controller or settings.
The API is not suitable to display graphics, the purpose is
to display text or symbols. It is possible to use several fonts.
A font can also consist of graphic symbols only and thus,
for example, enable the realization of a menu.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Adding 'bsd' to the include path causes problems when gnuarmemb is
used. The wrong errno.h will be used in the build, causing unresolved
references to ENOTSUP.
See PR #10554 for more details.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The 'run' target was missing it's dependency on the executable and
thereby behaving incorrectly.
This fixes#10639 .
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The config file sourced in openocd.cfg is the nuclean_f3 one instead of the one for
the stm32373c.
This makes it impossible to flash the stm32373c evaluation board rev.B:
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'
error: command exited with status 1:
/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -s
/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts
-f
/home/maudat/repo_upstream/zephyr/boards/arm/stm32373c_eval/support/openocd.cfg
-c init -c targets -c 'reset halt' -c 'flash write_image erase
/home/maudat/repo_upstream/zephyr/samples/basic/blinky/build/zephyr/zephyr.bin
0x8000000' -c 'reset halt' -c 'verify_image
/home/maudat/repo_upstream/zephyr/samples/basic/blinky/build/zephyr/zephyr.bin
0x8000000' -c 'reset run' -c shutdown
Replace the file sourced by stm32f3discovery.cfg to flash successfully.
Signed-off-by: Mathieu Audat <mathieu.audat@savoirfairelinux.com>
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Our code base doesn't have spaces both after the opening parenthesis
and the closing parenthesis. "func( arg )" vs "func(arg)".
This patch adds the rule to remove the spaces.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.
Avoid short abbriviations and using full names for fs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
After merging tinycrypt testcases, we left the original identifier, this
is not called crypto.tinycrypt.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
bat_commit is an old and obsolete tag that has not been maintained over
time and was supposed to serve a purpose that is obsolete now. Also
rename core tag with kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add option to disable legacy pairing and only use secure connection.
If legacy pairing was requested pairing will be denied with status
insufficient authenticated
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Added implementation to avoid retransmitting NACK-ed Tx PDU,
to save on current consumption in retrying to transmit in
case peer device has no free buffer to receive the PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
IRQ_CONNECT calls in the SiFive GPIO driver were misconfigured when the
conversion to DeviceTree support occurred.
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Add sample application for LSM303DLHC, ST MEMS
system-in-package featuring a 3D digital linear
acceleration sensor and a 3D digital magnetic
sensor.
Enable sample to build on stm32f3_disco board
during sanitycheck.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Enable LSM303DLHC, ST MEMS system-in-package featuring
a 3D digital linear acceleration sensor and a 3D digital
magnetic sensor, on stm32f3_disco board.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Before entering userspace, the MPU stack guard is
configured to guard the default (i.e. afterwards, the "user")
thread stack, as the privileged stack has not yet been set. Upon
entering userspace the MPU stack guard needs to be re-programmed
to the privileged stack, otherwise, there is a risk that the
first system call might be serviced without privileged stack
protection, if it occurs before any context-switch. This commit
fixes this issue, by calling configure_mpu_stack_guard(..) upon
userspace entering.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Sync peripheral mapping documentation with the Nucleo F429ZI board doc
and add missing information about Ethernet and the button.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
Define a SPI baud rate, as well as WS2812_STRIP_ONE_FRAME and
WS2812_STRIP_ZERO_FRAME values, that work for nRF5 devices.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
The given defaults were chosen for 96b_carbon, which is an STM32F4X
board that supports the specified WS2812_STRIP_SPI_BAUD_RATE exactly.
Rather than assume the rest of the world works that way, guard the
Kconfig options accordingly.
This is preparation work for adding configuration for other hardware.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>