Fixes the pcnt_esp32 sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Fixes the mpu9250 sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Fixes the mpu6050 sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Fixes the mcux_acmp sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Fixes the mcp9808 sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
For ztest twister would parse the symbol information that was
generated as part of the build (zephyr.symbols). However the format
of the zephyr.symbols files is highly dependant on the toolchain.
Move to using pyelf to parse the symbol information directly from
zephyr.elf instead so that this works regardless of toolchain.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
On native platforms we typically have CONFIG_BUILD_OUTPUT_EXE set so
we end up with both zephyr.elf and zephyr.exe. This would cause a
call to get_elf_file() to fail. There isn't any reason to error out
since zephyr.elf and zephyr.exe should be identical. So allow it
if the platform type is native.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
Use explicit flash command execution timeout at DeviceHandler
instead of the hardcoded value of 60 sec.
When a HW platform executes test cases right after the flash command,
the test case remaining timeout is affected by how much time the flash
operation consumes. Some simulation platforms need to spend significant
amount of time on each 'flash' cycle, usually adding the same delay on
each test case.
This improvement adds two new command line options and device map fields:
--device-flash-timeout - for the flash operation timeout
('flash-timeout' device map field).
--device-flash-with-test - to indicate that the platform flash
command also runs a test case, so the overall timeout should be
calculated as a sum of the flash timeout and the current test case
timeout to receive all console output from the platform
('flash-with-test' device map field).
The device map field values override command line values for the
particular platform where configured.
Default behavior is backward compatible: flash operation fixed timeout
is 60 sec. not including the test case timeout.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
By default there is only CONFIG_LOG_FUNC_NAME_PREFIX_DBG=y enabled. When
both Bluetooth (CONFIG_BT=y) and logging (CONFIG_LOG=y) subsystems are
enabled, then other CONFIG_LOG_FUNC_NAME_PREFIX_{INF,WRN,ERR}=y options are
pulled in as well using an 'imply' Kconfig command indirectly from
`CONFIG_BT_LOG`. This behavior was introduced recently as part of
commit af01a0f313 ("Bluetooth: Logging: Move all logging symbols
together") with no explicit reason provided.
Pulling in LOG_FUNC_NAME_PREFIX_* options automatically with (CONFIG_BT=y
&& CONFIG_LOG=y) blows up flash usage. As an example of downstream project
(nRF52840-based, with Bluetooth and WiFi connectivity), it increases flash
usage from 473668 bytes to 487856 bytes. This seems "only" 3% difference,
but this is actually a lot when there is no good reason why this happens.
Downstream users quite often compare flash sizes of subsequent Zephyr
releases and this 3% footprint increase might be a blocker at some point.
Additionally, it is not trivial to find the root cause of footprint
increase for most (non-expert) users.
The reason why there is so much footprint overhead because of
CONFIG_LOG_FUNC_NAME_PREFIX_*=y is because each function in the
codebase (be it Zephyr or downstream application) that contains logging
macros (LOG_{DBG,INF,WRN,ERR}()) is bloated because the function name has
to be included in the output image.
Remove 'imply LOG_FUNC_NAME_PREFIX_*' commands from 'menuconfig BT_LOG'
option, so that flash usage does not increase too much. Those logging
options are not enabled by other subsystems, so Bluetooth should not be an
exception here.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
As the test is for iterable sections, we need to utilize
zephyr_iterable_section for targets that need linker script
generation like arm-clang.
So add zephyr_iterable_section() for the RAM & ROM sections
that the testcases utilizes.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit adds support for ANY_MOTION and DATA_READY interrupts for
the BMI270. To implement this, a different config blob than the
"max_fifo" blob has to be used.
Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
This adds the i2c driver for the Renesas SmartBond(tm) MCU family.
It supports blocking transfers and callback transfers.
Currently only supports controller mode.
Co-authored-by: Stan Geitel <stan@geitel.nl>
Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
Adds the necessary definitions for the nucleo_h563zi to be able to run
the adc_api test on the ADC1 channel 15 (on pa3).
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Adds the necessary definitions for the nucleo_h563zi to be able to run
tests/drivers/dac/dac_api.
Channel2 of the DAC is used for testing.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Adds the board definitions for the nucleo_h563zi board.
Notes:
DAC: enable output on pa5, which is available on the ST Zio and morpho
connectors.
UM3115 in table 21 wrongly lists pa15 on the positions where pa5 is.
The only other option for the dac output is pa4 which is reserved for
for VBUS_SENSE.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Timer clocks as high as 300MHz exist out there making
sys_clock_cycle_get_32() wrap within 15 seconds. Some tests don't like
that and possibly other usages too. Synthesizing a 64-bit counter is
cheap enough, even on 32-bit systems, to work around this annoyance.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Zephyr PM expects the SoC layer upon wake to unmask interrupts
the PM layer masked. MEC172x was re-enabling interrupt globally
in the Cortex-M4 but not clearing the mask set by Zephyr PM.
This worked in previous Zephyr releases but broke in the latest
Zephyr changes. Fixed the SoC to re-enable interrupts globally
and call irq_unlock(0) as Zephyr PM does if pm_state_exit_post_ops
is not implemented. Tested on MEC172x EVB with PLL clock out pin
enabled and verified PLL goes off in deep sleep, system wakes,
and interrupts are firing.
Signed-off-by: scott worley <scott.worley@microchip.com>
RPR Client doesn't send RPR_OP_LINK_REPORT and therefore it can't wait
for it using ack ctx. It should have been RPR_OP_PDU_OUTBOUND_REPORT
to cover a case where Outbound PDU transmission failed. But in this case
the link status will be non equal to BT_MESH_RPR_SUCCESS (see pb_error in
rpr_srv.c) and the link state will be set to idle. And the client will
reset the link together with ack ctx.
When bearer user (provisioner.c) sends an Outbound PDU, it uses the
callback (see bt_mesh_prov_send in provisioner.c) to send a next PDU,
but it doesn't check the error code even though it is provided through
the callback. Therefore calling the callback with error code would
require error handling in provisioner.c.
With ordinary provisioning PB-ADV doesn't call the callback in case of
error, but closes the link by timeout if doesn't receive ACK (see
prov_send_adv in pb_adv.c). PB-GATT always calls the callback with
error code 0 once the PDU is transmitted (see buf_send in pb_gatt.c).
Thus this change aligns RPR Client implementation with other bearers.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
An explicit import of edtlib is not required when using
pickle.load() and creates a duplicate module object.
Local testing shows that pickle.load() throws the ModuleNotFoundError if
the sys.path cannot find the edtlib or associated modules.
Signed-off-by: Keith Short <keithshort@google.com>
An explicit import of edtlib is not required when using
pickle.load() and creates a duplicate module object.
Retrieve the correct module object directly from the pickle file
using inspect.getmodule().
Signed-off-by: Keith Short <keithshort@google.com>
An explicit import of edtlib is not required when using
pickle.load() and creates a duplicate module object.
Also eliminate the check for the EDTError, as this exception cannot be
raised by pickle.load().
Signed-off-by: Keith Short <keithshort@google.com>
An explicit import of edtlib is not required when using
pickle.load() and creates a duplicate module object.
Signed-off-by: Keith Short <keithshort@google.com>
When central is sending SMP Pairing Request is it unknown if
pairing will be legacy or LE SC so set OOB flag if any OOB
data is present and assume to peer device provides OOB data
that will match pairing type.
This was affecting following qualification test cases:
SM/CEN/OOB/BI-01-C
SM/CEN/OOB/BV-01-C
SM/CEN/OOB/BV-03-C
SM/CEN/OOB/BV-09-C
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit introduces power management support for EFR32BG SoCs.
Tested on the efr32bg_sltb010a board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Update thermometer sample with mcp970x temperature sensor.
Removing test with frdm_k64f integration platform as it doesn't
provide an ambient temperature sensor.
Removing the bbc_microbit board as it only seems to provide the
die temperature of the nRF51 SoC and not an ambient temperature
sensor.
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Use recently introduced GENMASK64() macro. Although it does not make
difference for the target platform, it makes code clearer.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
NVMe disks are supported, let's provide some documentation about the
driver and how to enable it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
On Qemu x86_64 it is possible to emulate an NVMe controller and disk on
the PCIe bus, so let's add this case here to verify how the newly added
NVMe controller and disk driver perform, relatively to the host.
This will prove to be useful to evaluate the optimization to be made, or
the possible regression that could happen on future changes.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
On Qemu x86_64 it is possible to emulate an NVMe controller and disk on
the PCIe bus, so let's add this case here to verify that the newly added
NVMe controller and disk driver works fine.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
As it is meant to be used on the tests/drivers/disk test case, it will
currently create a dummy 1Mb image on a fixed path to serve as a NVMe
disk.
It could be made of an alternate path and size, if necessary.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is currently the only end-point where multiple threads can access
the NVMe device (all calls are synchronous).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>