This is a fix for issue #90426 .
Marking __kinetis_flash_config with __used attribute prevents
unwanted deletion when compiling with LTO.
Signed-off-by: Matthieu Speder <mspeder@users.sourceforge.net>
Right now the thread test case does not handle when the test fails, the
test will be aborted by ztest in one of the spawned threads, and cause
desynchronization which messes up the rest of the test. Fix by
synchronizing in the case of fails and return fail from main test thread
instead of the spawned ones.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The test that checks latency also prints a measurement of the latency
which is just a visual information for the test output. However, this
print uses a subtraction which can have an overflow in the case where
the kernel timer is behind, so just clamp to 0 in that case where there
is an overflow. This change does not affect the test pass/fail logic.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Adds a flash runner configuration for mimxrt1052 and mimxrt1062,
used for sysbuild multi-image projects, mainly for MCU-boot.
- Avoid unwanted multiple erases and resets.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Replace semaphores with proper atomic flags when used without
multithreading enabled.
Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
A recent change 9eeb60c improperly removed a critical line in the driver.
This commit replaces that line and moves an irq_lock to above any pin
value manipulation since the timing is sensitive with the DHT protocol.
This should also fix the timing issue 9eeb60c attempted to fix.
Signed-off-by: John Shelton <moosery@gmail.com>
Update documentation with new LTS lifecycle information following TSC
decision to extend LTS support to 5 years.
Also removed some duplicate information.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Bring in the following changes to the Rust module, updating since rev 4.1.
1cab77b436b dts.pest: Add support for comments in devicetree source files
e53f6de1c06 fix(cmake): Evaluate generator expressions in sample cargo...
e64cadb3c9e zephyr: thread: Add 'join_timeout' to RunningThread
a683eb8a3b5 zephyr: Replace critical-section implementation
26cd3bc0c8a zephyr-sys: Export irq_lock/unlock
901edef9bc8 zephyr: Specify minimum rust version
0de6f6c390d zephyr-build: Simplify dt-yaml syntax
edcef3ba39c zephyr: Remove stale doc references to futures
4096ad7c803 cmake: Fix dependency problem
5557cb3fc35 zephyr: object: Fix bad doc link
d921320cc7d zephyr: devicetree: Allow non-snake-case names in DT nodes
14618bd02f7 zephyr: sys: sync: Semaphore: Remove incorrect ALLOC check
47e270d5ac5 zephyr: sync: Conditionalize PinWeak on alloc
f8b228fe71c samples: bench: Increase thread stack size on 64-bit platforms
ec50a4317b9 zephyr: sync: Create PinWeak type
2e5059a209d samples: async-philosophers: Remove overly specific imports
a0061313850 samples: async-philosophers: Convert to general async
5c15fbb9d20 zephyr: Remove work-queue executor
f107c93dce6 samples: rename work-philosophers to async-philosophers
ed8d08bc890 samples: bench: Replace old async with new
087e584eae9 zephyr-macros: Incorporate fn name into thread name
72ed3818192 samples: philosophers: Migrate to new task declaration
44b2dd28073 zephyr: Add proc macro for thread declaration
8952b444b3a CI: Force python version 3.12
e3518de6d07 cmake: add USES_TERMINAL to show cargo output
b7dacdac984 zephyr: embassy: Use a semaphore for the executor
a871c7f588c Add support for board native_sim/native/64
349164d630a samples: blinky: Remove incorrect integration platform
b0866632d42 samples/tests: Ensure test/sample names are unique
7395ae4f486 zephyr-build: fix DTS parser for Windows
a341bc50041 samples: philosophers: Migrate Mutex to const constructor
5000f459f26 samples: bench: Clean up formatting
6020ab7db36 zephyr: Run rustfmt
c1d74e1d5df samples: bench: Make Semaphores static
37754d29e0b samples: bench: Reduce benchmark iterations
11067823e53 samples: bench: Remove the 'basesem' prototype
3a4f08ba1ea zepyr: sys: sync: Mutex/Condvar
64605eb89cf samples: bench: fix for API change
8d7ca493801 zephyr: Convert `Queue` to new atomic initializer up
3a0016dace2 zephyr: sys: sync: Make Semaphore constructors `const`
5ceccc155c2 zephyr: object: Implement new ZephyrObject wrapper
2790674bb7f docgen: Enable async features for doc generation
1b475b7a9a8 tests: drivers: gpio-async: Test the async gpio operations
0347eac6882 zephyr: Add async 'wait_for_high' and 'wait_for_low' to gpio
b60408c54ef zephyr: device: Add a possible static element with each device
28f7ec6b515 zephyr: device: gpio: Add a few more methods
bcc9ee433bd zephyr: embassy: Add Default implementation
a458d8e33eb zephyr: embassy: Eliminate unused printkln import
dea64363115 samples: embassy: Detect proper end to the test
04d9e5714e6 samples: embassy: Increase task pool size
eae89bc4d2b samples: embassy: Fix test name
758a2c264c7 samples: embassy: Update formatting
ac0eaac9d8b zephyr: Update rustfmt
db93ee7978e samples: embassy: Update Embassy Demo for Zephyr executor
a9958395985 zephyr: Implement `executor-zephyr` to use with Embassy
60d7c5396ac samples: embassy: Start of an embassy demo
1540e9ab785 zephyr: Add initial support for embassy
1503a982e00 docs: Update top-level index
c58d1f20024 zephyr: Expand top-level crate docs
Signed-off-by: David Brown <david.brown@linaro.org>
Fixes tests/boot/with_mcumgr in case, when imgtool is
not installed. Added imgtool path to west sign wrapper.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Now a bus abstraction for Trinamic stepper drivers with
unified interface for SPI/UART communication. Separates
transport logic from device-specific functionality.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Now adds support to tmc51xx via uart. The base yaml supports
the common properties, and uart and spi bindings are
configuration-specific.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.
With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:
WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.
WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Following the new feature in the flexcomm driver to be able to wake up
from low power mode, the clock control drivers have to handle the
platform specific details, so this commit adds to the already ugly mess
that is the LPC syscon driver which is used by RW currently and makes
the required devicetree changes.
Make the console/shell uart on the FRDM_RW612 take advantage of this by
default.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add the feature for the flexcomm uart to be able to be a wakeup source
from low power modes. To be able to do this on a relevant platform, the
DT node for the UART needs to have the wakeup-source property and define
a "sleep" clock. The details of handling the sleep clock and default
clock are still platform specific but handled by the clock control
driver of the platform, so that this code should be able to be
applicable to any platform that follows the same DT definition.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
On RW, normal configuration has all clock generators gated in PM2.
Only the LPOSC is available for main clock source since it is a low
power clock.
Many of the peripherals on the chip are still "on" and do need a
main clock source in order to be effective as wakeup sources
to the chip as intended. So we should make this switch for PM2
specifically in order to achieve desired wakeup capabilities.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Refactor this code so it has less nesting and is able to share some code
between functions, by making a function to find the device constraints
object which can be called before doing operations using it.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is currently a bug where when entering low power modes, there is a
garbage character sent if the UART is in the middle of a transmit when
entering low power mode. This is because the fifo interrupt happens when
last character is pulled by transmitter from fifo and then we unlock PM
constraints at that moment, instead of waiting for actual transmitter to
become idle. Fix by adding work item to check for this when needed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Reduce the number of config overrides needed for the various testcases
by only enabling the options if needed in the first place.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
* Wi-Fi AP (Broadcasting a network others can connect to)
* Wi-Fi Station (Connecting to an AP + SSID scanning)
* Wi-Fi AP + Station (Both the above)
* Wi-Fi SSID scanning (SSID scanning only)
Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).
Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.
The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move initialization of the print callback handler after calling lv_init, as
the latter zeroes the global callback structure.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Add the ability to block and process a work queue by invoking
`k_work_queue_run` from an existing thread. This can be particularly useful
for using the main thread to process work items, in the same vein as the
system work queue, but from a lower priority/preemptible thread.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Add new Kconfig options to enable platform-specific features in
OpenThread:
- CONFIG_OPENTHREAD_PLATFORM_PKT_TXTIME enables support for packet TX
time when CONFIG_NET_PKT_TXTIME is selected.
- CONFIG_OPENTHREAD_PLATFORM_CARRIER_FUNCTIONS enables modulated and
continuous carrier functions when CONFIG_OPENTHREAD_DIAG and
CONFIG_IEEE802154_CARRIER_FUNCTIONS are enabled.
Update preprocessor conditionals to use the new options instead of
relying directly on CONFIG_NET_PKT_TXTIME and
CONFIG_IEEE802154_CARRIER_FUNCTIONS.
This change improves configurability and allows to reuse the platform
implementation when not using Zephyr networking.
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
The current ENOSYS check code can proceed for a driver that
hypothetically implements the on() but not the off() function of
vice versa, which would result in a null pointer dereference.
This would be a weird use case but Coverity catches the situation, no
harm in changing the ENOSYS check to fail if the on/off is half
implemented, so let's change it to do that.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Frame rate selected by the user may not be obtained due to
PCLK frequency and finite number of clock divider values.
In such case, driver shall select divider that results in
frame clock rate closest to the requested value.
There was a bug that was discarding perfect match divider.
Add test which confirms correct clock divider selection.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
The boot report is used to pass information from IRONside to a CPU
being booted.
Integrate the boot report to the update service sample.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
PMU related functions need to be located in IRAM when sleep
process is triggered, as cache is disabled past a certain point
in the execution of the sleep process.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Because the same IP supports both device and host, so use
DYNAMIC_INTERRUPTS for KHCI and EHCI if both device and host
are enabled.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
add uhc related items to dts.
add clock initialization
add BM4 if CONFIG_USB_UHC_NXP_KHCI is enabled
add pin mux
update board related CMakeLists.txt
update sdk-ng CMake to include NXP controller drivers
update west.yml to contain the hal_nxp pr
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
If we're parsing a CoAP request with an observe option of '1', but there is
no matching observer, return an error instead of returning a zero.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>