Add 2 new sub-commands to the sensor command (attr_get and attr_set).
These commands can be used to access the driver's attr_set and attr_get
functions.
Signed-off-by: Yuval Peress <peress@google.com>
The following fixes were applied:
- Multicast Rx packets stats were not recorded due not parsing the
ethernet header. The function that tried to parse the ethernet header
was parsing the ethernet packet beyond the ethernet header.
- Added a new stats for unknown protocol which gets updated when the
ethernet layer encounters an unknown ethernet packet type.
Fixes#53994
Signed-off-by: Chamira Perera <chamira.perera@audinate.com>
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.
Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.
The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Use the CAN controller driver capabilities to determine if the CAN-FD
timing tests should be skipped or not. There is no need for special
handling of CONFIG_CAN_FD_MODE.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove the CAN_HAS_RX_TIMESTAMP Kconfig helper symbol in order to allow
enabling CAN RX timestamps in the API regardless of driver support.
This simplifies application prj.conf settings across board supporting/not
supporting RX timestamps considerably.
CAN drivers not supporting RX timestamps already initialize the timestamp
to 0 for received frames.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Boolean properties for STM32 ADC internal channels are not used anymore
and can be removed. It is replaced by channel number properties.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
In all STM32 dts, remove all reference to the following properties:
- has-temp-channel
- has-vref-channel
- has-vbat-channel
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that we have the information of internal channel number for STM32
ADCs in the dts, we can use it to remove a lot of specific code and
make it clearer.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that we have a binding to define the channel number for temperature
and Vref measurement, update all dtsi to include the information.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add some bindings to define STM32 ADC internal channels for:
- Temperature
- Vref
- Vbat
The goal is to transfer information to the dts instead of inside the
ADC driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Slightly refactor STM32_ADC_INIT macro.
adc_stm32_cfg_##index declaration is now part of ADC_STM32_INIT
and extracted from CONFIG_ADC_STM32_SHARED_IRQS #ifdef.
Aim is to minimize code duplication when adding new adc_stm32_cfg_X
or adc_stm32_data_Y entries
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Rework the implementation of `pm_device_children_action_run` to use the
common `device_supported_foreach` iterator.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
To write tests it is necessary to offer init function for the RDClient
to define custom fakes before.
Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
This is a follow-up to commit 205e684958.
The recently added nrf_rtc_timer test case (test_next_cycle_timeouts)
revealed a problem in the current implementation of this function.
Adjust it to avoid missing COMPARE events in specific circumstances.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add a test case that schedules a set of consecutive timeouts,
each one on the next cycle of the system timer but each time
after a slightly larger delay.
This test case reveals a problem in the current nrf_rtc_timer
implementation that sometimes a compare value can be missed
what leads to timeouts delayed by 512 seconds.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Current implementation has obvious synchronization issue with
global counter variable which is updated (RMW) in multiple threads
without any locking.
Replace regular variable by atomic type. As the maximum possible
value is much less than INT32_MAX it's OK to replace the original
uint64_t by (32-bit) atomic_t.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Remove the dependency on the test repositories having a zephyr module
file in their repositories.
With this change we can take the upstream test repositories direct
commit SHA or tag.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
RP2040 requires watchdog load time in us, but Zephyr
watchdog window values are in ms. Make sure that it is
adjusted to hardware requirements.
Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
Currently we setup irq trigger type (pulse or level) in IDU
before we Mask (disable) IRQ line.
The IDU is disabled at this moment, however we still may
accidentally generate interrupt by trigger setup.
To avoid that let's mask (disable) IRQ before trigger type setup.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
llvm based toolchains need the same fix as exists for xcc that was
introduced with commit:
commit 5ef8db8ac9
Author: Daniel Leung <daniel.leung@intel.com>
Date: Wed Feb 3 14:23:51 2021 -0800
xcc: define __INT*_C() and __UINT*_C()
Since llvm based toolchains don't define these macros either.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This reverts commit 21eb27c5c0.
This change has been a source of much trouble and ends up preventing us
from tracking test results across tree. It uses the repo name as the
namespace, and that is not always the same and does not have to be
called 'zephyr', depending on where you are running and in which
environment.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Bugfix for the Cyclone V SoC DK ethernet driver need to add emac-index
in dts
- We remove the "local-mac-address" property from
dts/arm/intel_socfpga_std.dtsi to
boards/arm/cyclonev_socdk/cyclonev_socdk.dts, since this value is
dependant on the board / implementation and not universal to
the "intel_socfpga" package that it inherets from.
- The above is also true for the "status" property as the board
should enable the device.
Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
bugfix for Cyclone V Ethernet Phy error and timeout overflow.
- p->instance was incorrectly assumed to be a reference to
the emac device, this is ammended
- the volatile uint16_t timeout would often overflow
- code cleanup and added more macros for housekeeping
Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
This changes all Actinius boards to use the helper lib in
`boards/common/actinius` for setting up common init values
such as SIM Select and Charger Enable.
Signed-off-by: Alex Tsamakos <alex@actinius.com>
This adds support for the nRF9160-based Icarus SoM DK
(development kit) from Actinius and a common library for
board init code that is common to multiple boards
from Actinius.
Signed-off-by: Alex Tsamakos <alex@actinius.com>
The HIDs sample is currently setup with a passkey callback and requires
authenticated write and read access.
Add a sample option to disable the passkey callbacks, and automatically
set the GATT attributes as encryption required. This is a useful sample
setup as real world HID devices (mice, keyboards...) usually don't have
a passkey mechanism, and removing the callback to reproduce that setup
while not changing the GATT permission leads to automatic disconnections
for encryption failures that can be fairly hard to troubleshoot.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Set a sample name and description for a bunch of tests where those are
left as "TBD" right now.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
I got a couple of questions about what this command's purpose is and
how to debug 'valid' manifests that aren't working as desired. Add
some information to address this.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Most of the time, z_cstart() is running on an arbitrary region
of memory as stack, where the necessary stack setup has not been
performed. This prevents stack protection to work correctly,
as the stack canary has not been populated. So mark z_cstart()
to have no stack protection at all inside the function to avoid
raising exception during boot.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This provides a macro to disable stack protector for a function,
by specifying a function attribute. This is useful for boot
and early init code where we know for sure stack pointer and/or
stack content are being manipulated manually.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add three xbar nodes and four qdec nodes in the rt10xx devicetree include.
Add xbara to rt1052 in Kconfig.soc
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add a driver for the NXP MCUX Quadrature Decoder. The driver
is simple and only implements the phase a and phase b inputs. The
module has additional features which can be added in future PRs.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>