The device status ready bit replaced the previous hack of clearing the
device API pointer when initialization of the device failed. It
inadvertently changed the behavior of device_get_binding() when
invoked before the device was initialized: previously that succeeded
for uninitialized devices, after the change it failed.
Multiple driver initializations rely on being able to get a device
pointer for something they're going to depend on in their init
function, even if that device has not yet been initialized. Although
this is wrong, and would cause faults if the device failed to
initialize before use, in practice it has been working.
It's not feasible to identify all the situations where this has
occurred, nor to add code to diagnose such cases without changing the
state associated with a device to distinguish initialized from
initialization success/failure. Restore the previous behavior until a
more holistic solution is developed.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Closes: #28331
Configurable initialization priority is useful when using CDC ACM
serial device, for example.
Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
Function spi_context_longest_current_buf() has been introduced in
commit ddef35c1da for the purpose of
getting the longest possible (potentially partial) SPI transfer
for which all currently active directions have a continuous buffer.
Such transfer can be done with taking advantage of a DMA that cannot
use scattered buffers (and this is the case for nRF SPI drivers with
which this function has been introduced).
Unfortunately, because of its inadequate name, later on this function
has been incorrectly used in other SPI drivers for getting the longer
of TX/RX buffers. And commit afc480f12b
recently "fixed" the implementation of this function, assumably to
adjust it to those incorrect uses, but this way it has also broken
the nRF SPI drivers.
Instead of restoring the original implementation of the function in
question, this commit adds a new one with functionality equivalent
to that original but with a hopefully less misleading name, and this
function is used in the nRF SPI drivers.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The bluetooth.h header file uses a different tabulation style in the
documentation headers, which for recent Doxygen versions generates
verbatim blocks. This disables usage of the @option ALIAS because
verbatim blocks cannot be nested. With this commit the documentation's
tabulation is fixed and `@option` is used to resolve Kconfig options.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
This updates Kconfig options in the Doxygen documentation to use the new
@option ALIAS. There are three categories of fixes:
* Use of `:option:` inside Doxygen headers, which is not valid (this is
rST syntax!).
* Kconfig options that were just written as plain text and were no
references were generated.
* Use of `@rst` blocks where the only reason for using them was to have
Kconfig options resolved.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
This new ALIAS can be used to add references to Kconfig options. To use
it enclose the Kconfig symbol name like this `@option{KCONFIG_FOO}`.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Enable Breathe SEPARATE_MEMBER_PAGES compatibilty; this option allows
resolution of a huge amount of references that are currently broken
(around 650 based on my grep foo!) due to issues in the Doxygen XML
generation when this option is enabled.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Breathe 4.21.0 brings a few interesting features that improve the
generated documentation:
* A new `separate_member_pages` config option that patches issues in the
Doxygen XML generated when SEPARATE_MEMBER_PAGES option is YES.
* A new rST verbatim mode that allows producing inline elements.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
The unsigned size_t type variables have been checked for having
negative values.
Fixes#28171, Coverity-CID: 214224
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The fix to handle long duration timeouts in 150e18de6e also
changed the duration value from signed to unsigned. This can cause
delays in processing alarms when timer handlers run longer than a tick
(either due to delays or if there are many of them). Revert to a
signed representation.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Isochronous transactions do not support handshake phase
so in particular the ISO endpoint cannot be STALLed.
Isochronous transactions do no support data toggle sequencing
and should only send DATA0 PID.
Taking into consideration those requirements do not try to
clear dtoggle or STALL an ISO Endpoint in nRF USBD driver.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
The non-secure callable functions' section is only applicable
to Cortex-M with TrustZone-M extension. Remove it from AARCH64
linker script. (CONFIG_ARM_FIRMWARE_HAS_SECURE_ENTRY_FUNCTIONS
is only enabled for Cortex-M so this is a no-op, but still, it
is a useful cleanup.)
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The test for this sample requires a usb connection to a secondary port,
output is not captured on the default usb port.
Fixes#28154
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The pull request #26269
drivers: SPI: Adds CS flags from devicetree
missed out on the APA102 led_strip driver, most likely due to the driver
not utilising the chip select signal until #25310
drivers: led_strip: Add support for external SPI CS on APA102 LED strips
Signed-off-by: Roman Vaughan <nzsmartie@gmail.com>
We try to invoke `ztest_test_pass()` from inside
a fatal exception in a child thread.
On SMP this can result in the next test case starting
on another CPU, re-using the child thread before it
has a chance to exit.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The implementations of the test cases had the wrong prototype.
The extern declarations (which were in a C file for some reason)
were correct.
I don't want to talk about the subtle code generation and stack
corruption issues that emerged from this which at one point made
me question my own sanity.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Enable by default the use of RAM buffers in the spi_nrfx_spim.c
driver for copying TX data located in flash (as SPIM peripherals
cannot transfer directly form flash). Without this patch, users can
get confused, especially when SPI transaction is used by an upper
level driver which does not check all error codes.
For size of the buffer, use the value used so far in the reel_board
default configuration and in the SPI loopback test, i.e. 8 bytes.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
CP/PD mode selection is the most frequently looked-for/changed key in
Kconfig. Making that as the first entry for ease of use.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
OSDP subsys was doing a `select SERIAL` in its Kconfig. But this has
other unintended side effects. Change this to
`imply SERIAL_SUPPORT_INTERRUPT`.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
Since the SoC's built-in EEPROM is used on the FaZe board, then let's
enable it in the default configuration.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Since commit 3124c02987
("cmake: flash/debug: refactor runner configuration"), BUILD_OUTPUT_HEX
must be selected to pass the .hex file to the runner. It is needed when
running the "west flash" command.
In addition the implicit CORTEX_M_SYSTICK option is removed.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Since commit 3124c02987
("cmake: flash/debug: refactor runner configuration"), BUILD_OUTPUT_HEX
must be selected to pass the .hex file to the runner. It is needed when
running the "west flash" command.
In addition the implicit CORTEX_M_SYSTICK and EEPROM_LPC11U6X options
are removed.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The commit aac9e2c5e3
("device: Revise how initialization status is being handled") highlights
an initialization priority issue between the clock and pinmux device.
Since this commit Zephyr is not booting anymore on LPC11U6x MCUs. The
clock driver gets a NULL pointer when calling device_get_binding() to
retrieve the pinmux device. It is because the pinmux device is not
initialized yet due to a lesser priority.
This patch fixes this issue by ensuring that Zephyr initializes the
pinmux device before the clock device.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The current version of the labeler action doesn't support yet negations.
This is supported in master but we probably want to wait until a release
to update. In the meantime remove the rule that uses negations.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use the technique from portability/cmsis_rtos_v1 to compensate for
systems where times are being measured with different clocks.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fixes: #28197
Update openthread to build flag changes for fixing #28197.
see zephyrproject-rtos/openthread/pull/29
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #28197
zephyr_get_targets() provides a mechanism for retrieving all CMake
targets for a given directory and below.
This is useful when including external modules where only libraries
required by Zephyr should be built.
For example, in openthread, this reduces the number of build steps and
build time significantly.
Before, 780 steps:
`time ninja -Cbuild`
[708/708] Linking CXX executable zephyr/zephyr.elf
135.08user 30.24system 0:46.21elapsed 357%CPU
After, 480 steps:
`time ninja -Cbuild`
[480/480] Linking CXX executable zephyr/zephyr.elf
84.02user 18.92system 0:30.72elapsed 335%CPU
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Added note about fixed/changed behavior when too many arguments are
provided.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added test which validates that shell is not executing a command if
too many arguments provided.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Shell was accepting CONFIG_SHELL_ARGC_MAX+1 arguments which lead to
memory corruption and fault. Added error message reported when number
of provided arguments exceeds CONFIG_SHELL_ARGC_MAX.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
After adding 'Multicast group filtering' (commit b7b73d0) server should
join CoAP IPv6 multicast group to accept multicast CoAP messages.
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Fixes a memory leak when a virtual address subscription is added for a
model that either has this VA already, or the model has no more space
for subscription addresses.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
With new event 'pull_request_target' it is now possible to run the
backporting action that we used to have in the past as a Github app.
Use labels for backporting as before.
See https://github.com/tibdex/backport for more details.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>