These APIs provide the support of virtual timers. All timers
can be started, restarted, or stopped. Timers can be configured
as one-shot or periodic.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
APIs to introduce wait i.e osDelay and osDelayUntil are defined
here. They are analogous to k_sleep in the kernel.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Implement support for Kernel management APIs like
osKernelInitialize, osKernelGetTickCount, osKernelGetSysTimerCount
etc.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
CMSIS RTOS API provides a generic RTOS interface for embedded
processors (actually for Cortex-M processors but are generic
enough to be used elsewhere). This header file is for V2 version.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Buffer sizes aren't required to be power of 2 for a while. Describe
that by setting buffers sizes to 0, one can get non interrupt driven
operation.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Let's have more orthogonal and cleaner API, where buffers are
configured by tty_set_rx_buf/tty_set_tx_buf, and only them. It
means that newly initialized tty starts in unbuffered mode, which
is somewhat a sidestep from a main usecase behind tty, which is
buffered operation, but again, having a cleaner API (and good
docs, explaining users how it should be and what they should do)
prevails.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The whole "tty" concept is conceived around efficient
interrupt-driven operation. However, it's beneficial to add
non interupt-driven operation under the same API:
1. Wider usecase coverage in general.
2. Allows to use the same familiar API (based on POSIX concepts)
even for UART implementations without interrupt support.
3. Allows to switch operation dynamically based on the needs.
For example, if the system is in degraded mode and interrupt
handling cannot be trusted/disabled, allows to still output
diagnostic information to user. This was the original motivation
to provide such a mode, to support logging subsystem's "panic"
mode.
To implement this feature, tty_set_rx_buf() and tty_set_tx_buf()
functions are provided, allowing to reconfigure buffers used
dynamically. If configured buffer length is 0, the operation
switched to unbuffered.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
We only need to add the reg property in flash0 and sram0,
in the different DTS headers for the nRF SOCS. We do not
seem to need to define the nodes again. This commit applies
this simplification for flash and sram sizes definition.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Aid user in understanding what CMake expects of:
* Document and add CMAKE_SYSTEM_VERSION
* Document CMAKE_SYSTEM_NAME
* Document CMAKE_SYSTEM_PROCESSOR
* Document BUILD_SHARED_LIBS
* Document Policies CMP0002, CMP0079
CMAKE_SYSTEM_VERSION is required officially by CMake, but appears
unused -- at least now we are compliant.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
CheckCCompilerFlag and CheckCXXCompilerFlag does not belong to
extensions.cmake since they are standard CMake files. Boilerplate
seems more appropriate.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
These variables affect how CMake locates programs, libraries, include
files, and CMake packages. But the defaults are sufficient for Zephyr.
NEVER: Only host system's root will be searched.
ONLY: Only the paths specified by a variable will be searched. Typically
these paths point to cross-compilers.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Nordic UICR are non-volatile memory registers for
configuring user-specific settings. Basically it is subset of flash
memory available in the SoC.
Add support for operations on NVM which belongs to UICR.
UICR are written or read as ordinary flash memory.
For erasing UICR it is required to call erase with UICR start
address and its size (this is caused by what hardware supported).
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
We can't invoke west's main as a subprocess, or control-C from GDB in
a 'west debug' will terminate the program. Import it and run main as a
function in the same process instead.
Clean up some cruft and remove unused code while we're here, to keep
this file shorter.
Signed-off-by: Marti Bolivar <marti@foundries.io>
This application benchmarks the various cryptographic primitives
offered by mbed TLS.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
nRF 16MHz clock is used by both BLE radio and temperature sensor.
During BLE connection if the temperature sensor is also used then
at some point assert condition is hit in temp_nrf5_sample_fetch().
The error code -EBUSY seen during clock_control_off() is that clock
is no longer needed for the temperature sensor, but it cannot be
just turned off because it is still needed for BLE connection.
Signed-off-by: Dhananjay Gundapu Jayakrishnan <dhananjay.jayakrishnan@proglove.de>
Fix the following warning that shows up in some NRF device tree files:
Warning (simple_bus_reg): /soc/pwm@4002D000: simple-bus unit
address format error, expected "4002d000"
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
ieee802154_nrf5 uses net_analyze_stack function in a loop, which
prints logs at inf level. As net_core's log level is used in
this function which by default is set to inf, it kept spamming stack
usage logs.
Prevent this behavior by adding additional log level check in the driver
itself, so that this log will only be printed if
IEEE802154_DRIVER_LOG_LEVEL is set to debug.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
On i.mx6/7 the TCMU and TCML regions are specific to instruction or
data. So use the nxp,imx-itcm for TCML and nxp,imx-dtcm for TCMU.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The imx-rt-{i,d}tcm bindings can actually be utilized on the i.MX6/7 as
well for the TCM{L,U} regions of memory as they are specific to
instruction or data.
So let's rename imx-rt-{i,d}tcm to imx-{i,d}tcm.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Refactored blocking operation of RTT backend. Log_output buffer
is used directly in case of blocking operation. Detection of
host presence added. Prevent use of RTT lock when in panic mode.
Removed pending on data being read by the host on every message.
Refactor gives savings of 300 bytes in ROM and 120 bytes in RAM.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix an issue wherein local or remote initiated Connection
Parameter Request procedure would stall without generation
of LE Connection Update Complete HCI event because a local
or remote initiated PHY Update procedure has overwritten the
currently active Link Layer Control Procedure type.
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa@gmail.com>
According with MISRA-C the value returned by a non-void function has
to be used. As memcpy return is almost useless, we are explicitly
ignoring it.
MISRA-C rule 17.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
According with MISRA-C the value returned by a non-void function has
to be used. As memcpy return is almost useless, we are explicitly
ignoring it.
MISRA-C rule 17.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The return of memcpy was being ignored just like memset's return. Just
adding it to coccinelle script.
MISRA-C rule 17.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
According with MISRA-C the value returned by a non-void function has
to be used. As memcpy return is almost useless, we are explicitly
ignoring it.
MISRA-C rule 17.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Log message get timestamp when being added to shell log message queue.
When adding to log message queue timeouts then all messages added
before timeout are dropped.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
If burst of log messages was passed to the shell log
backend, it was likely that messages were lost because
shell had no means to control arrivals of log messages.
Added log message enqueueing timeout to the shell instance
to allow blocking logger thread if short-term arrival rate
exceeded shell capabilities.
Added kconfig option for setting log message queue size
and timeout in RTT and UART instances. Added section in
shell documentation which explains interaction between
the logger and shell instance acting as a logger backend.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Convert lsm9ds0_mfd accel/magn driver to get the device name as well
as i2c slave information from device tree. Updates the build_all
test accordingly.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Fixed channel type in get accel/magn channel routines,
where, by mistake, GYRO definitions were used instead of
ACCEL/MAGN ones.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Changed number of valid arguments from two required to
one required and one optional.
Command can be called with required <type: off, on, scan, nconn>
and optional <mode: discov, non_discov>".
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Extended log_output interface to handle dropped
messages. Log_output is printing a message containing
number of dropped messages.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Update menuconfig (and Kconfiglib, just to sync) to upstream revision
e629c33d31e22, to add the commit below.
menuconfig: Add show-help mode
Pressing F toggles show-help mode, where the help window at the bottom
displays the help text of the currently selected item, if any. Can be
handy when browsing through symbols.
Also mention the different modes that are available in the module
docstring.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fixes board PHY initialization.
ENET_RST and ENET_INT pins are also used as USER_LED/JTAG_TDI and
INT1_COMBO/JTAG_TDO. Initialization needs to set these pins to power and
interrupt for the PHY Transciver. PHY reset works without busy waiting.
Moved pin initialization back to PRE_KERNEL_1 to fix UART bug and busy
wait not required.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Due to a bad timing in merging PR #10744 and PR #12083, the flash0 node
in stm32f756Xg.dtsi ended-up at the root of the device tree, while the
flash0 node it is trying to override in stm32f7.dtsi is now under
/soc/flash-controller.
This patch fixes that by moving it at the right location.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Added support for SPI 1 available from the arduino connector (plus an
extra gpio). Tested against samples/sensor/bme280.
Added warnings in documentation, pinmux and dts highlighting a potential
conflict if using SPI_1 and on-board ethernet at the same time.
Signed-off-by: AJ Palmer <ajpcode@hotmail.com>