End of DFU operation was signaled after the last usb dfu request was
received. Therefeore wait_for_usb_dfu() terminated so fast that
dfu_work_handler() was not called by k_work_queue befor.
wait_for_usb_dfu() should terminate after DFU operation was completed.
For fix that k_poll_signal_raise() was moved after the flash write
operation.
fixes#29611
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This makes it easier to scan. The sorting is done based on the text
that appears in the HTML, not the :ref: label name.
In the case of the DMIC API, change the title of the document to match
the "Audio Codec" document so we can keep those together.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Modify the gen_isr_table test case to using ztest. Although it was
split up to three test cases, the test logic and the tested platform
are totally the same as previous one.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
Add date and if a commit should be considered for weekly testing.
This will still work with the old format.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
WebUSB sample is using BOS descriptor. Because of that
the bcdUSB field of device descriptor is set to 0x0210.
This requires for the BOS descriptor to have LPM support.
LPM support use additional descriptor that the HOST can
read by requesting BOS desc. The descriptor is called
Extension descriptor and is specified in `USB Link Power
Management ECN` document considered a part of USB 2.0
spec.
This patch adds missing part of the BOS descriptor and
fixes issue with webUSB sample not passing i'LPM L1 Suspend
Resume Test' from USB3CV test tool.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Add generation of Advertising Set Terminated event on High
Duty Cycle Directed Advertising Timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Reduce the use of ARG_UNUSED on auto variables and try to
use conditional compilation where appropriate.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add support for configuring Ethernet pins using DT pinctrl entries. Note
that F1 series pinctrl support is not handled as the driver does not
support F1.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The commit changes error handling by fs_unmount; the function will
return -EINVAL if mount point, described by mp, is not mounted or
-ENNOTSUP when unmounting is not supported by the driver; in the second
case it will also log error.
Additionally to the above changes, checks for correct mnt_path and
mnt_path, within fs_unmount, have been removed as they are not needed;
only the fs_mount_t->fs pointer is needed to decide whether system is
mounted or not.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit moves fs_mount parameter verification above mutex lock.
The list of mount points is now checked before attempting to obtain
file system API pointer.
All modifications to mount point data structure, given as a parameter
to the fs_mount, are only applied after every other operation needed
have completed successfully, immediately before adding the mount point
to the list of mount points.
The fs_mount will a warning when mounted file system does not support
unmount.
When a file system does not provide mount function, the -ENOTSUP error
will be returned instead of -EINVAL.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Added flash_area_erased_val() function for get value of erased
byte of memory which is under flash area.
This function already exist in MCUBoot and zephyr dfu subsystem
which makes simultaneous usage of both impossible.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Synchronized up to:
https://github.com/JuulLabs-OSS/mcuboot/commit/ce11597
- corrected bugfix JuulLabs-OSS#830 of upgrade issue in swap-move
- changed default for CONFIG_MCUBOOT_CLEANUP_ARM_CODE to n,
- added MPU register clean-up to this option
- bootutil: ecdsa: Fixed CC310 for nRF devices
- zephyr: made flash_area_erased_val() weak
- serial recovery: allow unaligned last image data chunk
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Zephyr doesn't use the __section macro, so stop warnings like this
from producing a compliance rejection.
WARNING:PREFER_SECTION: __section(.device_) is preferred over
__attribute__((section(".device_")))
#702: FILE: include/device.h:743:
__attribute__((__section__(".device_" #level STRINGIFY(prio))))
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
`bt_mesh_model_tree_walk()` was too simplistic and did not track visited
nodes which caused it to fall into infinite loop. Moreover the double
next jump could skip a level causing depth value to be invalid.
Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
../zephyrNew/subsys/bluetooth/mesh/prov.c: In function
'bt_mesh_prov_reset_state': ../zephyrNew/subsys/bluetooth/mesh
/prov.c:61:2⚠️ '__builtin_memset' offset [52, 292] from
the object at 'bt_mesh_prov_link' is out of the bounds of referenced
subobject 'dhkey' with type 'uint8_t[32]' {aka 'unsigned char[32]'}
at offset 19 [-Warray-bounds] 61 | memset(&bt_mesh_prov_link.dhkey, 0,
Fixes: #29634
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
Channels 4..7 are multiplexed on adc16. The NXP HAL exposes
ADC16_SetChannelMuxMode but this function is not yet included
in Zephy. The following patch adds channel-mux-b to the dts
enabling the use of the alternate channels of 16 bit adc.
Signed-off-by: Andreas Dröscher <github@anticat.ch>
If chan->conn is already NULL do not call bt_conn_unref as that will
likely cause a crash, also this make sure that if channel has been
disconnected using bt_iso_chan_disconnect it removes the channel from
connection list before setting the chan->conn to NULL.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Avoid sending duplicate GAP_EV_DEVICE_FOUND because adv_buf->len was
not cleared.
With this change, the following tests become more stable in a noisy
environment:
- GAP/BROB/OBSV/BV-01-C
- GAP/BROB/OBSV/BV-02-C
- GAP/BROB/OBSV/BV-05-C
- GAP/BROB/OBSV/BV-06-C
- GAP/DISC/RPA/BV-01-C
Co-authored-by: Konstantinos Sotiropoulos
konstantinos.sotiropoulos@nordicsemi.no
Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
1. Merged the single/multiple ring(s) APIs, now these APIs
can handle both which requires passing a ring id.
2. Updated timestamp handling to match the new timestamp
implementation in the SDK driver.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
As documented in doc/guides/dts/api-usage.rst, the generated
devicetree macros should be considered an implementation detail.
Replace direct usage of one with an equivalent that uses the API.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add the ability to mark a property as 'deprecated' to get a warning that
it will be removed in the future.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Document and validate advertising parameters for the disallowed
advertising mode high duty cycle directed connectable advertising
using extended advertising PDUs.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Disable assert checks, to build a smaller firmware and also
to uncover any unused variables and arguments.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix issue where the encrypt change has an error code, but the
encrypt change request was unrelated to the current ATT request.
This lead to the current ATT transaction being interpreted as finished
an the ATT client would proceed with the next ATT request, which would
fail since the ATT client is now violating the ATT single transaction
rule.
Updated similar if statement checking for the opposite to improve
readability.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Moves the virtual address labels to the transport layer, disconnecting
them from the configuration server.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Removes text from the readme of the onoff_level_lighting_vnd_app
claiming buttons control the LEDs before provisioning, as it's not
accurate.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
If low power node publish with unicast address other
than friend address, the friend node should relayed
this message to all network interface.
When Proxy feature enabled, message from gatt bearer should
relay to adv bearer even relay feature disabled.
Fixes: #29544
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
This qemu device is REALLY slow in icount mode. When I run it outside
of icount and watch the simulator advance the clock device in real
time, it looks to me like it expects the counter to be running at ~125
MHz. But it's set to a 12 MHz clock rate in its config, and trying to
use a 1000 Hz tick rate.
At those settings (and with the shift=3 argument to icount), I'm
measuring about 10k cycles to handle a minimal timer interrupt. But
if you do the math, that comes to 12k cycles per tick. The interrupt
takes as long as a tick! That would never work, except for the fact
that the timer driver on this device cheats and doesn't try to align
to ticks (basically ignoring all the lost time). And even that breaks
on the scheduler_api test (which does both tick and cycle math and
tries to compare them) when it's fixed to properly align itself.
One solution might be to set the clock rate to what qemu appears to
believe is the correct 125 MHz value. And that causes the test to
complete, but all tests now take ~10 minutes of real time because the
simulator is so slow!
So just make up some clock rates, it's a simulated platform after all.
I chose 5 MHz cycle time and 100 Hz tick rate, which on my device is
about half of "real" speed and very acceptable.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This test is a little subtle: it wants to spawn three threads to run
and be switched out by a timeslice interrupt. And it wants to consume
half a time slice itself before it starts running. And, because
timeslicing runs out of the same tick framework in the timer driver,
it needs to align to the start of a tick before the process starts.
And further: it does its own time math not in ticks but in timer
cycles, so it's quite sensitive to slop.
But it's "synchronize to tick boundary" code was actually
synchronizing to a CYCLE boundary, which is just wrong. And it was
doing this in the wrong order. It was resetting the timeslice first
and then synchronizing to a tick by spinning, which means that the
test was always going to begin as much as a tick late. Do the tick
synchronization (via a sleep) first.
Finally, the manager thread that was spawning the new threads lives at
the same priority as the highest priority child threads, which means
it can potentitially wake up on the semaphores that they are giving in
the middle of the test and consume CPU unexpectedly. Make sure it's
sleeping for the duration.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Move the platform.h from the module to the zephyr tree. This file is
zephyr sepcific and belongs in the zephyr tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There is a race condition between the child threads
exiting, and the child threads getting re-used in the
next scenario. This reproduces more often on SMP systems.
Close the race by joining on the child threads before
exiting any test scenario.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
In the code path for nested interrupts, we are not saving
RBX, yet the assembly code is using it as a storage location
for the ISR.
Use RAX. It is backed up in both the nested and non-nested
cases, and the ASM code is not currently using it at that
point.
Fixes: #29594
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>