When disabling the interrupt current implementation of the
gpio_pin_interrupt_configure function will first reconfigure the
interrupt to be active on gpio low level.
Since the pin interrupt is enabled if the gpio pin level happens
to be low at the time the interrupt will trigger immediately.
Rewrite the function to disable the interrupt in a safe manner.
Signed-off-by: Frank Li <lgl88911@163.com>
The net_buf subsystem is now fully compatible with the new timeout
API, so move the selection of the legacy API to those specific
subsystems that use net_buf and still need converting.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This patch updates the net_buf API to use k_timeout_t in essentially
all places where "s32_t timeout" was previously used. For the most
part the conversion is trivial, except for the places where
intermediate decrements of remaining timeout is needed. For this the
z_timeout_end_calc() API is used.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Delay radio abort called in the flash driver to emulate the
behavior of pre-empt timeout in Bluetooth LL split
controller. Without this, the driver aborted radio events
in its reserved time space.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
At present wdt_gecko driver supports ULFRCO as its only clock source.
Select the clock explicitly, do not rely on the default configuration
provided by the SiLabs header files. The default configuration is
changing between different SiLabs HAL versions.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Add additional build configurations to the shell to catch build errors
when enabling extended advertising.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix compilation issue when extended advertising is enabled but privacy
is disabled. In this case the rpa_update work is compiled out.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The fxos8700 sample application configures the sensor driver to sample
data at 6.25 Hz. Most configurations use the sensor data ready interrupt
to throttle the loop, but it's possible to configure the sample not to
use the data ready interrupt. In this case, throttle the loop with a
delay so it doesn't outpace the sensor data.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The frdm-kl25z, bbc_microbit, and reel_board have an mma8xxx
accelerometer and therefore must use the fxos8700 driver in
accelerometer-only mode instead of hybrid mode. Refactor these boards
into a separate test that uses the prj_accel.conf configuration as
described in README.rst.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Use existing network stack calls to create net pkt,
ip header and udp header creation. Also simplify
finalize api calls.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use existing network stack calls to create net pkt,
ip header and tcp header creation. Also simplify
finalize api calls.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
net_context local sin/sin6 addresses are used only
when input src is not available. So ASSERT should
be inside if block.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use <arch/arm/aarch32/cortex_m/cmsis.h> include instead of <zephyr.h> to
get access to Cortex-M CMSIS API.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Kconfig options that enable I2C and SPI instances are no longer used
in nRF drivers. Remove all assignments done to these options in related
board definitions, samples, and tests.
For nrf52_pca20020, also no longer needed setting of default values
for GPIO_SX1509B* options is removed (now the gpio_sx1509b driver is
enabled by default when a corresponding devicetree node is enabled).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Enable the gpio_sx1509b driver by default when a "semtech,sx1509b"
compatible node is enabled in devicetree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Make I2C and SPI drivers for nRF SoCs no longer dependent on Kconfig
options that enable instances (i.e. I2C_x and SPI_x). Now these drivers
enable hardware instances when corresponding nodes in devicetree are
enabled (have status "okay").
For I2C, SPI, and UART drivers, instead of using Kconfig dependencies
to prevent enabling of hardware instances that cannot be used together
(e.g. SPIM1 and TWIM1), a file that signals invalid configurations with
build assertions is added to compilation.
Also dependencies on HAS_HW_NRF_* options are removed from Kconfigs
of I2C, SPI, and UART drivers, as for hidden options that activate
proper type of driver such dependencies are not actually helpful.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Remove prompts from Kconfig options `UART_x_NRF_UART*` that select
the type of nrfx driver (for UART or UARTE peripheral) to be used
for a given instance. This prevents the options from being modified
from configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding UART node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between UART and UARTE for a given instance.
Since all `UART_x_NRF_UART*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Remove prompts from Kconfig options `I2C_x_NRF_TWI*` that select
the type of nrfx driver (for TWI or TWIM peripheral) to be used
for a given instance. This prevents the options from being modified
from configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding I2C node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between TWI and TWIM for a given instance.
Since all `I2C_x_NRF_TWI*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Remove prompts from Kconfig options `SPI_x_NRF_SPI*` that select the
type of nrfx driver (for SPI, SPIM, or SPIS peripheral) to be used
for a given instance. This prevents the options from being modified
in configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding SPI node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between SPI, SPIM, and SPIS for a given instance.
Since all `SPI_x_NRF_SPI*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This function takes a 'label' and returns "y" if an "enabled" node with
such label can be found in the EDT and that node is compatible with the
provided 'compat', otherwise it returns "n".
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The last regex in the yaml file did not match when executing the test on
an embedded target. The expected two spaces are not present at the
beginning of the line.
Fixes#23919
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
In case hardware CSMA CA is used, ieee802154 L2 does not initialize ACK
processing structures, as it does not need to process ACK messages. As
it is not possible to conditionally disable ACK reporting to the upper
layer, ieee802154 could end up using uninitialized kernel primitive
(semaphore) in the ACK handler, which lead to a crash.
Avoid this, by explicitly checking in the ACK handler, if HW CSMA CA is
used.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add CSMA CA capability for the `ieee802154_nrf5` radio driver along with
appropriate implementation in the `nrf5_tx` function.
Introduce 802.15.4 radio driver with CSMA/CA support enabled. Add help
text, mentioning a list of peripherals occupied by the radio driver.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Even though radio driver can report in its capabilities that it does
support CSMA CA, there's no way in the driver to select how the frame
should be transmitted (with CSMA or without). As layers above radio
driver (Thread, Zigbee) can expect that both TX modes are available, we
need to extend the API to allow either of these modes.
This commits extends the API `tx` function with an extra parameter,
`ieee802154_tx_mode`, which informs the driver how the packet should be
transmitted. Currently, the following modes are specified:
* direct (regular tx, no cca, just how it worked so far),
* CCA before transmission,
* CSMA CA before transmission,
* delayed TX,
* delayed TX with CCA
Assume that radios that reported CSMA CA capability transmit in CSMA CA
mode by default, all others will support direct mode.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Convert driver to utilize the new DT_INST macros completely and remove
associated Kconfig symbols that now come from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move to using DT_NODELABEL to get references to specific GPIO ports on
various boards that utilize the arm,cmsdk-gpio controller.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>