Add v4.3.0 to the list of supported releases.
Since v4.1.0 is becoming EOL, bump TOC ranges to no longer list v4.1.0
and add (draft) v4.4.0.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The files in the LICENSES directory are for the reuse tool, and not the
licenses of the Zephyr repository itself.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Generated objects.inv would not contain e.g. "zephyr:board" entry on
incremental builds, making it impossible to use Intersphinx on other
projects when rebuilding the Zephyr docset.
It can be verified by inspecting inventory like this:
```python
from sphinx.util.inventory import InventoryFile
InventoryFile.loads(open("objects.inv", "rb").read(), uri="")
inv.data.keys()
```
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
i.MX95 M7 supports multi-level interrupt.
Current ram_context_for_isr test does not cover multi-level interrupt.
So exclude i.MX95 M7.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
- **Fix session mutex handling:** Ensure the `mtls_sessions_lock` is
always released in `mtls_get_unused_session_index` on failure
to prevent deadlocks.
- **Protect `in_use` flag:** Added mutex protection when setting
`in_use = false` in free functions.
- **Cleanup on setup failure:** Added calls to `mbedtls_*_free()`
in `mtls_session_setup()` when key initialization fails.
- **Free logic fix:** Corrected `if/else` structure in
`mtls_session_free()` to ensure the correct context is freed.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Remove erroneous calculation of `apkt->pkt->out_len` in
`mtls_ccm_decrypt_auth` and `mtls_gcm_decrypt_auth`.
The output length should be handled by the caller or the
AEAD decryption process itself.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Corrected the RFC2131 section reference in DHCPv4 comments and help text.
The random delay before sending the initial DHCPDISCOVER message is
defined in Section 4.4.1 of RFC2131, not in 4.1.1 as previously stated.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
In rare occasions iface and TCP mutexes could cause a deadlock. As
notifying the interface readiness takes place just before the iface
mutex is released, it should be not harm to release it just before the
TCP is notified about interface going down to avoid the deadlock.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The current approach was buggy, for example the TCP context could be
unrefed twice in case of forced close. Or in case of a race, when the
application closed the socket first, the TCP context wouldn't be
dereferenced at all.
Calling the tcp_conn_close() unconditionally in case of forced close
solves all those issues.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A listening TCP context has no active connection therefore it has no a
second ref from the TCP stack. Thereby, when shutting down connections
when interface goes down, net_tcp_put() should not be called on a
listening socket to release the ref on the TCP stack behalf.
Instead, report the error via the registered accept_cb callback no
notify the application about the error, which should then close the
socket and release the associated TCP context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove the note about time_t being 64-bit in Zephyr, since that is
generally not accurate and depends on the configuration of the C library.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Documentation has been added for the instrumentation subsystem, link to
it in the Zephyr 4.3 release highlights instead of code sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add documentation for the instrumentation subsystem as this was missing
from the initial contribution.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The added stm32-adc properties in c21cdd8569 ("dts: bindings: adc:
stm32: add new properties to simplify the driver") were missing from adc2
within the stm32n6.dtsi.
Since adc1 and adc2 are almost identical, just copy the missing properties
from adc1 which was fixed up as part of 5f0c63ea35 ("dts: arm: st: fill
out adc nodes with the new properties").
This fixes compilation when using adc2:
```
devicetree error: 'st,adc-internal-regulator' is marked as required in
'properties:' in [...]/zephyr/dts/bindings/adc/st,stm32n6-adc.yaml, but
does not appear in <Node /soc/adc@50022100 in
[...]/zephyr/dts/arm/st/n6/stm32n6.dtsi:456>
```
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Update manifest to align the copy of Mbed TLS header files which lives
in the TF-M repository to what's in Mbed TLS release v3.6.5.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a few useful commands and information when running the
BT Tester with native_sim, either with or without the
Zephyr controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Consecutive resource instance name should be encoded regardless of
whether timestamp is present or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
To ensure that code compiles error (and warning) free, add a build-all
testsuite for smbus drivers.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The smbus driver initialization priority was previously set to
`KERNEL_INIT_PRIORITY_DEFAULT` (which is 40). However, the default init
priority of devices is typically `KERNEL_INIT_PRIORITY_DEVICE` (which is
50).
Since the stm32 smbus driver uses a reference to the underlying i2c
device, and since this driver was not being built in CI, this led to the
discovery that the smbus driver was initialized too early.
```shell
ERROR: Device initialization priority validation failed, the sequence of \
initialization calls does not match the devicetree dependencies.
ERROR: /smbus1 <smbus_stm32_init> is initialized before its dependency \
/soc/i2c@40005400 <i2c_stm32_init> (POST_KERNEL+1 < POST_KERNEL+4)
```
By setting the initialization priority to `KERNEL_INIT_PRIORITY_DEVICE`,
both smbus1 and i2c1 have their priorities evaluated in the same group,
and it becomes possible to determine relative priorities via phandle
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add ARCH_HAS_STACKWALK as a dependency to the stack unwind test to avoid
running it on 64bit Cortex-R platforms, which do not implement the
arch_stack_walk() api.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to
die with:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__
return self.func(*args)
~~~~~~~~~^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click
return _tree_enter(event)
File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter
_change_node(node, tree.winfo_toplevel())
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node
s = _set_val_dialog(node, parent)
File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog
range_info = _range_info(sym)
File ".../scripts/kconfig/guiconfig.py", line 1339, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but menuconfig.py is left untouched. This make menuconfig to
die with:
Traceback (most recent call last):
File ".../scripts/kconfig/menuconfig.py", line 3284, in <module>
_main()
~~~~~^^
File ".../scripts/kconfig/menuconfig.py", line 663, in _main
menuconfig(standard_kconfig(__doc__))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 732, in menuconfig
print(curses.wrapper(_menuconfig))
~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File ".../scripts/kconfig/menuconfig.py", line 872, in _menuconfig
_change_node(sel_node)
~~~~~~~~~~~~^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 1586, in _change_node
s, _range_info(sc))
~~~~~~~~~~~^^^^
File ".../scripts/kconfig/menuconfig.py", line 3119, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
- Add Iulia Prodan as she is already a maintainer of the OpenAMP module.
- Add myself as I am maintainer of the openAMP project.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Many APIs are stuck at experimental status although they already fullfil
the requirements to be considered unstable, i.e. they have multiple
implementations and have been in the tree for more than 2 releases.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The previous method of deriving the local MAC address from the MCU's
Unique ID (UID) by slicing the last 3 bytes had two issues:
1. **Low Entropy:** Risk of address collision because only a small
portion of the UID was used, and this portion may not vary much.
2. **Offset Error:** An incorrect offset calculation could copy
non-intended bytes.
This commit resolves both issues by replacing the slice operation
with a **CRC-32 hash** over the **entire 16-byte UID**.
The lower 3 bytes (24 bits) of the resulting CRC-32 are used as the
local part of the MAC address, maximizing randomization and ensuring
a high probability of uniqueness across all devices.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Defers init of GT911 touch, MIPI DBI, and display device drivers.
lcd_par_s035_init() in shield.c now initializes these to control the
GT911 INT_GPIO state during the Reset sequence.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
hal/renesas was updated with fix for the case when
watchdog was unnecessary disabled after deep sleep.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Update the test_json_decoding test to expect correct unescaped values
based on descriptor type semantics:
- JSON_TOK_STRING: Stores pointer to original JSON string, preserving
escape sequences as they appear in the source. Used when the original
escaped format needs to be maintained.
- JSON_TOK_STRING_BUF: Copies and unescapes the string into a fixed-size
buffer, converting JSON escape sequences (\n, \t, \", etc.) to their
actual character equivalents. Used when the processed, unescaped string
is needed.
The test was incorrectly expecting the nested_string_buf field (which
uses JSON_TOK_STRING_BUF) to contain the escaped form "esc: \\t". With
the proper unescaping implementation, this field should contain the
unescaped version "esc: \t" (with actual tab character).
This aligns with the documented behavior where JSON_TOK_STRING_BUF
performs unescaping during the copy operation, while JSON_TOK_STRING
simply references the original escaped string.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Add extensive test coverage for JSON escape sequence handling to
ensure robustness and prevent regression in string encoding/decoding
operations.
The new test suite includes:
1. **Escape Sequence Stability**: Tests multiple encode/decode cycles
to prevent backslash duplication bugs where sequences like \n, \t
could be duplicated with each cycle.
2. **Individual Escape Sequences**: Comprehensive testing of each JSON
escape type:
- \n (newline), \t (tab), \r (carriage return), \f (form feed)
- \b (backspace), \\ (backslash), \" (quote), \/ (slash)
3. **Quote Handling**: Special focus on quote escaping/unescaping to
ensure proper JSON syntax and data integrity.
4. **Mixed Escape Sequences**: Complex scenarios with multiple
different escape sequences in single strings to test edge cases.
5. **Multiple Cycle Stability**: Repeated encode/decode operations to
simulate real-world usage patterns and detect gradual corruption.
6. **Backslash Duplication Detection**: Specific tests targeting the
common bug where backslashes accumulate during multiple processing
cycles.
7. **Round-trip Validation**: Complete encode → decode → encode cycles
to verify data preservation.
8. **Edge Cases**: Testing boundary conditions like strings containing
only quotes or complex escape combinations.
These tests use a new `escape_test_data` structure with both string
value and string buffer fields to verify proper handling of both
JSON_TOK_STRING and JSON_TOK_STRING_BUF descriptor types.
The test suite ensures that:
- Escape sequences are properly encoded in JSON output
- Escape sequences are correctly unescaped during parsing
- No data corruption occurs during multiple processing cycles
- Both string pointer and string buffer fields behave correctly
- Complex escape scenarios are handled robustly
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Fix the JSON library to properly unescape sequences during decoding.
Previously, escape sequences like \n, \t, \" etc were validated but
not converted back to their actual character representations during
decoding, causing backslash duplication with each encode/decode cycle.
This fix modifies decode_string_buf() to properly handle escape
sequence unescaping and ensures strings maintain their original
content across multiple encode/decode cycles.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Checking virtual range is incorrect because size + 1 addresses are
considered: size + starting address (that is also part of an
allocation). Hence the last address of the range is impossible to map
Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
Handling of CIS termination had several issues, most notably:
- it depended on allocating a termination node from the general rx
node pool, causing asserts if the pool was exhausted
- CIS established events was not always generated when required,
potentially causing CIS Centrals to get stuck without being able
to create any new CISes
- Cancelling a CIS Create procedure only worked correctly if the
CIS Create was currently active and happened to belong to the
same CIS
- CIG state handling often (always?) assumed a CIG with only one CIS
ll_conn_iso_stream now has a dedicated termination node, same as
ll_conn and ll_sync_iso_set
LLCP statemachine for Cis Create procedure has been reworked to ensure
a notification node for CIS Established is available as early as possible.
In addition, it should now always be sent when needed
Introduced ull_central_iso_all_cises_terminated() to check if all CISes
in a CIG has been terminated (or not created yet) - which is now
used for updating the CIG state
ull_cp_cc_cancel() now takes the CIS to cancel as an argument so
it doesn't end up canceling an entirely different CIS Create procedure;
In addition it now works for queued procedures as well
Flushing a (central) CIS Create procedure in LLCP will now properly
generate a CIS Established event (with an error)
Signed-off-by: Troels Nilsson <trnn@demant.com>
Instead of gluing to the one in the HAL which is not very flexible to
configure, define the container header in the zephyr SOC code. This
fixes the bug of CONFIG_NXP_FLEXSPI_ROM_RAMLOADER not working.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Checking if a node has nvmem-cells is not sufficient, we need to check if
the idx or name exists.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Set zephyr_lcd_controller pixel-format to PANEL_PIXEL_FORMAT_ARGB_8888
to match the driver configuration.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
When CROSS_DIM doesn’t evenly divide the panel WIDTH/HEIGHT, the last
tile on the right/bottom edge can extend past the display bounds.
Fix by clipping the edge tiles.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Make sure MAX32_ON_ENTER_CPU_IDLE_HOOK is disabled for the context test, so
the CPU will actually idle with WFI and not return before the timer
expires for test_cpu_idle test.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The IQR vector table changed size since a825e01 and it is
causing issues with downstream applications, for example,
data stored in bin specific field is shifted by
the ARCH_IRQ_VECTOR_TABLE_ALIGN, so I make
ARCH_IRQ_VECTOR_TABLE_ALIGN constant.
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Track may not have next track and thus this must be checked before
trying to match ID.
This was affecting following qualification test cases:
GMCS/SR/MCP/BV-38-C
GMCS/SR/MCP/BV-39-C
GMCS/SR/MCP/BV-40-C
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Increase main stack size when MBEDTLS_INIT is enabled to avoid stack
overflow as it consumes 1536 bytes.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Document the useful output files that exist, which files they are
constructed from, and what they can be used for.
Update other sections that are no longer correct with changes.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Since `tfm_merged.bin` now contains BL2, it can only be used for the
same purposes as `tfm_merged.hex` (intial firmware loading). Therefore
it should be using the confirmed images that `tfm_merged.hex` does.
Since the only difference between the two files with that change is now
the output format, we can directly generate `tfm_merged.bin` from
`tfm_merged.hex` with `objcopy` instead of going through `mergehex.py`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Generate a binary version of `tfm_s_zephyr_ns_signed.hex` with objcopy.
This file is valid for performing OTA upgrades, unlike `tfm_merged.bin`,
which contains BL2.
Signed-off-by: Jordan Yates <jordan@embeint.com>
`S_NS_CONFIRMED_HEX_FILE` was never generating a confirmed file, just
the same file contents as `S_NS_HEX_FILE`. Since no logic needs a
confirmed merge of `tfm_s.hex` and `zephyr.hex`, just remove the logic
instead of fixing it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Stop `--output-bin` from consuming the first trailing argument that
should have been in `input_files`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
There is new exception debugging mechanism for RISC-V which needs
additional member in arch_esf structure. VPRs handle stacking
partially in hw so exact position of some stack members needs
to be at the end of arch_esf, so explicit padding is needed.
Aligned also ESF_SW_IRQ_SIZEOF when exception debug is used.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Removed the invert-y property from the LVGL pointer input configuration
as it's causing the touch events to be "flipped" vertically.
Confirmed that this gets samples/subsys/display/lvgl back to correctly
detecting touch events, and for good measure tested
samples/subsys/input/draw_touch_events which keeps working as expected
(like it should since it's not using the LVGL pointer input ;-))
Fixeszephyrproject-rtos/zephyr#98933
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Reduce the Tx clock signal skew to 1ns
as it caused around 30% packet loss during ping
on some boards.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Ignore COMPARISON_TO_NULL since it conflicts with Zephyr coding
guidelines main rule 85:
The controlling expression of an if statement and the
controlling expression of an iteration-statement shall have
essentially Boolean type
Link: https://docs.zephyrproject.org/latest/contribute/coding_guidelines
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
During board bringup the spi interface was not working as expected
and the lna9250 driver should have errored early when the chip was
not detected and reset but ended up busy waiting on setup. So, this
will error out on the init path when the chip can not be reset at
the driver instance.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Added sam_e54 overlay file for uart_errors test project
Added sam_e54 platform allow in testcase.yaml
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
PA sync can be terminated before BIG sync is stopped. This results
in ps_sync being NULL and thus crash in stop callback. Simply store
address needed by BTP events and don't rely on pa_sync.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Recent versions of the HAL rely on interpreting the HFRCO frequency
selection as a plain integer in preprocessor comparisons. The
adaptation layer in Zephyr created a C expression that was not
possible to evaluate by the preprocessor. Simplify the logic to
directly passing the devicetree value to the driver.
This slightly changes the behavior of the code by no longer accepting
arbitrary frequencies and mapping them to the closest HFRCO band.
However, the binding documentation already states that the frequency
should match the band.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The CMU clock controller node for HFRCO was wrongly interpreted
as a PLL reference clock. This prevented configuring the HFRCO
in open-loop mode. Since the node isn't used for anything,
remove it as a minimal stopgap solution.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
When received the DLC disconnect request, after prime the DLC
disconnect response, the DLC will be cleared and the `dlc->session`
is cleared. If the no DLC is linked in current session, the idle
timer of the session will be scheduled.
In current implementation, the `dlc->session` is used to get the
session pointer, but it is invalid in this time. And the unexpected
fault occurs.
Fix the issue by getting the session pointer from parameter of the
function `rfcomm_handle_disc()` instead of `dlc->session`.
Fix issue #99035.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This fix ensures that the implementation matches the documented
behavior, where the macro return 1 when the cs-gpios property has
an entry matching the reg address of the child device.
This restores the behavior of the devicetree init API prior to
<a60f93d742a48660882af5785fb4352f414ecd11>, which accidentally
introduced this issue by relying on the `DT_SPI_DEV_HAS_CS_GPIOS`
macro, which has deviated from its documented behavior ever since
it was originally introduced 6 years ago.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Co-authored-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
We have two places defining cpu_load_get() and trying to the same thing,
one is a core kernel feature supported on all architecture, the other is
part of debug, requires tracing and supported only on a subset of
architectures. Both deliver different results and accuracy.
While we figure our how to merge those into one API and with the
advanatges of both, rename the API so there is no confusion about what
is being used.
Fixes#97845
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
According to user manual(UM3062, table 16), arduino_spi is connected
to spi1 instead of spi3.
Enable spi1 node and affect the SPI_NSS pin with I/O function
to do the chip select.
Remove i2c3 to avoid conflict with PA7 pin.
Move the status property of dac1 node to maintain consistency
in the ordering of node properties.
NB: The SPI_NSS pin is not listed as an alternate function
for SPI1 in the user manual (UM3062, Table 17).
Signed-off-by: Ulrich KAMDEM <kamdemulricharmel@gmail.com>
Enable and add pinctrl for the I2C3 node, and disable the SPI1 node
since it is enabled by default on this board (via the Arduino connector),
which causes a conflict with the I2C3 pinctrl configuration.
Signed-off-by: Ulrich KAMDEM <kamdemulricharmel@gmail.com>
Only track the available buffer space, if
CONFIG_MODEM_CMUX_MSC_FC_THRESHOLD is configured.
When less than required amount fit into the ringbuffer,
indicate the RX buffer is full.
Otherwise, only mark RX buffer full when incoming data is being
dropped.
When RX buffer is detected to be full, send Modem Status Command
with flow-controll bit set.
Flow control is released once the incoming buffer has at least
MODEM_CMUX_MTU bytes free again.
Fixes#98644
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Flash MSPI NOR driver already has support for flash page layout, but did
not select the Kconfig symbol indicating so. Add the selection so
drivers can use the page layout api.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Add a note about a limitation when using deferred logging + thread name
together with dynamically allocated struct k_thread. This limitation has
been raised in issue #95077.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Coverity reported an untrusted loop bound caused by a missing check on
the count value in ataes132a_send_command() for the response received
from the device. As per datasheet section 6.1, count should be at least
3 bytes (1 byte for count, and 2 bytes for the 16 bits CRC).
While I'm expecting this condition to be very rare, it doesn't hurt to
implement a proper checking and report an error if count<3.
Coverity CID: 434625
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Add delay to avoid missed packet by tester.
This fixes brg_subnet_duplicate_filtering test.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Enable retransmissions of Generic Provisioning PDUs. This should fix
pb_cancel test where provisionee fails to receive Link Open PDU due to
parallel PB-GATT advertisement, but since Link Open PDU is not
retransmitted, test fails.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add a note about Mbed TLS version upgrade from 3.6.4 to 3.6.5.
Update also the CVE list accordingly.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The stm32f3_disco board requires an external AD4114 sensor for the
ADC test to pass. Since this sensor is not available by default in
CI environments, the test fails.
Removing stm32f3 from the allow list prevents false negatives during
automated testing.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Bluetooth 6.2 has version number 0x10 and was released in November 2025.
This commit ensures this version number is properly decoded.
Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
Add documentation for the DT filtering expressions in 'expr_parser.py',
used by Twister to filter boards based on their DT nodes/properties when
selecting test scenarios.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Rename dt_node_prop_enabled filtering expression to
dt_nodelabel_prop_enabled as it takes a node label as a 1st argument.
Enhance dt_node_has_prop inline doc and param name.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fixes two critical bugs in the Fujitsu MB85RCxx I2C FRAM driver when
handling transfers that cross page boundaries:
Fixes incorrect write length: The mb85rcxx_write function was
incorrectly passing the total remaining length (len) to the
underlying I2C transfer instead of the page-limited length (len_in_page).
This resulted in I2C errors or data corruption when writing past a page
boundary.
Fixes buffer pointer update: Corrects the loop's buffer pointer
arithmetic in both mb85rcxx_read and mb85rcxx_write. The original
code used incorrect casting (*(char *)&buf += len_in_page;), leading
to a strict aliasing violation and potentially undefined behavior.
The pointer is now correctly advanced using explicit casting:
- mb85rcxx_read: buf = (char *)buf + len_in_page;
- mb85rcxx_write: buf = (const char *)buf + len_in_page;
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Update hal_stm32 revision to update the stm32wba link layer
802.15.4 libraries including 802.15.4 data transmission fix.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Fixes a build warning in the hwspinlock context initializer macro that
occurs when struct k_spinlock has no members ("warning: excess elements
in struct initializer"). This change is consistent with other struct
k_spinlock initializers in kernel.h.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Configuring the region domain while SAP is enabled may lead to instability
in SAP's state and functionality. This change ensures the region domain
is not set when SAP is active.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add note about PSM/eDRX modes to make it clear that off-load driver
still important when using in baterry powered devices.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
This commit fixes CYW20829 that was broken on main after the
below commit
https://github.com/zephyrproject-rtos/zephyr/pull/95333
The root cause of the issue is that, bootstrap section is located at
the end of the RAM. So the start address of the section needs to
be calculated based on the size of the section.
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
This fix multiple issues with command implementation:
- lack of LE to host convertion
- using strtoul() on non-string data
- passing stack variable as attr data (which must be present until
notification is sent)
This was affecting GATT/SR/GAN/BV-02-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `.dts` and `.dtsi` files within the `boards` and `dts` directories.
Note: To pass CI compliance checks, also fix the formatting in
`/dts/arm/infineon/edge/pse84/system_clocks.dtsi`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
...checking whether we are in user context and accessing
a kernel mode only variable.
For some unknown reasons only knew to Cadence engineers,
the Cadence toolchain will always read z_sys_boot_kernel
at the beginning of k_is_pre_kernel() instead of after
k_is_user_context() is called. So it would always result
in access violation if this is called in user mode.
Forcing a compiler barrier seems to fix that. So force it
here.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The snprintk function returns the number of characters that *would have
been* written if the buffer was large enough. This means if the return
value `ret` is greater than or equal to the buffer size `strsize`, the
output was truncated.
The existing check `(strsize < ret)` was incorrect as it did not
handle the case where `ret == strsize` (output fits exactly, but no
room for null terminator) and did not check for negative return values
which indicate an encoding error.
This commit corrects the check to `(ret < 0 || ret >= strsize)` to
properly detect truncation and errors, returning -ENOMEM in these
cases. This fix is applied to `gnss_dump_nav_data`, `gnss_dump_time`,
and `gnss_dump_satellite` functions.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
The test_smp_thread_abort_deadlock test assumes all CPUs will
simultaneously establish a circular abort dependency (each thread
aborts the next in a ring). However, on platforms with large
emulator/simulator quantum sizes, one thread's ISR may complete
and return before another thread even calls k_thread_abort() on it,
preventing the circular dependency from forming.
This manifested on ARMv8-R FVP but not on QEMU or ARMv8-A/ARMv9-A FVP
due to different timing characteristics and quantum sizes.
Add a k_busy_wait(100) after k_thread_abort() to give all CPUs time
to call abort before any ISR completes.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Fix typos in the driver instantiation macro, which leads to page_size
and timeout_erase defaulting to 0 regardless of whether the
devicetree instance has the read-only property or not.
DT_INST_NODE_PROP_OR() -> DT_INST_PROP_OR()
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Added check for continuous or gated bit clock. Now clock does
not stop if I2S_OPT_BIT_CLK_CONT is selected.
Signed-off-by: Imran Sajjad <imransajjad89@gmail.com>
Fix incorrect format specifiers in lwm2m_read_cached_data() where
size_t variables were printed using %u and %d instead of %zu. This
caused CI failures on ARM64 platforms where size_t is long unsigned
int, triggering -Werror=format warnings.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Commit d93561da68 ("samples: zbus: benchmark: Filter SMP from
benchmark_sync test") avoided the SMP race condition for the
SUBSCRIBERS variant (benchmark_sync) by filtering out SMP configurations,
but the MSG_SUBSCRIBERS variant (benchmark_async_msg_sub) has the
identical race condition and needs the same filter.
Both variants use the same threading model:
- Producer thread: priority 5 (lower priority, runs later)
- Consumer threads: priority 3 (higher priority, runs first)
- Both use asynchronous delivery via queues (msgq vs fifo)
The race condition on SMP (detailed in d93561da68):
CPU 0 (Producer): CPU 1-3 (Consumers):
----------------- ----------------------
Publish all messages Still processing...
atomic_get(&count) atomic_add() comes later
→ Reports incomplete count!
The LISTENERS variant (benchmark_async) does NOT need filtering because
listeners are synchronous callbacks. Looking at subsys/zbus/zbus.c:130,
the listener callback executes directly within zbus_chan_pub():
case ZBUS_OBSERVER_LISTENER_TYPE: {
obs->callback(chan); /* Synchronous! */
break;
}
All atomic_add() operations complete before the producer checks the
count, so there is no race condition with LISTENERS.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
In order to help search engines pick up _all_ our Doxygen documentation,
ensure that a sitemap.xml file is generated for it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix several issues related to the incremental CRC API usage:
1. Ensure the lock is not prematurely released in crc_set_config,
preventing semaphore double-release (over-giving).
2. Reset the flag_crc_updated state on all error paths to prevent
incorrect seeding in subsequent attempts.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Fixes some recently introduced issues with this file whereby
addresses were wrongly using global addresses instead of relative
to the parent node and whereby parent node names were not used
when they should have been
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
PR https://github.com/zephyrproject-rtos/zephyr/pull/96980/
changed the pins of lpuart0 from 'FC0_P0_PIO0_16' and
'FC0_P1_PIO0_17' to 'FC0_P2_PIO0_6' and 'FC0_P3_PIO0_7'.
This is actually unnecessary because lpuart0 is not enabled
by default, so micfil applications will not be affected.
Even if lpuart0 were enabled by default, we should disable
lpuart0 at the application layer rather than directly
modifying its default configuration, as this behavior lacks
backward compatibility.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add test cases that respective ICMPv4/ICMPv6 handlers are not called for
packets where address family doesn't match (i.e. malformed ICMPv4 packet
imitating ICMPv6 one).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Check the address family of the packet before passing it to a ICMP
handler, to avoid scenarios where ICMPv4 packet is paseed to a ICMPv6
handler and vice versa.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add documentation describing a TF-M attestation issue that prevents
firmware-over-the-air (FOTA) upgrades between affected Zephyr releases.
Recommend a direct upgrade to Zephyr v4.3.0 to avoid attestation and
upgrade compatibility issues.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Update TF-M to include fixes restoring FOTA upgrade compatibility
between Zephyr v3.7.1 and v4.3.0. This fix allow both forward and
rollback upgrades.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
SYSTICK is used as the default kernel timer.
The FRO 1M clock source for OSTIMER is trimmed to ± 15%
accuracy over the entire voltage and temperature. The FRO 1M
is not accurate enough on the silicon.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
The first 32KB will be used by BOOT ROM.
Added board shared sram bypass first 32KB overlay.
The overlay configure shall bypass first 32KB memory to avoid
being clear during system startup.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
Avoid calling the HAL_XSPIM_Config function if the app is running
from flash in order to avoid locking since HAL_XSPIM_Config is once
turning off each XSPI instance when performing the configuration.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The PSRAM could well be plugged to the XSPI2 instead of XSPI1
hence allow configuration of the IOPort and avoid forcing the
ChipSelect in order to allow working on both XSPI1 or XSPI2.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Avoid copying the whole XSPI_HandleTypeDef structure into the
init function and use a pointer since the structure is already part
of the _data structure.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
I nominate my self as s collaborator for the State machine framework (SMF).
Rationale: sustained contributions to SMF (performance work, tests,
reviews).
@keith-zephyr @glenn-andrews - PTAL.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
Correct the RGB565 format generated by the GC2145 in case of CSI based
RGB565 by setting the Page 0 BYPASS_MODE register switch bit in order
to generate RGB565_LE instead of RGB565_BE.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
On parallel interface, the DCMIPP is expecting data in what
corresponds to the RGB565_BE formats, aka
D7 D6 D5 D4 D3 D2 D1 D0
-----------------------
cycle 1: R4 R3 R2 R1 R0 G5 G4 G3
cycle 2: G2 G1 G0 B4 B3 B2 B1 B0
The Zephyr RGB565 video format corresponds to the RGB565_LE
hence perform a SWAPCYCLE when RGB565 is used as input format
on parallel interface.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
`sram0_ns_modem` and `sram0_ns_app` are child nodes of `sram0_ns`, not
`sram`. Addresses should be relative to the former, not the later.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Increase `Z_HEAP_MIN_SIZE` values to successfully allocate a 1 byte
chunk when `CONFIG_SYS_HEAP_RUNTIME_STATS=y`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This fixes a compilation error in sdmmc_stm32.c. Depending on the
definition of CONFIG_SDMMC_STM32_EMMC now either
HAL_MMC_ConfigWideBusOperation() or HAL_SD_ConfigWideBusOperation()
gets called.
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
During a teardown sequence performed by the USB DC stack's "usb_disable()",
the controller is first disabled by calling "usb_dc_detach()", which turns
off the USB controller clock in the STM32 implementation. "usb_disable()"
then disables endpoints by calling "usb_dc_ep_disable()" on each of them,
which is merely forwarded to HAL_PCD_EP_Close() by the STM32 driver. This
order of operations means that the latter operation is actually operating
on the no-longer-clocks USB controller! Up until recently, memory accesses
to MMIO of unclocked peripherals in STM32 SoCs would not cause issues, even
if the resulting access was a no-op (read returns zero, write is ignored),
so everything worked fine even if the access was *technically* illegal...
However, on newer series with a different bus fabric, accesses to unclocked
peripherals will instead deadlock the SoC!
Prevent illegal accesses inside "usb_dc_stm32_ep_disable()" by checking if
the USB controller clock is enabled before calling HAL_PCD_EP_Close(), and
skipping the call if it isn't. This allows "usb_disable()" to complete on
series such as STM32N6.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the open-ended while(true) with a null-terminated parent walk.
Improves readability, behavior is unchanged.
Signed-off-by: Vlad Kulikov <vlad_kulikov_c@pm.me>
3cc9a843e8 added '--external-init' to the GDB
Server command line whenever an external loader is provided, but it is not
a *necessary* argument and sometimes causes issues.
Provide a new runner argument "--external-init" (for consistency) which
controls whether or not the argument is added to command line if an
external loader is used. (It is otherwise ignored)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The "--swd" argument had both an action='store_true' and default value of
True so it wasn't possible to disable it: providing the argument would set
its value to True, and not providing it would use the default=True!
Add a new argument "--no-swd" which shares its destination variable with
"--swd", but with action='store_false', such that either can be provided
to enable/disable SWD mode. Both arguments are placed in a mutually
exclusive group and use a common help message.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
SL_CODE_CLASSIFY() is a macro used by the upstream Simplicity SDK to mark
time sensitive functions (in order to relocate them in RAM). This macro
place the function in specific sections. So build scripts can identify
them.
However, Wiseconnect is not able to leverage this feature. Worse, this
mechanism conflict with gen_relocate_app.py and zephyr_code_relocate(). So,
we really need to disable this mechanism for Wiseconnect on Zephyr.
Fortunately, SLI_CODE_CLASSIFICATION_DISABLE allow to disable
SL_CODE_CLASSIFY().
Note that on Simplicity SDK, these macro also conflict with
zephyr_code_relocate(). However, the mechanism is officially supported by
Simplicity SDK and we could leverage the feature for the on going support
of Series-3.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In target mode, issue the stop callback from the I2C DW driver after the
read/write callbacks. This mirrors the behavior of other I2C target mode
drivers, and allows target handler code to correctly service any pending
read or write requests before it handles the stop condition.
Fixes#98675
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Commit d4d51dc062 ("kernel: Replace redundant switch_handle assignment
with assertion") introduced an assertion check that may be triggered
as follows by tests/kernel/smp_abort:
CPU0 CPU1 CPU2
---- ---- ____
* [thread A] * [thread B] * [thread C]
* irq_offload() * irq_offload() * irq_offload()
* k_thread_abort(thread B)
* k_thread_abort(thread C)
* k_thread_abort(thread A)
* thread_halt_spin()
* z_is_thread_halting(_current) is false
* while (z_is_thread_halting(thread B));
* thread_halt_spin()
* z_is_thread_halting(_current) is true
* halt_thread(_current...);
* z_dummy_thread_init()
- dummy_thread->switch_handle = NULL;
- _current = dummy_thread;
* while (z_is_thread_halting(thread C));
* z_get_next_switch_handle()
* z_arm64_context_switch()
* [thread A is dead]
* thread_halt_spin()
* z_is_thread_halting(_current) is true
* halt_thread(_current...);
* z_dummy_thread_init()
- dummy_thread->switch_handle = NULL;
- _current = dummy_thread;
* while(z_is_thread_halting(thread A));
* z_get_next_switch_handle()
- old_thread == dummy_thread
- __ASSERT(old_thread->switch_handle == NULL) OK
* z_arm64_context_switch()
- str x1, [x1, #___thread_t_switch_handle_OFFSET]
* [thread B is dead]
* %%% dummy_thread->switch_handle no longer NULL %%%
* z_get_next_switch_handle()
- old_thread == dummy_thread
- __ASSERT(old_thread->
switch_handle == NULL) FAIL
This needs at least 3 CPUs and the perfect timing for the race to work as
sometimes CPUs 1 and 2 may be close enough in their execution paths for
the assertion to pass. For example, QEMU is OK while FVP is not.
Also adding sufficient debug traces can make the issue go away.
This happens because the dummy thread is shared among concurrent CPUs.
It could be argued that a per-CPU dummy thread structure would be the
proper solution to this problem. However the purpose of a dummy thread
structure is to provide a dumping ground for the scheduler code to work
while the original thread structure might already be reused and
therefore can't be clobbered as demonstrated above. But the dummy
structure _can_ be clobbered to some extent and it is not worth the
additional memory footprint implied by per-CPU instances. We just have
to ignore some validity tests when the dummy thread is concerned.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
When a thread halts and dummifies, set its switch_handle to (void *)1
instead of the thread pointer itself. This maintains the non-NULL value
required to prevent deadlock in k_thread_join() while making it obvious
that this value is not meant to be dereferenced or used.
The switch_handle should be an opaque architecture-specific value and
not be assumed to be a thread pointer in generic code. Using 1 makes
the intent clearer.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
pm_policy_priv_device_find_device_constraints() function
is available only when zephyr_power_state is defined.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Remove board configurations without a proper devicetree overlay. The test
suite relies on pwm-test alias to be defined in a board overlay, which is
not set for these boards.
Fixes: #98775
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When building an observer-only build the check_pending_conn label would
result in CI warnings/errors due to this only being a C23 feature:
scan.c:692:1: error: label at end of compound statement is a C23 extension
Turns out the #ifdefs are completely unnecessary, and the code can simply
take advantage of IS_ENABLED(), which should get rid of the warning.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This allows upper tester to terminate existing call.
Was affecting TMAP/CG/VRC/BV-01-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
For better agility add etienne-lms, mathieuchopstm and djiatsaf-st
as collaborators to STM32 module.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In some cases, the host starts scanning internally for establishing
connections (BT_LE_SCAN_USER_CONN), such as host-based resolving or
auto-connection. In this situation, even if the application does not
start explicit scan, the host still needs to handle the advertising
reports to continue the connection process.
Previously, both bt_hci_le_adv_report() and bt_hci_le_adv_ext_report()
will break or discard all reports when explicit scan is not active.
This causes the connection to stay in SCAN_BEFORE_INITIATING and never
move forward.
This patch adds checking of BT_LE_SCAN_USER_CONN to allow advertising
reports to be processed during connection-purpose scanning. When the
scan is started explicitly by application, the behavior remains the
same, only small comments are updated to describe this behavior and keep
the original code style unchanged.
Signed-off-by: Zhijie Zhong <zhongzhijie1@xiaomi.com>
This commit fixes a bug which occurred when a socket was closed.
It was observed when multiple attempts to obtain dataset using ephemeral
key were performed. Failure was seen starting with attempt number 2,
incoming packets were not processed.
In a open-close-open scenario, incoming traffic was dropped, most likely
because there was stale data in the corresponding socket service
structure.
By calling, `net_socket_service_register` after a socket in closed, the
problem was resolved, and data shown in `net sockets` cli command is now
updated and correct.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
If verdict is NET_OK net_pkt may already be unreferenced and reutilized,
so that setting the `l2_processed` flag would be set on a different
packet, corrupting its state. Avoid this situation by only setting the
l2_processed flag for NET_CONTINUE.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Fixes some information that is very outdated to do with board
Kconfig files, which are not merged, and multiple dts files
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This fixes an issue of CI failing due to the github runner being
out of memory when cleaning up, and speed up the build prep stage
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Exclude the application and radio core targets for nRF54H20 since
they use Ironside as their PSA storage provider.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
This reverts the following commits:
commit c9b534c4eb
("arch: arm64: mmu: avoid using of set/way cache instructions")
commit c4ffadb0b6
("arch: arm64: avoid invalidating of RO mem after mem map")
The reason for the former is about Xen not virtualizing set/way cache
operations used by sys_cache_data_invd_all() originally used prior to
enabling the MMU and data cache. But the cure is worse than the Xen
issue as:
- Cache invalidation is performed on _every_ mapping change.
- Those invalidations are completely unnecessary with a PIPT data cache.
ARM64 implementations use Physically Indexed, Physically Tagged (PIPT)
data caches where cache maintenance is not needed during MMU operations.
- arch_mem_map() invoked with K_MEM_MAP_UNPAGED triggers page faults
when accessing the unmapped region for cache operations. The page
fault handler in do_page_fault() tries to reacquire z_mm_lock which
is already held by the caller of arch_mem_map(). This results in a
deadlock.
And the latter commit disables cache operations for read-only mappings,
effectively rendering the workaround described in the first commit
inoperative on half the mappings, making the performance cost of the
first commit's approach unjustifiable since it doesn't actually solve
the problem it set out to fix.
Given the above, the actual "fix" should simply have been the removal of
the sys_cache_data_invd_all() as, in theory, it isn't strictly needed
and its replacement is already ineffective on read-only areas as mentioned.
So let's revert them, which fixes the deadlock-induced CI test failures
on ARM FVP SMP configurations that were triggered when demand paging or
memory mapping operations were involved.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Use Inner Shareable (IS) TLB invalidation instructions in SMP
configurations to broadcast TLB invalidations to all CPUs.
Use TLBI VMALLE1IS instead of VMALLE1 in invalidate_tlb_all().
While at it, implement proper page-specific invalidation using TLBI VAE1IS
in invalidate_tlb_page() instead of falling back to full invalidation.
This fixes many SMP test failures with userspace enabled onArm's FVP.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Replace series-specific macros with generic macros shared across
multiple STM32 series to improve readability and maintainability.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
This patch introduces overlays to test the silabs eusart peripheral.
It requires 3 different boards in order to test minor differences
between peripheral chip IP versions.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Ensure the blobs command is trying to display the license file for
click-through approval. Ensure that special characters doesn't
cause a problem in Windows by opening the file with utf-8 encoding.
Fixes#98520
Signed-off-by: David Leach <david.leach@nxp.com>
Change size of ext_memory node to 32MB, as the board uses a Macronix
MX25UW25645GXDI00 with 256MBits.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
The h7rs option byte default setting configures the AXI SRAM1-4 as one
contiguous memory, sram0 can therefore be increased to 456k (3x128k + 72k).
The .yaml files of the boards nucleo_h7s3l8 and stm32h7s78_dk are adjusted
accordingly.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Add registered trademark symbol to Bluetooth where missing and
replace BLE with explicit Bluetooth Low Energy where applicable
in ST boards documentation.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove the erronously added chosen node for the MAX32690EVKit, to ensure
the flash base address is correct for the build.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add vendor-specific RF power mode configuration during HCI setup
for SiLabs SiWx91x devices. This configures the BLE TX power
index in the controller's RF subsystem.
The implementation sends a vendor command (OCF 0x0006) with
protocol mode (2) and power index (RSI_BLE_PWR_INX) during the
setup phase. This ensures proper RF power configuration before
normal Bluetooth operations begin.
Technical details:
- Uses bt_hci_cmd_alloc() with manual HCI header construction
- Command opcode: 0xFC06 (OGF=0x3F, OCF=0x0006)
- Parameters: protocol_mode=2, power_index from RSI_BLE_PWR_INX
- Executed during bt_hci_setup callback
Signed-off-by: Arun Kumar Nagelly <arnagell@silabs.com>
When the renesas-rv-lvd driver is built with SDK 1.0 using GCC 14, the
compiler emits a spurious uninitialized variable warning because it can't
follow the control flow to figure out that the variable wasn't ever used
without being initialized. Work around this by simply initializing it
to one of the valid values.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix a bug where the image's SHA would be interpreted as TLV headers due
to missing a data_off increment.
Signed-off-by: Stuart Alldritt <s.k.alldritt@gmail.com>
There is no guarantess enum will be packed so passing uint8_t as
node_id to bt_mesh_subnet_priv_node_id_get() could (and likely will)
result in writing past stack variable.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The current code calls cpu_freq_policy_reset() once within
the SMP branch of the cpu_freq_timer_handler function, and
then calls it again at the beginning of cpu_freq_next_pstate().
This causes repeated resets of 'pstate_best' and
'num_unprocessed_cpus', which prevents the 'last core' from
being reached. The initiating core should perform a reset
before broadcasting, and other cores should not reset again.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In the current code, 'target_cpus ^= (1U << _current_cpu->id)'
is first used to remove the current core. Then, k_ipi_work_add
performs 'target_cpus ^ (1U << _current_cpu->id)' again when
passing parameters. This will add the current core to the mask
again, causing the current core to receive IPI and directly call
cpu_freq_next_pstate() at the end, which may lead to duplicate
execution.
This commit changed 'target_cpus ^ (1U << _current_cpu->id)' to
'target_cpus' in k_ipi_work_add to avoid the second XOR.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In the function bq274xx_gauge_configure it was being used an hardocded
value of 3.7V instead of using the design voltage parameter defined in
the device tree.
Signed-off-by: Marcelo Cunha <mcunha@petsafe.net>
This patch adds a check for the EOT (End Of Transfer) flag
inside the polling loop in spi_stm32_half_duplex_switch_to_receive().
If EOT is set, the transfer is already complete and the loop
is exited, preventing the lockup.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Since the i index is already being incremented as part of the
for loop statement, the i++ done as part of the loop body should
not be done since this lead to skip of entries of the table and
moreover might lead to invalid access outside of the table.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The net socket service implementation permanently opens a file
descriptor, which should be taken into account by the build system.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When using I2C clock frequency >= 250 kHz, it's been observed that the
nPM1300 would unexpectedly wake up before requested time has expired. Add
a delay between applying a new timer value and triggering hibernate to
mitigate this.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
It was preventing this variant (imx93_evk/mimx9352/m33/ddr) to show up
in the boards documentation. Other similar boards with similar DDR variants
(e.g. imx95_evk/mimx9596/m7/ddr) don't include this 'flash: 0' line.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
Without this header the logic in adc_esp32.c will never have either
ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED or
ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED defined. This means
that we always see the warnings aout uncalibrated samples.
Signed-off-by: Yuval Peress <yuval.peress@gmail.com>
Place the 'vectors' region configuration behind the 'sram' and
'rom_region' configurations so that the MPU region for the
vectors takes precedence over the 'sram' region due to higher
region index = higher priority when resolving memory properties
/ permissions for overlapping regions. This is required for the
vectors to work properly if the SRAM base address is also at 0x0.
Fixes#96688.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
There is a function, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the function in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There is a macro, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the macro in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There is a macro, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the macro in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
For some reason, a regression happened where the phy monitor was never
happening. Fix by starting the monitor at the end of init function. The
monitor will then reschedule itself from then on.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove useless assignments to `val` parameter in sbs_gauge_set_prop()
and bq27z746_set_prop(). Since `val` is passed by value, modifying it
has no effect. Also remove unused `tmp_val` variable.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Allows applications and projects to specify their own requirements
for the application VERSION file to be re-generated, this fixes an
issue whereby the application git repository is updated with a new
commit but the old commit is still used by a build, users would
need to add a dependency in their application to the git index file
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
If slots have equal version, but a secondary slot is the active one, the
next boot will switch to the primary slot.
Expose this through SMP commands by marking the primary slot as pending.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
As the net_pkt might have already been sent by net_if_try_send_data()
function, the pkt might already contain garbage data. So do not try
to access if after that send call but remember the used iface and family
and use them to update the statistics.
The issue was seen with qemu_x86_64 and qemu_cortex_a53 when CONFIG_SMP
was enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit introduces a compatibility layer for older EUSART hardware
that lacks the RXTO interrupt. It fix the test uart_async_api when using
xg22 soc.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
When running uart_elementary on the xg22 SoC, some tests are failing due
to the lack of checks inside the configuration function. This patch adds
a check for the parity parameter.
I've also noticed an error in the ISR function where we check all the
ISR flags and not only the enabled ones. It has no impact but needs to be
changed in order to be accurate.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The current implementation checking for the validity of the spi slave
number is wrong. First of all, there is an off by one error where it
allows SPI_CHIP_SELECT_COUNT value as a valid slave, when really it
should be that value minus one. Secondly, it doesn't take into account
the fact that having software controlled GPIO CS can technically have
any number of slaves on the bus. So fix by finding the max of these two
values and fixing the off by one mistake. Also, for RW612, only one HW
native CS is available due to SOC pinmux limitations.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The core name is usually sticked to the Cortex(R) trademark with an hyphen,
as in "Cortex(R)-M0+" rather than "Cortex(R) M0+".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Cortex is a registered trademark of Arm Limited and should thus be
annotated as (R), not TM. Update documentation of various boards using the
wrong symbol.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Disabling multithreading is not possible when enabling SMP (logically)
so depend on SMP being disabled to enable
ARCH_HAS_SINGLE_THREAD_SUPPORT.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add system flash size and/or RAM size tags in ST boards YAML files
where the information is missing.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Fix several RAM size that are wrong regarding what is defined in the
related board device tree.
In many cases, SoC DTSI files have been changed to split internal RAMs
and related boards YAML file was not updated accordingly. This is the
case of H5xx, H7xx
In the case of stm32g081b_eval, polarity bytes are not default enabled
hence the internal SRAM size of 36kB, not 32kB.
Stm32mp135f was wrongly set with 256KB RAM and Flash whereas the board
assigns 256MB for each.
Stm32mp157c_dk2 assigned SRAM1, SRAM2 and SRAM3 to Zephyr hence
providing 320kB of system RAM.
Fix several typos setting RAM size to 786 whereas 768 is expected.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The I2C state machine may fail to generate a valid STOP condition.
This may happen when the firmware sets the STOP bit in SMBCTL1 register
approximately half an SMB clock cycle following the last ACK bit in the
transaction.
Note:
1. This issue is not expected to occur when the core clock runs at
the default frequency (15 MHz). However, since more applications
reuquires higher core clock frequency, this commit introduce the
bypass to prevent the potential risk.
2. Only NPCXn variant chips require this workaround.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The display harness initial documentation was a separate, stale (had
references to a personal Github repo), README.rst buried in the
twister/scripts folder.
Move the docs to be a "first class" part of the Twister documentation
alongside other harnesses.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the power domain flow diagram in doc/services/pm/power_domain.rst
to use the current runtime PM API name pm_device_runtime_get instead of
the older pm_device_get. This keeps the documentation consistent with the
renamed device runtime power management APIs.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Moving from legacy Mbed TLS crypto to the PSA API may cause some
STM32 platforms or other vendor platforms to fail due to stack overflow.
Increasing the ztest stack size solves this problem.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
rootcause: The dynamic L2CAP channel rx.cid is not reset, it
will be intercepted by the judgment condition of the fixed channel,
directly using the last alloced cid may cause cid conflict.
Co-authored-by: zhenwei fang <fangzhenwei@bytedance.com>
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If CONFIG_NET_STATISTICS_PER_INTERFACE is not set, then the
net_shell_print_statistics_all() function was not found and
the compilation was failing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
There are multiple issues in this driver:
1. gpio_pca_series_part_cfg_pca6416 is not using correct macros
2. gpio_pca_series_interrupt_handler_standard not updating input when
no interrupt configured
Fixing these issues.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
When setting endpoint capabilities, the driver uses the MPS stored in each
instance's configuration for OUT endpoints, but used a hardcoded 1023 for
IN endpoints.
Use the instance MPS when preparing IN endpoints' capabilities too.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When cyclic mode is enabled, do not disable RX.
This mode ensures continuous availability of RX buffers.
Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
This ensures the vendor-specific API provided in this header file is
fully documented and exposed in our API documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Minor change but ensures the include guard corresponds to the full path
of the file as done elsewhere in the tree.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add missing space before |reg| or |trade| in documentation of ST boards
which prevents proper rendering.
Also add a few missing spaces in the `stm32wb5mmg` board documentation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
USB Type-C is a registered trademark of USB Implementers Forum and should
thus be annotated as (R), not TM. Update documentation of STM32 boards
using the wrong symbol.
Also add a missing space in steval_stwinbx1 board documentation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
`usb device` isn't a valid feature name, fix it, using the new "usbd" tag.
Remove it when not enabled on the board.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Fix the STM32 DMA driver did not check if the optional dma_callback was
set in dma_stm32_configure(). This could lead to a hard fault when an
interrupt occurs and the callback is NULL, even though the API allows
the callback to be omitted.
Fixes#97454
Signed-off-by: Wenxi Xu <xuwenxi0517@gmail.com>
Instead of snooping SETUP packets for SET_ADDRESS request to call the HAL
SetAddress() function manually, mark device with the addr_before_status
capability such that the UDC stack will call udc_stm32_set_address()
before submitting status by itself.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix the issue regarding passing the TRNG peripheral instance to the driver.
Increase the SYSTEM_WORKQUEUE_STACK_SIZE when CONFIG_BT is set.
According to the log of thread analyzer for beacon sample, 1048 bytes
are needed. So, it's been increased to a safer value.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Exclude the WB0x series from discarding data 12 times from the RNG data
register.
Add a comment to the recover_seed_error function explaining the reason
for reading and discarding data from the RNG data register 12 times.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Fix the TRNG driver issue regarding non-stop ISR firing for STM32WB09 by
clearing RNG_IRQ_SR_ERROR_IRQ flag.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
When limited advertising is enabled there is pending deleyable work
for timing it out. If in such case struct bt_le_ext_adv is cleared by
memset system will crash on next tick.
Fix this by ensuring work is cancelled before clearing struct
bt_le_ext_adv. Using bt_le_ext_adv_foreach() ensures that this will
be correctly handled with and without extended advertising enabled.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This change suppress the warning:
variable 'ie' is used uninitialized whenever switch default is
taken [-Wsometimes-uninitialized]
Signed-off-by: William Tambe <williamt@cadence.com>
The instrumentation.h header is not needed to compile the
instrumentation sample and it can be misleading for folks to think they
have to include it in their code to use the subsystem, so remove it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This introduces the release notes and migration guide for Zephyr 4.4.0
earlier so that people have a placeholder to start adding content as
they line up pull requests for the 4.4 release.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Earlier fix in commit bfd033df81
caused the Posix xsi_realtime test to fail. Set minimum amount
of file descriptors in the test to pass the build assert.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Update the ruff version to the latest 0.14.2 and update the excluded files
to match with the last checks for linter and formatting issues.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The current paths to the .overlay and .conf files used for SCI I2C tests
are incorrect, as they include {NORMALIZED_BOARD_QUALIFIERS}, which does
not exist in the actual file names.
This commit corrects the file paths in the test support configuration.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Remove redundant "partition" and "slot1_partition" nodes that are not
needed and conflict with the MRAM device node labeled "mram" on
Renesas RA boards. These conflicts caused build errors.
For the affected board overlays, the SDHC and SDMMC nodes are now
enabled at the board or shield layer, so they no longer need to be
defined in the test configuration.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
This probably should have been caught much earlier, but well, here we
are. The original license came from the following linux dt that
BeagleBoard.org uses [0]. However, due to differences between linux and
zephyr dt and the fact that zephyr does not yet support most of the
devices on this soc, the only lines same between the two files are the
`status = "disabled";`, and some of the address (not all since things
like GPIO are handled differently). Keeping that in mind, this file
should never have used that license or have TI Copyright.
If it's too late to change the license now, we can probably add this
file to exceptions, since the current license of the file, i.e. GPL-2.0
and MIT should cover all cases where Apache-2 can be used. Again,
apologies since there was no reason for this file to use the dual
license.
[0]:https://github.com/beagleboard/BeagleBoard-DeviceTrees/blob/v6.12.x-Beagle/src/arm64/ti/k3-am62-main.dtsi
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
kCLOCK_Sysctl must be enabled for FLASH_CacheClear,
FLASH_CacheSpeculationControl and FLASH_CheckECC to have an effect.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
MCXW2XX ROMAPI provide the function FLASH_CacheClear to clear the cache.
The SMSCM is not supported on MCXW2XX platform.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
This commit fixes a change introduced in #97025
where too many definitions where removed.
Fixes issue #98382
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
io-channels in zephyr,user is required for this sample to compile, so
add that to the filter and remove the redundant ifdef in the source code.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Add a name to the "Wi-Fi MAC address type" choice symbol so that the
default can be updated on a per-board basis.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When alloc the evt buffer,such as the adv report, only compare the
remaining data len, should aslo consider the hdr_len, because the
hdr also copy to alloced buffer.if not consider the hdr, then
hdr + remaining data may larger than alloced buffer, because the
alloced buffer is not enough,then will assert when receive the
remaining data.
Signed-off-by: Guotao Zhang <guotao.zhang@nxp.com>
Instead of relying on various exceptions that can happen when one tries
to execute a program that is not installed in the system (typically
FileNotFoundError but sometimes PermissionError), use shutil.which() to
ensure the npx executable is available before running it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Kernel events depend on multithreading being enabled, and mixing them
with a non-multithreaded build gives linker failures internal to
events.c. To avoid this, make events depend on multithreading.
```
libkernel.a(events.c.obj): in function `k_event_post_internal':
175: undefined reference to `z_sched_waitq_walk'
events.c:183: undefined reference to `z_sched_wake_thread'
events.c:191: undefined reference to `z_reschedule'
libkernel.a(events.c.obj): in function `k_sched_current_thread_query':
kernel.h:216: undefined reference to `z_impl_k_sched_current_thread_query'
libkernel.a(events.c.obj): in function `k_event_wait_internal':
events.c:312: undefined reference to `z_pend_curr'
```
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
`ZVFS_OPEN_ADD_SIZE_NRF70_ENABLE_DUAL_VIF` should only exist in the
build if `NRF70_ENABLE_DUAL_VIF`, not for every application in tree.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit adds a new test case to the pipe API concurrency tests to
verify the behavior of zero-length pipes. The test ensures that writing
to a zero-length pipe blocks until data is read, and reading from a
zero-length pipe blocks until data is written—unless the pipe is closed,
reset, or the operation times out.
The test creates two pipes with zero-length buffers and spawns a helper
thread that performs complementary read/write operations. The two threads
use the pipe API as their only synchronization mechanism, validating the
correct blocking and wake-up behavior of zero-length pipes under
concurrent access.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
This fix addresses the issue encountered when power management (pm)
is enabled, as the PWM test suites utilize the GPIO driver, which
now incorporates the latest power domain enhancements and requires
CONFIG_POWER_DOMAIN to be enabled. Power domain functionality
manages device power actions such as turning on and off.
Accordingly, the pm device support for the pwm_silabs_siwx91x
driver has been updated to align with the recent power domain
improvements.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Remove Device Runtime PM "hack" used for modem cellular driver
initialization and use pm_device_driver_init() instead.
Signed-off-by: Tomas Gudelevičius <tomas.gudelevicius@draeger.com>
Fix IPC driver becoming non-operational after power management resume
due to stale tx_ack_pending state from before suspend.
After the IPC service backend refactor (commit cf7e2e63c1), the
intel_adsp_ipc_data structure contains function pointers for
suspend/resume handlers. This prevents using `memset` to clear the
entire structure during initialization, which was previously done in
intel_adsp_ipc_init.
Without clearing tx_ack_pending on resume, if the device enters D3 state
while still waiting for an IPC acknowledgment (e.g., from a previous
test iteration), the driver remains stuck in the waiting state after
resume. This prevents sending any new IPC messages, including the
FW_READY notification after D3 exit.
The fix explicitly clears tx_ack_pending during PM_DEVICE_ACTION_RESUME
to ensure the driver starts in a clean operational state after resume,
regardless of the state before suspend.
Fixes regression introduced in commit cf7e2e63c1
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This adds a test for the composite writer with time serialized resource and
resource instance values.
Signed-off-by: Simon Walz <simon.walz@autosen.com>
The LwM2M SENML JSON/CBOR decoder expects a name entry for every
time-serialized record. While this was already the case for resources,
resource instances were missing their corresponding name entries. This
change ensures consistency by adding name entries for resource instances
as well.
Signed-off-by: Simon Walz <simon.walz@autosen.com>
Partially reverts commit 7d2fb6c013,
it was originally thought that this commit added a method of saving
one specific key using the value that the device already has set,
but has been found to actually save the value that the user has
provided, bypassing the current value that the device has, which is
not compliant with the settings mgmt protocol, therefore remove
this change and it will need to be reworked in future to function
properly by saving one specific value from the device's current
configuration, not a user-specified value
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Temporarily disable running the user stack tests on mps2/an385 to
unblock ci issues reported in #98494.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
This commit disables monolithic wifi functionality for rw612 platform as
CI environement does not use binary blobs
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit aims to allow CI to be executed for samples that are
dependent on openthread requirement
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
The zephyrproject-rtos#91219 missed some entries when doing the clean-up.
This removes some of remaining SUBALIGN entries in the iterable sections.
Fixes CMake Warning:
zephyr_linker_section(NAME ...) given unknown arguments: SUBALIGN 4
Signed-off-by: Joel Schaller <joel.schaller16@gmail.com>
- remove duplication of text talking about release phases.
- fix release cadence, 4-month -> 6-month
- Remove reference to Linux, right now, we are not even close, was at
some point inspired by, but we moved on.
- Minor language fixes and clarifications.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Wrong printf format was using for size_t variable which caused
compiler warning and a failure.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The fix resolves the drift test failure as part of kernel
timer behaviour and timer api test suite.
Moved sleeptimer-related source files to RAM using zephyr_code_relocate
when CONFIG_SILABS_SISDK_SLEEPTIMER is enabled, and removed duplicate
listing from PMGR backend.Updated Kconfig to select SRAM_VECTOR_TABLE
and CODE_DATA_RELOCATION_SRAM for the sleeptimer service.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
When creating the audio connection, the SCO connection request will be
sent before the response "OK" to AT command "AT+BCS" is issued.
It causes the issue that the HFP HF cannot response the SCO connection
request with the correct codec. Then the SCO connection cannot be
established properly.
Put all processing into the same context, thus avoiding non-sequential
execution caused by the different priorities of different threads.
Add a flag `BT_HFP_AG_AT_PROCESS` to flag the AT command is being
processed.
When the flag `BT_HFP_AG_AT_PROCESS` is set, put the pending
executions into temp list `tx_submit_pending`. After the AT response
`OK` or `ERROR` has been sent, move the pending executions from
`tx_submit_pending` to `tx_pending`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix prj_minimal.conf as the project configuration and not as
the extra configuration for the sample.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Correct address and size for sdram-controller node
- Move sdram-controller node from r7fa8d1xh.dtsi to ra8x1.dtsi,
since all RA8x1 devices have this hardware IP
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
This commit fixes an issue introduced in #97531. Multicast routes added
by application are now set to have a prefix length of 16 bits instead of
128. This will allow multicast routing to all IPv6 addresses from those
groups.
For the OpenThread multicast listener callback, route length will be set
to 128 bits, as a MLD event is expected when an address is subscribed.
Route lookup has been removed since one will always be found as the
application registers multicast routes with same scope, but with a
smaller prefix length.
Fixed issue regarding packet forwarding and BBR state. Previously, code
was covering only the case wehn BBR was secondary and packet was
received from backbone interface. A secondary BBR should not forward a
multicast packet from OT interface to backbone interface and vice versa.
Improved unicast forwarding function to return from the beginning if the
packet has a multicast destination.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `.rst` files within the `boards`, `doc`, and `tests` directories.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in `.conf` files within the `samples` and `tests` directories.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add/update guidelines on how KConfig files should be written and organized
by identifying a common style currenlty used in most areas of the project
and formalizing it.
This should provide an aid for future merge request, code reviews and
refactorings to enable the acting party to better enforce consistency
in KConfig files.
Signed-off-by: Tim Schrader <tim.schrader92@gmail.com>
Collect filter commands into a single location and sort them in the
order: arch, vendor, platform, pattern, filter, tag. This enhances
the readability of help information and reduces the time spent
searching for filter command options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Collect device-testing commands into a single location to enhance
readability of help information and reduce the time spent
locating device-testing options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
reworked run_tests.py script:
- removed obsolete arguments from commands called by this script
- avoid code duplication by using a for-loop
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
added pyproject.toml config file which allows to set paths for tools
like mypy or pytest. With this config file it becomes possible to
directly run those tools in a local zephyr tree.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
A recent commit added support for the CH32V30x/20x PLL multiplier. The
code is protected by a `IS_ENABLED(...)` but uses a constant that
doesn't exist for the CH32V00x, breaking the build.
Tested by building samples/basic/blinky for the ch32v003evt and linkw.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The version register is not accessible through aux-reg interface,
So skip it entirely on platforms with aux-reg device tree property.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
To fix tpm building issue on imx9131:
west build -p -b frdm_imx91/mimx9131
tests/drivers/counter/counter_basic_api -T drivers.counter.basic_api
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This patch fixes a bug where the siwg917 SoC didn't enter deep sleep
even when the CONFIG_PM Kconfig option was selected, due to the
default power state of the network coprocessor.
Users should only need to activate the CONFIG_PM Kconfig option
when they want to enable power management and be able to deep
sleep by default.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
GPDMA does not support DMA_ADDR_ADJ_NO_CHANGE with a memory buffer. This
feature is required fro the SPI driver. Hopefully, SPI driver is the only
user of this feature.
Therefore, this commit introduces a hack for SPI. When the user want to
ignore the Rx data (= when he pass a NULL pointer for the Rx buffer),
rather than overwriting the destination in a loop, we just disable the rx
DMA.
This introduce a limitation: since Rx DMA stop early, any following Rx
request will start earlier than expected. Therefore, this patch breaks
cases with interleaved Rx buffers. In other words, the NULL buffer must be
the last one.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Because of limitation of gpdma, DMA Rx won't run if user doesn't specify
destination buffer.
Thus, the DMA Rx may stop before the end of the full transaction. So, wait
on DMA Tx instead.
Then, the SPI data won't be consumed by the DMA. We need to properly reset
the fifo before to start a new transaction (it is better to ensure we start
with a clean state before every transaction).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
GPDMA does not support DMA_ADDR_ADJ_NO_CHANGE with a memory buffer. This
feature is required for the SPI driver. Hopefully, SPI driver is the only
user of this feature.
Therefore, this commit introduces a hack for SPI. When the user request an
Rx transaction, rather than copying content of mosi_overrun parameter, it
configures the DMA to fill the destination memory (with either 0s or 1s).
Obviously, this only works if mosi_overrun is 0x00 or 0xFF. Hopefully, none
will need any other value.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Since the single-linked list management is well localized, the variable
names can now be abbreviated a bit.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The management of the single-linked list was made in various places:
- RSI_GPDMA_BuildDescriptors()
- after sys_mem_blocks_alloc()
- at the end of the loop
Centralize it at the end of the loop.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Radio interrupts were only initialized if CONFIG_ARM_SECURE_FIRMWARE=y,
but should be initialized independently of security configuration.
Move initialization from soc_prep_hook() to soc_early_init_hook(),
there is no reason to configure interrupts earlier.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Remove redundant enabling of NRF_RTC_TIMER in SoC specific files
and replace it with default y in the NRF_RTC_TIMER definition.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Clarify that the AMD Xilinx PS Triple Timer Counter (TTC) is used in both
Zynq UltraScale+ MPSoC (ZynqMP) and Versal platforms. Update the device
tree binding description and Kconfig accordingly.
Also, rephrase the Kconfig help text to fix grammar issues and improve
clarity.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
For RISCV vector table needs to be aligned depending on
CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN. This was missing
when using LTO making issues when direct ISR were in use.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Documentation extensions are often edited so bite the bullet and apply
`ruff format` on them and stop excluding them in ruff-excludes
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add test compilation for the STM32MP13 platform as part of
drivers.video.stm32_dcmipp.build since this allow to test
build the driver when STM32_DCMIPP_HAS_PIXEL_PIPES is not
defined.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Correct compilation error due to usage of DCMIPP_PIPE1 / DCMIPP_PIPE2
on platform which do not have pixel pipes by putting those caps
under #if defined(STM32_DCMIPP_HAS_PIXEL_PIPES)
Put also DCMIPP_VIDEO_FORMAT_CAP macro inside since this is only used
for AUX / MAIN pipes.
Fixes: 126aaf6b72 ("video: dcmipp: expose dcmipp caps for all 3 pipes.")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Chosen property "zephyr,usb-device" can be used with the deprecated
legacy USB device stack, but actually was never used in the tree. There
are no plans to use it in the future. Remove it from the documentation,
as there seems to be some misunderstanding and the property appears in
the board's DTS without any use or benefit.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The rts5912's port 80 has a FIFO. In the ISR (Interrupt Service Routine),
extract the FIFO data until the FIFO is empty, otherwise port 80 data will
be lost.
Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
Add bounds check to prevent accessing heaps array with index=-1
when the address parameter is NULL or too small.
Return NULL in such cases to match the API specification.
Signed-off-by: Nulliu Z <zophaisina@outlook.com>
k_current_get is not valid pre-kernel. It will return an invalid dummy
thread or invalid memory. The invalid memory case can occur when
CURRENT_THREAD_USE_TLS is enabled.
Assert in k_current_get when called pre-kernel so offending code may be
identified.
k_is_pre_kernel is moved up in kernel.h to avoid needing a prototype for
k_is_pre_kernel.
Signed-off-by: Rob Barnes <robbarnes@google.com>
Make k_is_pre_kernel safe to call from user mode. Since
z_sys_post_kernel memory is not accessible to user threads, calling
k_is_pre_kernel would result in a memory access fault.
This change adds k_is_user_context guard. It can be assumed the system
is post-kernel if k_is_user_context is true.
Signed-off-by: Rob Barnes <robbarnes@google.com>
When building Zephyr with CONFIG_CPP_EXCEPTIONS=n and linking against a
libc++ built with support for exceptions, lld complains that the
eh_frame-related symbols are missing:
ld.lld: error: undefined symbol: __eh_frame_start
ld.lld: error: undefined symbol: __eh_frame_end
ld.lld: error: undefined symbol: __eh_frame_hdr_start
ld.lld: error: undefined symbol: __eh_frame_hdr_end
libunwind handles the zero size:
76e71e05d2/libunwind/src/AddressSpace.hpp (L520-L526)76e71e05d2/libunwind/src/EHHeaderParser.hpp (L61-L64)
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Correct the documentation of sys_test_bit() and its derivative helper
functions (listed below) since these return a bit mask value instead of
an essentially boolean value as previosuly described.
In tree implementation do conform with that: the result of these
functions are always implicitly tested against being 0 or a non-zero
value.
Helper functions which documentation is modified are sys_test_bit(),
sys_test_and_set_bit(), sys_test_and_clear_bit(), sys_bitfield_test_bit(),
sys_bitfield_test_and_set_bit() and sys_bitfield_test_and_clear_bit().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The MPSC test consumer was incorrectly handling node returns to
producer free queues. It called spsc_acquire() without checking the
return value, then unconditionally called spsc_produce(). When the
SPSC free queue was full, spsc_acquire() would return NULL and not
increment the acquire counter, causing spsc_produce() to silently do
nothing (it only produces if acquire > 0). This resulted in lost nodes.
At least on QEMU, a 4-CPU configuration is needed for this bug to manifest.
Producers put all nodes in flight simultaneously with the single consumer
unable to keep up, causing frequent SPSC queue full conditions.
The Fix: Loop on spsc_acquire() until it succeeds before calling
spsc_produce(). This ensures nodes are always successfully returned to
producer queues.
Added board overlay for qemu_cortex_a53/smp to enable 4-CPU testing,
which reproduces the issue and validates the fix.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Previously, the bypass() function was called while the shell mutex
was still held, preventing the use of shell APIs (e.g. shell_print())
inside the bypass context.
This change unlocks the shell mutex before invoking bypass() and
locks it again afterwards, restoring proper shell context handling
and preventing potential deadlocks.
Issue fixed by: roni1234321
Fixes#97722
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
Add AES test cases for ECB, CBC, CCM, and GCM modes with standard
test vectors from FIPS-197 and NIST specifications.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Refactor hash tests to support SHA-224, SHA-256, SHA-384, and SHA-512
algorithms with a unified test vector framework.
This improves test coverage and makes it easier to verify hardware
crypto drivers that support multiple SHA variants.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This PR fixes incorrect error message when dts-linter is not installed
and provide a proper message instead of:
`Failed to parse dts-linter JSON output: ...`
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
There is a corner case found that the ACL connected event may be
printed when script is sending shell command by calling function
`shell.exec_command()`. The echo of shell command will mix with the
ACL connected event message. The received message cannot be
recognized by the function `shell.exec_command()`. It caused the
timeout exception reported by the function `shell.exec_command()`.
Before sending any shell commands, check the DUT connected event
after the connection is established on script side.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The previous implementation had a logical error where the prescaler
could never be bypassed due to incorrect use of BIT() macro:
This patch fixes the issue by:
1. Remove BIT() wrapper from LPTMR_PRESCALER macro to use raw
devicetree property value
2. Update bypass logic to check for zero value explicitly
3. Map DTS values to hardware register values correctly:
- prescale_glitch_filter = 0 -> bypass prescaler
- prescale_glitch_filter = n -> divide by 2^n,
using register value (n-1)
The devicetree semantic is now:
- prescale_glitch_filter = <0>: No prescaling (bypass)
- prescale_glitch_filter = <1>: Divide by 2
- prescale_glitch_filter = <2>: Divide by 4
- prescale_glitch_filter = <3>: Divide by 8
- And so on...
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
i2c_map_dt_bitrate uses LOG_ERR, however, one must define (or declare) a
log module where to sink the logs. Since this sits on a header file,
it creates a hidden include order dependency: you must include
i2c-priv.h after registering or declaring a log module on your driver.
Even worse, you are force to use logging in your drivers even if you do
not want to!
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Fixes an oversight of only checking files that are exactly named
CMakeLists.txt - this includes the directory name, so that it
actually checks any file in the tree with this name
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Recent addition of UVC Video encoder added sample targets to the sample
without the proper filter to ensure twister didn't try to automatically
build the sample target.
Not all boards have the zephyr_h264enc and zephyr_h264enc in their
device tree.
Fixes#98275
Signed-off-by: David Leach <david.leach@nxp.com>
Pass verbose flag to Twister to get better insights into what boards are
being built and see progress.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The minimal libc does not include `fnmatch.h` in its default search path.
This causes an issue when running coverage in CI as shown here.
https://github.com/zephyrproject-rtos/zephyr/actions/runs/18839500380/\
job/53748166725
That would technically be fixed with #97855 as well.
Testing Done:
```
west twister -c -p qemu_x86/atom -s kernel.pending.minimallibc --coverage\
--coverage-tool gcovr
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This wrongly displayed in CI as a sample failing, when it is a
test and not a sample, this changes the name to have test in it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Uses the correct way to partition memory as per the linux binding,
also fixes names which were not compliant with the zephyr
devicetree guidelines
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Uses the correct way to partition memory as per the linux binding,
also fixes names which were not compliant with the zephyr
devicetree guidelines
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fix use-after-release in lll_scan/lll_scan_aux when using
mayfly_enqueue to defer execution of the offset calculation
using ull_sched_mfy_after_cen_offset_get().
Apply suggestion from @Copilot
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Dual data rate isn't always supported so this
config enables/disables the relevant code in
the driver.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
There is a scenario where a Bus fault occurs as the
power management isn't initialised yet and the core
is attempted to be turned off via the ssienr register.
This commit edits this so the core register is written
to after the initialisation of the power management.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
For systems where the CPU / NVIC bus are considerably
faster than the peripheral bus used for I2C, there is
a risk that the isr handler returns before I2C controller
had time to clear its interrupt status flags
This would cause immediate re-entry to isr handler
which begins read from ISR register.
During time it take to re-enter and read from ISR register,
flags had time to be cleared
The isr handler expects that a flag is set, and in this case
when its not, an assert is triggered
The solution here is to make a dummy read from the ISR register before
returning from isr handler, this forces CPU to wait as long as needed
to ensure all writes to the I2C peripheral are completed
Fixes issue #97904
Signed-off-by: Erik Andersson <erian747@gmail.com>
Since the driver allows transfer lengths up to `UINT16_MAX + 1` bytes,
and additionally the `dummy_bytes` field includes bytes sent to provide
wait cycles on the bus, the type of this field must be `uint32_t`,
otherwise it can be overflowed for RX transfers close to the maximum.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.
Note this was already fixed in
37ff1b254f
But it was reverted in
d849ab1263
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Being pedantic, the second parameter to zassert_ok() is supposed to be
a literal format specifier string. (Just as for printf()). Not
directly a variable string to be printed. Let's fix it.
Fixes this build warning:
`warning: format not a string literal and no format arguments`
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the network interface goes down, close all TCP connections
that are bound to that interface. The reasoning here is that we
need a way to remove IP address from the interface and it might
not be possible if there is a TCP socket that is bound to that address.
If the interface comes back on, we might get the same IP address in
which case the socket closure was not really needed but it is not
possible to know in advance.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the network interface goes down, then we do not have any time
to tear down TCP connection gracefully because there is no more
a connection to send data to. In this case the TCP connection is
forcefully closed without going into FIN_WAIT_1 state.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The merge buffer was previously declared as a static variable, causing it
to be shared across all I2C instances and risking data corruption when
used concurrently. Move the buffer into the driver data to make it
instance-specific and avoid race conditions.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Bump up dts-linter to 0.3.1 to fix issue when json output is not flushed
to stdout before dts-linter exits.
Bump up dts-linter to 0.3.2 to address undefined in annotation
messages
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Add descriptions of the most popular shield interfaces.
I moved the section on shield activation to the top of the page.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Due to the recent nRF70 driver changes, the driver ops are removed from
config, but few functions in hostap still depend on that, so, pull the
fix for hostap driver ops.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
If the CIG and ACL overlap each other when the CIS is starting
zephyr will assert on negative time, so fit this special case.
Signed-off-by: Lars Segerlund <lrsu@demant.com>
When multiple relay adv sets are used, the bt_mesh_adv_send function
calls bt_mesh_adv_relay_ready which should distribute relayed
advertisements across all relay adv sets.
Until the submitted relay adv set work is started, the ADV_FLAG_ACTIVE
is not set. Therefore, next call to bt_mesh_adv_send will try to
re-submit the same relay adv set work, instead of picking up another
relay set which is actually free and ready to send an advertisement.
This commit adds a check that checks if the adv set work is already
pending to be executed. And if so, schedule_send returns false to make
bt_mesh_adv_relay_ready pick next relay adv set.
This shouldn't brake advertising because once adv set is done
transmitting advertisment, it will pick up a next one.
The ADV_FLAG_PROXY check is added to do re-submit for adv set which was
used for proxy advertisement since we need to prioritize mesh messages
over proxy advertisements when those are running on the same adv set.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The `bt_le_ext_adv_update_param` will set new random address when option
not select `BT_LE_ADV_OPT_USE_IDENTITY`, But `bt_le_ext_adv_start` will
also set random address again.
This will be affect bluetooth mesh, after this change, will ensure address
only change once for every advertising.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Add option CONFIG_ARM_SCMI_CHAN_SEM_TIMEOUT_USEC
for users to change default timeout value.
Different platform has different delay time when
scmi agent get scmi response from scmi platform.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Add bt_bap_unicast_client_unregister_cb to unregister BAP
unicast client callbacks. This is required for unittests
to clean up between runs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The switch_handle for the outgoing thread is expected to be NULL
at the start of a context switch.
The previous code performed a redundant assignment to NULL.
This change replaces the assignment with an __ASSERT(). This makes the
code more robust by explicitly enforcing this precondition, helping to
catch potential scheduler bugs earlier.
Also, the switch_handle pointer is used to check a thread's state during a
context switch. For dummy threads, this pointer was left uninitialized,
potentially holding a unexpected value.
Set the handle to NULL during initialization to ensure these threads are
handled safely and predictably.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Using semihosting on supported architectures (arm, xtensa, riscv) it now
possible to generate tracing giles easily and without being restricted
by size.
Using qemu for example, it is now possible to generate the tracing file
simply by running:
west build -p -b mps2/an385 tests/kernel/msgq/msgq_api/ \
-t run --snippet semihost-tracing
This will generate a tracing file in the build/ directory which can be
viewed with babeltrace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updates the Port DTS nodes to use microchip gpio g1 driver.
Updates the file structure as per the ordering information.
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
STM32F7xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
1.Add "mux-1-dc-0-div" and "mux-2-dc-0-div" property
in mc_cgm device tree for STM clock divider setting
and set these properties in frdm_mcxe31b.dts
2.Enable STM peripheral clock in mc_cgm_clock_control_on
function
3.Support to get STM frequency from mc_cgm_get_subsys_rate
function
4.Configure STM clock in mc_cgm_init function
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add board for Pebble 2 Duo. Most peripherals are supported, however,
some upstream changes are needed to take full benefit of some.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Added overlay files for sam_e54_xpro TCC nodes
Added sam_e54_xpro platform allow in testcase.yaml.
Added an extra scenario to testcase.yaml
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Add support for the ST-Link GDB Server runner to be able to debug
STM32H750B-DK apps, including those running from external flash.
Update the board's documentation accordingly.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
When debugging boards with external Flash, to make it accessible for
read and write by the debugger, we need the --external-init option
together with --extload <file_path> option.
It allows the ST-LINK GDB server to make external memory accessible
after reset without any need for the app to set it up.
The external memory must be memory mapped and directly accessed because
normal memory read/write is used by gdb.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Add support for 64-bit devmem operations for 64-bit devices.
Signed-off-by: Sergii Vystoropskyi <vistorop@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Added sys_read64 and sys_write64 functions for 64-bit memory
operations when building for 64-bit.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Add support for LD-style file specifications in the
IAR generator for
`zephyr_linker_section_configure(INPUT`
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
The register names of NVIC have been changed in CMSIS6,
so updates are required to match this.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Adds the pinctrl node and encapsulates the port nodes within
the pinctrl node for pic32cx sg series of socs.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
This updates the version of picolibc to match that used by SDK 0.17.4. In
the Zephyr picolibc fork, that's marked with the zephyr-sdk-0.17.4 tag now,
which is on the zephyr-sdk-0.17 branch.
Changes since the previous version which impact using the module:
* machine/arm: Disable exception tables in ARM string asm code
* cmake: Silence messages about core-isa.h
* Correct return type of __non_atomic_*_ungetc functions
* Delete obsoleted _syslist.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix the following building warning:
modules/lvgl/lvgl_shell.c:62:41: warning: format '%u' expects argument
of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long
unsigned int'} [-Wformat=]
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
If the framebuffer size is same as the full screen, full refresh
is applied. Otherwise, partial refresh is applied.
Signed-off-by: Winteri Wang <dongjie.wang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
The panel is 7inchi DSI LCD on i2c bus.
Also added display into feature list.
Signed-off-by: Winteri Wang <dongjie.wang@nxp.com>
Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
Setup most clocks with common_clock_set_freq().
PLL and mux are preset.
Signed-off-by: Winteri Wang <dongjie.wang@nxp.com>
Signed-off-by: Ruoshan Shi <ruoshan.shi@nxp.com>
- add Kconfig parameters for sample bit width and number of channels
- remove the conditional compilation from main.c to support the Kconfig
configuration
- BYTES_PER_SAMPLE need to correspond to BIT_WIDTH
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
- in order to support different bit widths introduce a Kconfig parameter
SAMPLE_BIT_WIDTH used in the main.c - default is 16 bits
- for platforms with NXP micfil peripheral, default is 32 bits
- BYTES_PER_SAMPLE needs to correspond to BIT_WIDTH
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
- add overlays for frdm_mcxn947 and mcxn_n9xx_evk boards in order to
enable micfil for the dmic sample
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
The net-tools is actively maintained and fixes are welcomed
so mark the project as maintained in the maintainers file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This makes for a not so pretty regex, so there might be better options,
meanwhile this ensures that what are effectively API symbols are
properly documented and visible in the API documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The test thread and the system workqueue have the same priority,
mostly some specific CAN driver threads a lower preemptive priority,
so it is a bit arbitrary whether the workqueue cleans up the send
context before the next send.
Signed-off-by: Stephan Linz <linz@li-pro.net>
The LPTIM timer driver previously had hardcoded assumptions about
using LPTIM1 or LPTIM3, which prevented it from working with other
LPTIM instances like LPTIM2, LPTIM4, LPTIM5, and LPTIM6.
This change makes the driver work with any LPTIM instance by:
1. Adding lptim_enable_autonomous_mode() function that dynamically
detects which LPTIM instance is in use and enables autonomous
mode for instances that support it (LPTIM1, LPTIM3, LPTIM4).
LPTIM2, LPTIM5, LPTIM6 do not support autonomous mode.
2. Adding lptim_freeze_during_debug() function that handles debug
freeze configuration for all LPTIM instances across different
APB buses:
- LPTIM1: APB1_GRP1, APB3_GRP1, or APB7_GRP1
- LPTIM2: APB1_GRP1, APB1_GRP2, APB3_GRP1, or APB4_GRP1
- LPTIM3: APB1_GRP2, APB3_GRP1, or APB4_GRP1
- LPTIM4: APB3_GRP1 or APB4_GRP1
- LPTIM5: APB3_GRP1
- LPTIM6: APB3_GRP1
Both functions use DT_REG_ADDR() to compare the base address of the
configured LPTIM instance at compile time, ensuring zero runtime
overhead.
Tested on STM32U5A5 with all four LPTIM instances (LPTIM1-4).
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
The driver internally uses semaphores which are only available if
CONFIG_MULTITHREADING is enabled in the build.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
It might happen that some boards have "zephyr,entropy" node set, but under
the hood the driver is not available (ex: entropy_bt_hci not being
available because CONFIG_BT_HOST is not enabled in the build).
This commit changes the behavior so that:
1. if "zephyr,entropy" is set in the DT then CONFIG_CSPRNG_AVAILABLE get
enabled;
2. CONFIG_CSPRNG_AVAILABLE selects CONFIG_ENTROPY_GENERATOR
3. if there really is a driver available then CONFIG_ENTROPY_HAS_DRIVER
will be enabled by that driver;
4. CONFIG_ENTROPY_HAS_DRIVER selects CONFIG_CSPRNG_ENABLED;
4. Mbed TLS can consume the CONFIG_CSPRNG_ENABLED information to
decide whethere to enable CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG or
the legacy CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.
Signed-off-by: Tony Han <tony.han@microchip.com>
Some Mbed TLS' Kconfigs were renamed in order to improve the 1:1 matching
between them and the build symbols used in Mbed TLS. This commit add a note
on the migration-guide document for this change.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This is to preserve backward compatibility until the deprecation period of
the old names expires. After that time entries from that file can be
removed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Some variants of the PCA953x family support pull-up / pull-down
resistors through registers 0x43 and 0x44 (mostly the TCAL9538 variant).
We already support input latching and interrupt masking (which is also
only present on a few variants), so let's also add support for pull-up
and pull-down resistors.
The feature can be enabled with the has-pud property in the device tree.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Extend the Signing Images section in the build documentation to
highlight the differences between confirmed and unconfirmed images
with respect to the PSA Certified Firmware Update API.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Add a note about BL2 (MCUboot) signing updates when the board is built
as TF-M NS.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, all images are merged.
Currently, there is no tfm_merged.bin file for use in FOTA. This
adds file generation to fulfill that requirement.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, the process to create the
final tfm_merged.bin file is more complex. This prepares the content
to introduce the generation of tfm_merged.bin for use in FOTA
applications.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The optional --output-bin parameter instructs the IntelHex class to
save the content as a binary file instead of the Intel Hex format.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Use cmake_parse_arguments() for more idiomatic code. This makes the
code more readable and easier to extend with new options.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
A fundamental use of Trusted Firmware-M is to provide security for
IoT applications, where firmware upgrades (FOTA) are almost always
mandatory. The current file signing process does not produce the
necessary binaries for multi-image S/NS FWU, since hex images are
not suitable for this use case. This introduces the missing signed
binary files for use by the FWU partition. The changes were tested
in multi-image FWU scenarios, and support for single-image scenarios
can be easily added in the future.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Make variables that define output files explicitly include 'HEX' in the
name. This refactoring step allows for the introduction of BIN file
generation.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current behavior when signing an image adds --pad but does not
confirm the image. This appears to be a mistake, as the user should
inspect the image status in the Firmware Upgrade software. If an image
is not --confirmed, the FSM cannot infer the correct states. This sets
the image as confirmed to resolve the issue.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current behavior when signing an image is to always set --pad and
--pad-header for all images unless TFM_USE_NS_APP is set. This does not
allow for easy creation of signed images for FOTA applications. Rewrite
the PAD parameter as HEADER and TRAILER to simplify the setup of more
signing options.
Another important reason for this change is that the NS image, when
signed without --pad, runs on the hardware but does not perform the
MCUboot test, and the FWU never upgrades the image. This fixes the NS
image signing process to correctly support TF-M FWU using the PSA API
functions.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The --max-sectors option helps catch problems with flash overlap when
merging images. If there is a misalignment in flash partitions, the
merge process usually fails. This uses information from Zephyr flash
partitions and the flash controller to automatically determine the
max sectors value and apply it when signing an image.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current version of TF-M script that sign MCUboot image uses a
default alignment of 1. This value varies between flash devices
and not all accept the default 1. This improve the script picking
the write-block-size property from the current flash controller
and pass as the --align parameter when signing an image.
Note: This solution works out-of-box for the vast majority of
devices in the Zephyr tree and an exception will throw when
a device is not supported.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The partitions for the stm32l562e_dk/stm32l562xx/ns board are not aligned
with TF-M. This fixes the partition alignment.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The external partitions are defined dependent from S and NS images. This
move the external partitions from common to the S image. The NS image
will be defined in future to allow correct usage of MCUboot.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The mps2/an521/cpu0/ns define flash layouts in tf-m to allow
CONFIG_TFM_MCUBOOT_IMAGE_NUMBER be 1 or 2. In the Zephyr project when
building the samples the value selected is 2.
The layout changes are necessary to allow use the --max-sectors options
when signing the images. It ensures that flash layout is respected. To
allow this the compatible "soc-nv-flash" was added in the reserved
memory and the fixed-partitions were defined.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The stackprot test currently depends on compiler-generated stack frame
layouts, which can vary between toolchains and optimization levels.
This makes the overflow check fragile and may cause unintended faults.
Add a small guard buffer in alternate_thread so the intentional overflow
is always contained within the thread stack. This ensures the test
behaves consistently across toolchains, architectures, and optimization
settings.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
build.dir-fmt format string arguments are extended. New format args are
'west_topdir' (absolute path to the west workspace directory) and
'source_dir_workspace' (relative path of the source directory to
west_topdir).
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Add initial support for the AD4170-4, AD4190-4, and AD4195-4 24-bit
ADCs, including reference selection, programmable gain amplifier, ADC
conversion modes, configurable analog inputs, filter settings, and both
bipolar and unipolar operation. Supports internal and external buffered
references, and operation from a 4.75-5.25V analog supply and a
1.7-5.25V digital supply.
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Document the AD4170-4, AD4190-4, and AD4195-4 low noise, high precision
24-bit ADCs, each supporting 4 differential or 8 single-ended inputs,
integrated PGA (0.5-128). All devices feature internal and external
buffered references, operate from 4.75-5.25V analog and 1.7-5.25V
digital supply.
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
1. There are debug info within k_sched_unlock so we shoulld add
same debug info to k_sched_lock.
2. The thread in run queue should be normal or metairq thread, we should
check it is not dummy thread.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
The next patch will cause mps2/an385 board fail.
The original code access 0x2000a10 but the interrupt statck
start at 0x20002000 with size 2048 byte(end at 20001800)
so the access causes stack overflow.
Increase ISR stack size to resolve this issue.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Relax the `Missing a blank line after declarations` checkpatch error by
loosening the requirements for a macro to be treated as one that
declared a variable.
Currently the regex matches the pattern `DECLARE` or `DEFINE`, as long
as there are between 1 and 6 trailing `_FOO` components to the macro
name (e.g. `DECLARE_MY_TYPE()`). Zephyr however contains many macros
that don't have the trailing components but still resolve to variables
(e.g. `ATOMIC_DEFINE`, `K_MUTEX_DEFINE, etc`).
By changing `{1,6}` to `{0,6}`, we remove the requirement for the
trailing `_FOO` component(s) while still allowing them. This stops
checkpatch from erroring on patterns like this:
```
struct driver_data {
uint16_t some_value;
ATOMIC_DEFINE(some_atomic, 16);
};
```
Signed-off-by: Jordan Yates <jordan@embeint.com>
The Xilinx Zynq 7000 I2C controller has the following bugs:
- completion indication is not given to the driver at the end of
a read/receive transfer with HOLD bit set.
- Invalid read transaction are generated on the bus when HW timeout
condition occurs with HOLD bit set.
- If the delay between address register write and
control register write in cdns_i2c_mrecv function is more, the xfer size
register rolls over and controller is stuck.
As a result of the above, this patch disallows message transfers with
a repeated start condition following a read operation. Also disables
interrupts between the address register write and control register write
during message reception, to prevent transfer size register rollover.
Signed-off-by: Simon Maurer <mail@maurer.systems>
Add entries in sample.yaml for enabling h264enc / jpegenc
uvc based test on the stm32n6570_dk/stm32n657xx/sb platform.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add zephyr_h264enc and zephyr_jpegenc labels on node in order to
be able to use VENC and JPEG codec from samples.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add overlay files in order to enable usage of
the encoder in the UVC sample.
This work with platform defining node label
zephyr_jpegenc
zephyr_h264enc
Mode can be selected by using -DFILE_SUFFIX="jpegenc" or
-DFILE_SUFFIX="h264enc" when building the sample while
also adding -DCONFIG_VIDEO_ENCODER_JPEG or
-DCONFIG_VIDEO_ENCODER_H264 as well in the command line.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The frame_based descriptors differ from the frame descriptors
in that there is no dwMaxVideoFrameBufferSize field.
In order to do that, add a new uvc_frame_based_discrete_descriptor
structure to be used to fill in proper information into the
frame descriptor. In addition to that, a new format descriptor
is also added for frame based transfer.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit prepares introduction of the UVC Frame Based support by
using the struct uvc_frame_descriptor as parameter of most of the UVC
functions. struct uvc_frame_descriptor contains the common fields for
all supported frame type and then depending on the DescriptorSubtype
the pointer is casted in the correct struct definition.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add rough estimate of a worth case H264 output size.
The video_estimate_fmt_size would need more information
such as quality, profile in order to give a better
estimate for each formats so for the time being just
stick to 16bpp based size, same as for JPEG.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Allow creating a pipeline as follow
camera receiver -> encoder -> uvc
If the chosen zephyr,videoenc is available, the sample will pipe
the camera receiver to the encoder and then the UVC device instead
of directly the camera receiver to the UVC.
Current implementation has several points hardcoded for the time
being:
1. intermediate pixel format between the camera receiver and encoder
is set to NV12. This shouldn't be hardcoded and should instead be
discovered as a commonly capable format from the encoder / video dev
2. it is considered that encoder device do NOT perform any resolution
change and that encoder output resolution is directly based on the
camera receiver resolution. Thanks to this, UVC exposed formats
are thus the encoder output pixel format & camera receiver
resolutions.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
In preparation for the introduction of video encoder support
add an indirection for handling of the buffers of the UVC
source device. Currently this is only video_dev however it
can also be an encoder device when encoder is introduced
between video capture device and the UVC device.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Addition of a helper function which takes care of dequeue
from a source video device and queue into a sink video device.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This updates the SHA for Xtensa HAL to latest.
This brings in the SoC configuration for intel_adsp/ace40,
and will be used with the next SDK release.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Section 4.3.7.3.6 of the I3C v1.2 specification states that a value of
0 for the max ibi size indicates an unlimited payload size. Set it to
the max it can be configured for.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Update STM32 ADC binding description now that the STM32F3 ADC asynchronous
prescaler is set through the clock property.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that the ADC prescaler are set within the driver using the clock
system, remove the specific setting of the prescaler from the clock driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that the ADC prescaler are set within the driver using the clock
system, the specific rcc compatibles for F1 and F3 are no longer useful.
Replace them with the standard one (from which they were derived).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Some series like F1, F3, N6 and U3 use an ADC prescaler defined in the RCC.
Instead of adding specific properties in the RCC driver, use the secondary
clock system to configure the prescaler.
The ADC driver now configures the clocks depending on their presence and
their name. Three clocks can be defined:
- the register clock (mandatory for all series)
- the kernel clock (depends on series)
- the prescaler value (depends on series)
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
To easily differentiate between the different clocks that can be configured
in device tree, make their naming mandatory, and explicit what the expected
names are.
Add these names in all dtsi and dts files that need them.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Reworks the way the STM32_DT_CLOCK_SELECT builds its elements. Instead of
taking a mask, it takes the MSB of the field. From the MSB and LSB, we
calculate the width of the field, and this width is then stored (instead
of the mask). This allows to gain space for higher values for the fields.
This larger space is necessary to add the selection of the ADC prescaler
on STM32N6 because it is an 8-bit long field.
The allowed width is from 1 to 8 (and internally stored as 0-7 to fit on
3 bits).
STM32_DT_CLKSEL_MASK_GET keeps the same name, since we still need the mask,
and returns the bitmask from the width with the BIT_MASK macro. Other
STM32_DT_CLKSEL_MASK_* macros are renamed with WIDTH.
All call to STM32_DT_CLOCK_SELECT are updated to reflect the change and use
a width instead of a mask.
This also fixes a few issues like STM32H7 MCO macros, and adds MCO_PRE for
STM32N6.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
- Increase the size of the storage partition to 2 sectors
because a single sector makes it unusable as reported
by test_flash_copy.
This change will breaks backward compatibility regarding
MCUboot firmware update support.
Add a migration guide note about changes to the flash layout
and warn users about potential firmware upgrade failures.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
update CONFIG_TEST_DRIVER_FLASH_SIZE to match actual flash size.
The test was previously failing due to a mismatch between the expected
flash size (827392 bytes) and the actual size reported by flash_get_size()
(1048576 bytes).
This update sets CONFIG_TEST_DRIVER_FLASH_SIZE to 1048576 to reflect the
correct size of the flash device as defined in the reference manual for
the NUCLEO_WB55RG board.
The increase in required flash size (216K) for the full stack M0 binary
also justifies aligning the test configuration with the actual hardware
capabilities.
This change ensures the test passes and accurately reflects the flash
memory layout.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Support I2C target error callback in I2C driver when
registered by the bus target consumer.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Add a 1 second delay before printing environment variables to give the
shell time to initialize and print its prompt. This prevents a race
condition where the shell prompt could interleave with the environment
variable output on SMP systems, causing test failures.
Without this delay, the output could appear as:
BUILD_VERSIuart:~$ ON=v4.2.0...
With the delay, the shell completes initialization first:
uart:~$
BOARD=...
BUILD_VERSION=...
ALERT=
This fixes the sample.posix.env test timeout on FVP v9a/smp where the
test harness regex failed to match the corrupted output.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
use CONFIG_RISCV_ISA_EXT_F to set CONFIG_CPU_HAS_FPU.
Same for CONFIG_RISCV_ISA_EXT_D and
CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Now that ext_flash_app variant is available, it should be used for
mcuboot related apps on this board.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add ext_flash_app variant to stm32h7s78_dk to allow building
application running on ext flash.
Largely based on A.Jarmouni's work to enable the same on stm32h750_dk
in PR 97037.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add I2S_TRIGGER_DROP call in the error test to ensure proper cleanup
after stopping the I2S device. This validates that the drop trigger
is properly handled in error conditions and resources are released.
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
Add support for audio_auxpll clock source as an alternative to audiopll
in the i2s_nrf_tdm driver. This enables TDM functionality on platforms
that use the auxiliary PLL for audio clocking.
- Add audio_auxpll node detection and configuration
- Update clock management to support both audiopll and audio_auxpll
- Add build assertions for supported frequency configurations
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
The Wi-Fi firmware image in the QSPI flash has always been located in
the last 512kB of the 16MB Flash device. This offset is 0xf80000, not
0xe80000 as it was mistakenly set. Fix.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add the definition for the Master Boot Record partition at the
beginning of the flash. This is used by existing Arduino 'Storage'
libraries to store partition table information.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Use of uart_nrfx_uarte2 driver was deprecated before 4.1 release
and now can be removed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Change the default coex mode when there is neither WiFi or BT activated.
Switch from BLE_ONLY to WLAN_ONLY. It fix a bug where we can't go in
deepsleep if we didn't select CONFIG_WIFI.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit add missing `@return` docstrings to the instrumentation
subsystem public header.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Using the Wi-Fi credentials system, we need to stop connecting with stored
credentials once a connection has been successful.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
All the clocks names on SiWx91x follow the pattern "SIWX91X_CLK_xxx".
SIWX91X_ADC_CLK was an exception.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add depends on SOC_SERIES_STM32N6X to
PTP_CLOCK_STM32_HAL in order to use PTP on the STM32N6 series.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Update the default MAIN_STACK_SIZE to 2048 bytes to accommodate
the initialization requirements of the network coprocessor (nwp),
particularly when power management is enabled. It resolves a bug
where we can't boot when PM is enabled with multiple active
peripherals.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Use LL_USART_DisableDMAReq_RX to disable UART RX DMA requests.
This should be called before entering shutdown mode.
Force to use UART_STM32U5_ERRATA_DMAT_LOWPOWER
when POWEROFF is selected. This ensure the system to shut down
properly instead of hanging due to DMA staying active.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Access the correct node to get the SPI device GPIO CS.
It comes from the parent spi-dev node, not the bus
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
Removes two Kconfig which seemed to indicate downloading of a
project would happen automatically, which does not abide by how
to get additional module code in Zephyr. Due to TF-M always setting
these to "DOWNLOAD" in the repo, they are set even if the modules
do not exist so that they do not download e.g. in CI. Unfortunately
it seems that the qcbor one cannot be removed at this time due to
being needed in some applications and is not apache licensed,
though instructions should be provided to users instead describing
how to add it to a module manifest instead, in a later task
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
It is possible for usbd_disable() to be called when the core is
hibernated. When done so, the USB stack will attempt to deactivate all
the endpoints. Because the core is hibernated, register reads are
really undefined. This can lead to udc_dwc2_ep_deactivate() not calling
udc_dwc2_ep_disable() which will leave struct udc_ep_config busy flag
set.
When endpoint 0x00 busy flag is left to true, the driver won't allocate
buffer to receive SETUP data which is mandatory in Buffer DMA mode. This
leads to essentially dead device after reconnect, because the device
will not respond to any control transfers.
Solve the issue by modifying backup register value instead of real one
when endpoint is deactivated while core is hibernated.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
multiprocessing no longer defaults to fork, so force it to maintain pre
3.14 behavior. We will need to revisit the implementation and at some
point move to forkserver
Fixes#95058
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order to allow for users to invoke "west flash" without actual
hardware connected but still running the logic and pregeneration of
commands, specifically the json file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Until now, for historical reasons (see
f42cef9c81 and
58e0e31c7e), the use of the --erase-mode
command-line switch was reserved for the nRF54L family. But in fact this
can be used (instead of --erase) for any of the Nordic ICs. This patch
extends the usage of this switch regardless of family.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
For all STM32 drivers and SoC, replace the MODIFY_REG macro (defined in
the STM32 HAL) by stm32_reg_modify_bits defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 drivers and SoC, replace the READ_REG macro and the
LL_xxx_ReadReg functions (defined in the STM32 HAL) by
stm32_reg_read defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 drivers and SoC, replace the WRITE_REG macro and the
LL_xxx_WriteReg functions (defined in the STM32 HAL) by
stm32_reg_write defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 drivers and SoC, replace the READ_BIT macro (defined in
the STM32 HAL) by stm32_reg_read_bits.
Fixes some cases where the return value was tested like a boolean
despite not being one.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 drivers, replace the CLEAR_BIT macro (defined in
the STM32 HAL) by stm32_reg_clear_bits defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 drivers, replace the SET_BIT macro (defined in
the STM32 HAL) by stm32_reg_set_bits defined in Zephyr.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add a set of bitops functions in order to replace the STM32 HAL bitops
macros throughout the drivers.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Split variables definition into 2 line as per Zephyr coding style
expectations since they are of different type.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove useless test on buffer length in handle_msg_setup() since the
buffer was allocated few lines above with a known non zero size.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove useless OR operation on return value is udc_stm32_enable()
since the return value is always 0 before it's OR-ed with a new return
value.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Change implementation to ensure all boolean test are done on essentially
boolean values.
No functional changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Rename endpoint configuration pointer variable in HAL_PCD_ResetCallback(),
udc_stm32_ep_mem_config() and udc_stm32_ep_disable() from ep to ep_cfg
to prevent confusion since ep is usually used as endpoint address.
For consistency, also use ep_cfg elsewhere where an endpoint config
pointer is used, instead of using either cfg, ecfg and ep_cfg.
No functional changes.
Suggested-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The condition for setting the GPOMD bit when `port0_push_pull`
is enabled was reversed.
Fix this problem.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add flash and psram dts based on RT700 board resource.
Add the clock and power setting for XSPI in board specfic initilization
function.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
Move nxp,xspi.yaml from spi bindings to mtd, it should be flash
controllor rather than simple bus controller.
Delete the xspi flash mx25um51345g bindling yaml file which is useless.
Enable flash and two psrams on RT700 core0 and one psram on core1.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
In NPCXn variant, the I2C peripheral hardware uses FIFO for data
transfer, while in NPCKn variant, it uses DMA.
This change separates the FIFO-specific code from the common controller
logic and adds support for DMA mode.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add an new boolean property `dma-driven` to indicate if the I2C
hardware module has a dedicated DMA support for the data transfer.
Add this property to `i2c_ctrlx` nodes in NPCKn variant SoCs.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Dropped the device argument from i2c_silabs_pm_policy_state_lock_get/put.
Updated all internal usage.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Updated the I2C driver for EFR Series 2 devices based on the
design improvements in the SiSDK I2C implementation
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The Analog Device AD5601, AD5611, and AD5621 devices are 8, 10 and 12
bits DAC respectively.
These devices use a 16 bits SPI communication protocol.
The 2 first bit encode the low power mode (this driver do not use the
low power mode, it always run in the 'normal' mode).
The next 14 bits contain the left aligned value. The 2, 4, or 6
remaining bits (depending on the resolution) are set to 0.
Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
This commit enhances the SPI shell in a number of different ways:
- Previously only spi buses could be specified in the shell.
Now both spi buses and spi devices (physical device on the spi bus,
not the device struct) can be specified.
- Both spi buses and spi devices can be specified by their node name or
by any of their node labels.
- Instead of having a single instance of a spi config struct, each spi
bus/device has it's own dedicated config. This means that
users only have to configure spi config once for each device and use
them freely, without needing to reconfigure them every time after
switching between different spi buses/devices.
- Spi devices get their spi configs automatically from the devicetree at
compile time. This means that once a good working configuration is
found for a spi device, that can be specified as a "default" in the
devicetree.
- Spi devices don't need to have their status set to "okay" or be
initialized by their driver to be accessible from the spi shell. As
long as the spi bus that they are on has status="okay", they can
be accessed.
- When changing a cs pin with spi cs command, the spi device/bus
needs to first be specified before specifying the gpio device.
The nested dynamic subcommands enable users to autocomplete both
of the arguments.
Implementation details
- It was possible to gather all the information about the spi devices
from the devicetree at the compile time, but not for the spi buses.
For the spi devices we have a way to get spi device nodes that are
on an okay spi bus with a devicetree macros and extract data from
those nodes. For the spi buses that is not possible,
since there is no macro to get all spi bus nodes at once.
- So, for the spi buses this discovery step has to be done at the
runtime, with the help of SYS_INIT macro and shell_device_filter
function.
- Since we now allow users to either specify a spi bus or a spi device
by their node label or their node name, we needed to have a way to map
those strings to the correct spi config struct, so we can later pass
it to the spi API functions or do some configuration on it. That is
made possibly by the find_spec_by_label and the two arrays,
spi_things and maps.
Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
Allow the display to also use if() instead of #if by leveraging the
DEVICE_DT_GET_OR_NULL() that permit display_dev to always be defined.
The compiler will const-fold all the unused variables and functions.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Centralize exit of all helper functions and display a common message
that indicates clearly that the sample is not blocking on any function
but instead stopped running.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Turn the test part of the sample code into a dedicated test into the
tests/ directory instead of just samples/.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use the same error handling implementation as everywhere else in the
video area and the majority of Zephyr:
ret = error();
if (ret < 0) {
return ret;
}
Signed-off-by: Josuah Demangeon <me@josuah.net>
Use an "app_" prefix for all functions local to the application.
This avoids accidentally using "display_" or "video_" prefix that
are reserved for the respective area.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When possible, make use of C if statements instead of preprocessor #ifdef.
This still allow conditional compilation by letting the compiler
garbage-collect unused code.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Increase log verbosity to print one line per captured frames and make
it like in the README by default. This avoids giving the impression
that the capture sample does not work. Users desiring to get better
performance can disable logging or reduce verbosity from INF to WRN.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When possible, use static initializer instead of memset() and
initialization at runtime. Fixes a bug where uninitialized memory of caps
would be used, in case drivers do not initialize them like they should.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add an always-on CID for enabling the test pattern, which makes
it possible to use it in tests enabling the test first enabling
the pattern.
Signed-off-by: Josuah Demangeon <me@josuah.net>
- Updated the testcase to test `z_riscv_fault()` error handling path.
- The main file is now fully assembly so that we can use precompiler
guards more easily to test with/without frame pointer enabled.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_EXTRA_EXCEPTION_INFO` that was added in #78065 doesn't
seem necessary, as we were already storing and printing the
callee-saved-registers before that. All `CONFIG_EXTRA_EXCEPTION_INFO`
does in RISCV is to add an additional `_callee_saved_t *csf` in the
`struct arch_esf`, which overhead is negligible to what's being enabled
by `CONFIG_EXCEPTION_DEBUG`.
Let's remove `CONFIG_EXTRA_EXCEPTION_INFO`, and have that extra
`_callee_saved_t *csf` in the `struct arch_esf` as long as
`CONFIG_EXCEPTION_DEBUG` is enabled.
TL;DR: it doesn't make sense to not enable `CONFIG_EXTRA_EXCEPTION_INFO`
when `CONFIG_EXCEPTION_DEBUG` is enabled, so let's merge them.
Then, since `*csf` is always available in the `struct arch_esf` when
`CONFIG_EXCEPTION_DEBUG=y`, we can simply rely on that pointer in
`z_riscv_fatal_error()` instead of an additional argument in
`z_riscv_fatal_error_csf()`, rendering the latter redundant and thus
can be removed.
Additionally, save the callee-saved registers before jumping to
to `z_riscv_fault()`, so that callee-saved-registers are printed on
generic CPU exception as well.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The reset GPIO for the SN74HC595 driver was not working anymore since
c407fbc. That commit made it optional among other changes but
accidently removed the s from reset_gpios property name causing the
driver not being able to retrieve the specified reset-gpios property
from the devicetree anymore. Add the missing s back to fix this.
Signed-off-by: Michael Klammt <michael.klammt@automatic-research.de>
Improve the STM32 DMA driver to only enable transfer and half-transfer
interrupts if the interrupt handler has effects beside clearing the
isr flag. This improves system performance as unnecessary interrupts
are no longer raised by the hardware.
Signed-off-by: Axel Utech <utech@sofiha.de>
When GPIO works with IOPCTL, the PIO instance offset in IOPCTL
can't be calculated easily. It should be recorded in DTS based on
SOC integration.
When IOPCTL is used, add PIO reigster address in DTS, gpio_mcux
driver will configure the PIO register based on this address.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections
Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Update the command `sdp-find` to support attribute parsing helper.
If the argument count is 1, the general SDP discovery will be used
to discover the protocol `L2CAP`.
In the SDP record discovered callback, call attribute parsing helper
functions to parse the SDP record and SDP attributes. And print all
parsed attribute values.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.
Add function `bt_sdp_record_parse()` to parse the received SDP record.
Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.
Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.
Add function `bt_sdp_attr_value_parse()` to parse the attribute value.
Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.
Add function `bt_sdp_attr_read()` to read the value of the attribute.
Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Remove the handling of cross domain pins from nrf drivers. To use
cross domain in tests, force on constlat and disable power domains
for the test.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Remove SOF-specific region mappings. These should be handled inside of
SOF (external module), instead of Zephyr. This way, we avoid creating
a cyclic dependency between the two.
Needed for #91061.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
rimage is used in the context of Sound Open Firmware (SOF) to sign the
resulting firmware image. Since SOF is an external module, code found in
mainline Zephyr should not depend on it, but, rather, the other way
around. Therefore, drop the rimage signing support from the imx95_evk
board. This should be handled in SOF instead of Zephyr.
Needed for #91061.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Adding overlays to support gpio_api test on the kit_pse84_ai m33 and m55
cores. The test expects jumpers between P16_0 (J14_6) and P16_1
(J14_5).
Signed-off-by: John Batch <john.batch@infineon.com>
Adds basic support for the Infineon kit_pse84_ai board, including:
* samples/hello_world
* samples/basic/blinky
* tests/driver/uart/uart_api
Signed-off-by: John Batch <john.batch@infineon.com>
DUT Failed to associate fast-gtc/fast-mscahpv2 enterprise network, there
is error log shows 'EAP-FAST: Compound MAC did not match'.
tls_connection_get_eap_fast_key() gets wrong key, currently using
mbedtls_ssl_tls_prf to derive key, and it's not PSA API.
Therefore, conn->expkey_keyblock_size can't be set as 0, the correct
expkey_keyblock_size should contain keylen + mac_key_len + ivlen.
Remove MBEDTLS_USE_PSA_CRYPTO to get keyblock_size correctly.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Configure CPU clock using FDPLL, sourced from XOSC to achieve 120Mhz.
Also configure UART clock to support bootup initialization.
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
Add more functionality in clock control driver.
Implement bootup clock initialization, async on and set_rate API.
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
Add more functionality in clock control driver.
Add bindings for dfll, fdpll, gclk generator, mclk cpu, osc32k, rtc clock
and xosc.
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
Drop usage of `pcfg` and `pdata` in favor of unified `cfg`
for common configuration and `port_cfg`, `port_data` for
port-specific configurations.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Add the port_count field to the configuration structure
and allocate different sizes for the ports array based
on whether the node is HP or ULP.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Add reboot support in shell for FRDM-IMX91.
Compile commands:
west build -p always -b frdm_imx93/mimx9352/a55 \
samples/subsys/shell/shell_module
Signed-off-by: Hongbo Wang <hongbo.wang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Enable TPM2 counter support on FRDM_IMX93 board.
Compile commands:
west build -p always -b frdm_imx93/mimx9352/a55 \
tests/drivers/counter/counter_basic_api/
Signed-off-by: Hongbo Wang <hongbo.wang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add i.MX 943 EVK support for counter_basic_api test application.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Update the yaml files of i.MX 943 CA55 for adding TPM counter
to the support list.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add board support for EK_RA6M5, EK_RA6M4 i2c test use sci_i2c:
- tests/drivers/i2c/i2c_api
Example for i2c use sci_i2c:
west build -b ek_ra6m5 tests/drivers/i2c/i2c_api/ -p always \
-DDTC_OVERLAY_FILE=boards/ek_ra6m5_sci_i2c.overlay \
-DCONF_FILE="boards/ek_ra6m5_sci_i2c.conf"
Signed-off-by: Khai Cao <khai.cao.xh@renesas.com>
logging.log_user test requires 3 free MPU regions, however MAX32657 only
has 2 free MPU regions available after boot. Skip this test on
MAX32657EVKIT since it does not meet this requirement.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
If the other examples are not sufficient, put the problematic in the
angle of the impact of using two different components has on application,
which seems to me as a simple rule of thumb.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
CSI feaure switch to use static library.
A.Binary blob origin:
https://github.com/NXP/wifi_nb_fw/raw/nxp-v4.2.2/
B.Type of blob (precompiled library, firmware image):
Precompiled library
C.Zephyr module that the blob(s) will be referenced from:
wifi_nxp
D.Brief description of what the blob(s) do:
Implemented an algorithm for processing CSI information
E.What other components do the blob(s) depend on, if any?
Does not depend on any component
F.License the blob(s) are distributed under:
LA_OPT_NXP_Software_License
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Adding files to allow running the following tests for the Infineon
AutAnalog SAR ADC driver on the PSOC Edge family of MCUs:
* tests/drivers/adc/adc_api
* tests/drivers/adc/adc_error_cases
Signed-off-by: John Batch <john.batch@infineon.com>
Adding files to allow running the following samples for the Infineon
AutAnalog SAR ADC driver on the PSOC Edge family of MCUs:
* samples/drivers/adc_dt
* samples/drivers/adc_sequence
Signed-off-by: John Batch <john.batch@infineon.com>
Changes initialization to use a function from hal_infineon. This
initialization function will initialize the AutAnalog system if needed
as well as the SystemInit.
Signed-off-by: John Batch <john.batch@infineon.com>
*Adds AutAnalog related files to the cmakeu list and adding KConfig
definitions for AutAnalog and AutAnalog SAR ADC.
*Updates hal_infineon in west manifest.
*Updates infineon_kconfig.h to prevent multiple declarations of defines.
Signed-off-by: John Batch <john.batch@infineon.com>
*Separates AutAnalog and AutAnalog ADC in device tree.
*Makes AutAnalog SAR ADC a child of the AutAnalog system to reflect
hardware architecture.
*Adds binding file for AutAnalog SAR ADC driver.
Signed-off-by: John Batch <john.batch@infineon.com>
The product photo is from
https://learn.adafruit.com/assets/124731 and has the
license CC BY-SA 3.0.
Tested with the command in the index.rst file. Compile testing of
the overlay file is done via the samples/drivers/dac sample.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Add a new 'west bindesc extract' subcommand that dumps all binary
descriptors into a separate binary file. It will also report the range
(offset and length) of the dumped data within the original image.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch fixes an issue in the SPI driver that caused the chip select
line to remain low after a transaction completed (when using a GPIO and
operating in non-interrupt mode).
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Code was using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC value.
System can have non constant value for cycle counter when
this constant is not valid.
Now code calls sys_clock_hw_cycles_per_sec() that will expand
to CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC (as before) when needed.
It only impacts systems that can change hw cycles per second
at runtime (due to calibration or some other clock change).
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This patch enable TPM on frdm_mxw71 and mimxrt1180_evk/cm33
This patch covers following test cases:
- test_all_channels
- test_multiple_alarms
- test_set_top_value_with_alarm
- test_single_shot_alarm_notop
- test_single_shot_alarm_top
- test_valid_function_without_alarm
- test_set_top_value_without_alarm
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
1.Include barrier.h to fix barrier_dsync_fence_full() not found issue
2.Support multiple channels for alarm function
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add bindings for the power related modules. Use the bindings
Kconfig to pull in SDK drivers for cmc, spc, vbat and wuu.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Replace overlay for stm32h573i_dk with new board variant designed to
run in external flash. Keep stm32h573i_dk as it also can run mcuboot.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Restore old internal flash layout as default and make app in external
flash a new board variant
Switch mcuboot to use swap mode and remove the no longer required
scratch partitions from the internal and external flash layout.
Introduce a 'soc-nv-flash' node in the stm32h573i_dk board DTS file
to define the external flash memory parameters used for MCUBoot
integration. This way BOOT_MAX_IMG_SECTORS_AUTO can be used to
automatically calculate the maximum number of image sectors based
on the actual external flash configuration.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use the zephyr,flash-controller node and the respective compatible
'st,stm32-xspi-nor' to detect if the device is running from external
flash, instead of assuming that the parent node of the flash is the
SPI controller. This fixes an issue when soc-nv-flash is used as the
zephyr,flash node.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
This PR aligns all the bindings types for Nexus nodes.
Now all are the same as ./zephyr/dts/bindings/pwm/pwm-nexus.yaml
Signed-off-by: Kyle Bonnici <kyle.bonnici@nordicsemi.no>
Add driver for HUB12 interface monochrome LED matrix displays.
Features:
- 32x16 pixel resolution, 1-bit monochrome (PIXEL_FORMAT_MONO01)
- SPI-based data transfer with shift registers
- Configurable brightness control
- Thread-safe framebuffer access with semaphore
The driver implements the standard Zephyr display API
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Add device tree binding for HUB12 interface monochrome LED matrix
displays (32x16 pixels).
The HUB12 interface uses SPI for data transfer to shift registers,
with additional GPIO pins for row address selection (PA, PB),
output enable (PE), and data latching (PLAT).
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Replace all in-function instances of MIN/MAX/CLAMP with the single
evaluation version min/max/clamp.
There's probably no race conditions in these files, but the single
evaluation ones save a couple of instructions each so they should save
few code bytes and potentially perform better, so they should be
preferred in general.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In the lib/notify test, the callback function pointer should be cast
to the proper type when calling it. This fixes a warning found when
using the arcmwdt toolchain.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The 802.15.4 PHY has the poll optimization enabled by default.
Disable it until the driver state machine is updated.
Signed-off-by: George Stefan <george.stefan@nxp.com>
mcxw72 shared memory placement has been changed with MCUXSDK 25.09
update.
Moving the shared memory declaration to mcxw71 and mcxw72 specific dts
since the placement is now different.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
- Updated shield overlay file for RT1060 with sdio power and reset pins
- added device tree node in sdhc for sd reset pin
- added power gpio toggle logic
Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
Updated config file to optimize memory by configuring net related settings
and thread priority settings
Signed-off-by: Sanjay Yadav <sanjay.yadav@nxp.com>
Honor the CONFIG_VIDEO_BUFFER_POOL_ALIGN config by using the
video_buffer_aligned_alloc function instead of video_buffer_alloc
in order to provide properly aligned buffers to drivers.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Some devices allow for downscale / upscale via the set_selection
compose API. When using it, it is necessary to perform a
set_selection of the compose target prior to setting the format.
In order to allow non-compose aware application to benefit from
it, introduce a helper which take care of setting the compose
prior to setting the format.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Currently the DCMIPP driver rely on a Kconfig in order to
select the right sensor resolution / format to pick.
This also makes the exposure of caps easier since it can
be exposed as:
DUMP pipe: same caps as mentioned in Kconfig
MAIN pipe: any format supported on this pipe and resolution
starting at sensor selected resolution down to
64 times smaller (which is the maximum of the
downscale)
AUX pipe: same as MAIN except without the semi-planar and
planar formats
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add missing div-p division factor for pll clock and
respective tests in test/clock_control/stm32_clock_configuration
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Add support for device runtime power management.
Suspending the device will place it into sleep mode, its lowest
power state.
All config will be lost when suspending the device.
Do not allow suspending the device if it is started or has
RX filters registered.
The application has to reconfigure the CAN device to resume
expected operation.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Enhance the `size_report` script to correctly categorize static C++
variables in the memory report.
Static C++ variables are currently listed under the "No paths"
category in the size report. This occurs because the script's
address-based mapping logic is designed for functions, which
occupy an address range, but fails to handle variables that
have only a single memory address.
This commit improves the `do_address_range_matching` function
to handle single-address mappings. The updated logic now correctly
identifies and assigns static C++ variables to their corresponding
source file paths in the report tree, providing a more accurate and
comprehensive memory footprint analysis for C++ applications.
This enhancement ensures that all symbols, regardless of their
linkage or type, are correctly placed in the report, providing a
more accurate overview of memory usage.
Signed-off-by: Nilesh Vyas <nileshvyas1112@gmail.com>
- in order to test the loopback from PDM to I2S on the mcx_n5xx_evk
it is necessary to add the dts nodes for SAI1 and MICFIL channels
- note that the configuration is using the newly introduced stream
parameters (bytes_per_sample, sample_width, extra_blocks)
- add mcx_n5xx_evk/mcxn547/cpu0 to sample.yaml in order to allow this
platform to be part of the CI tests
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
- format mcx_nx4x_evk board.c which is not formatted according to the
coding standards
- improve code readability and maintainability
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
- in order to enable micfil on the mcx_n5xx board, it is necessary to
enable the appropriate clock in the board.c
- create the proper pin_mux for micfil and da7212 codec and i2c which is
used to communicate with the codec to enable micfil and da7212 codec
in the mcx_n5xx dts
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
Silabs siwx91x offer two DMA hardware block: GPDMA and UDMA.
While UDMA has some benefit when running in low power modes, GPDMA offer
better performances. So GDMA is probably better suited for SPI device.
Ideally, we would like to leave the ability to switch back to UDMA.
Unfortunately, UDMA and GPDMA are not configured in the same way:
- the maximum length of the block are different (1024 or 2048 for UDMA
and 4096 for GPDMA)
- the burst length is different
So, we only support GPDMA.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Since various macros don't end with a colon, the code formatters give bad
results. Let's fix that.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The siwx91x platform provides two DMA block: UDMA and GPDMA. GPDMA require
the dma_slot attribute.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
GPDMA hardware block has some requirement regarding the buffers alignments.
Note the previous condition was too permissive. It ignored
source_burst_length during the check of the transaction size.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add coexistance support when enabling IEEE802.15.4 with another
radio device (BT or Wi-Fi), for ESP32-H2 and ESP32-C6.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Fixes local ISR generation so that devices actually boot, also
allows enabling LTO for these builds (tested working on nrf54l15
flpr device)
Signed-off-by: Jamie McCrae <spam@helper3000.net>
currently adi_tmc5xxx_common.h and adi_tmc_reg.h are placed
directly in the adi_tmc folder, however placing them in a
common folder and adding to the include directories results
in the drivers not having to include these files using relative
paths.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This implements a few improvements to make Kconfig search results more
relevant:
- A match in a symbol's name is given more weight than a match in its
prompt.
- Field-length normalization is applied so that the shorter the field,
the higher its relevance (e.g. searching for "sensor" will basically
yield CONFIG_SENSOR as the top result as the query basically matches
100% of the symbol's name.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Set the environment:os tag to the return value of platform.system(),
which is more useful than os.name() which always returns "posix".
Signed-off-by: Keith Short <keithshort@google.com>
Let's move the null pointer trap first so to give set_pmp_entry() the
opportunity to use a single-slot TOR entry.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Remove false Z_TEST_SKIP_IFNDEF(CONFIG_CAN_MANUAL_RECOVERY_MODE) from the
CAN shell test suite.
The cmd_can_recover() shell function must always be tested and
CONFIG_CAN_MANUAL_RECOVERY_MODE is enabled in the test suite
prj.conf.
The test suite already relies on the capabilities of the CAN controller
driver for determining how to validate the API contract.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Remove false Z_TEST_SKIP_IFNDEF(CONFIG_CAN_MANUAL_RECOVERY_MODE) from the
CAN classic test suite.
The can_recover() API function must always be tested and
CONFIG_CAN_MANUAL_RECOVERY_MODE is enabled in the test suite prj.conf.
The test suite already relies on the capabilities of the CAN controller
driver for determining how to validate the API contract.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Input and output descriptors are writable storage for VCP parameters
and shall be valid for use duration. This fix usage of variables being
used outside of their declaration scope.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This image was an avif file with a webp extension, which can cause
warnings when building docs.
Replace with webp version, with transparent background as a bonus.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
After #94079, CONFIG_COVERAGE_DUMP is enabled even if CONFIG_COVERAGE is
not set. As a result CONFIG_ZTEST_NO_YIELD is disabled which has some
implications on other tests.
Coverage dump method is necessary only if coverage is collected on
hardware, which is enabled by CONFIG_COVERAGE_GCOV. Let's specify
default dump method, only if CONFIG_COVERAGE_GCOV is set.
Fixes: #94079
Signed-off-by: Patryk Duda <patrykd@google.com>
Align with native_simulator's upstream main
95f560a2140aacb03a74b8c933f3b27a59c56d50
Which includes:
95f560a: nct: fix possible redefinition of GNU_SOURCE
Signed-off-by: Andreas Kurz <info@akurz.net>
Replace a #ifndef directive with a if(!IS_ENABLED()) instrcution
in transceive() function. This change makes later integration of RTIO
support in this function smoother, polluting a bit less this function
with #if based directives.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Fix a missing braces pair around a conditioned instruction in
STM32 SPI driver. Fix that by aggregating the 2 if() instructions
into a single ANDed one.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct some indentation issues, a few useless line escapes,
double space characters or parentheses pair in STM32 SPI driver.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove bits2byte() helper function than was not always used. Replace it
with a division by BITS_PER_BYTE that is explicit enough.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Reorder inclusions of header files to clarify and simplify later changes.
By the way, remove #ifdef CONFIG_SPI_STM32_DMA condition to include
DMA header files as its not required.
Keep zephyr/log.h with use of LOG_MODULE_REGISTER() first since included
local spi_context.h depends on log resources to be defined.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove inclusion of zephyr_arch/cache.h header file from STM32 SPI
driver. This header file is included by zephyr/cache.h if applicable
(e.g. CONFIG_ARCH_CACHE is enabled) and should not be used when
CONFIG_EXTERNAL_CACHE is enabled.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The nrf54h20 needs a slightly increased latency limit as the latency
is around 650us at 8MHz, which is right above the current limit of
648us (CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING=12).
Increase CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING to 15 to match
cpuppr_xip and match the observed latency.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The nRF54H20s power domains use NRFS, which uses the irq vectors used
for this test suite. Disable power domains to not conflict with the
test suite.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Clocks are requested automatically by hardware on the nRF54H.
Remove additional handling from device drivers, and disable
the now unmanaged clocks in the devicetree.
Updates:
- can_nrf
- counter_nrfx_timer
- uart_nrfx_uarte
- spi_nrfx_spim
- spi_nrfx_spis
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Devices which use AIN (COMP, LPCOMP, SAADC) don't use pinctrl to
configure their pins, thus pinctrl can't manage pin retention like
is done for other devices. Thus for now, add manually disabling
pin retention to the drivers.
In the future, we should probably use pinctrl for these inputs
as well, at which point this commit can be reverted.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Replace the pad group integration with directly setting/clearing
pin retention for output pins if required, since the pad group
integration is redundant if the quirky cross domain feature is
managed by the application.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
GPIO pad power domain management is not neccesary if the quirky
cross domain feature is handled at the application level. Replace it
with directly setting/clearing pin retention, as hardware will force
power domains on automatically.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The gpio pad groups are redundant if pin retention is handled per
pin, and the quirky cross domain feature is managed by the
application. Remove it entirely.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
All devices used in their "normal"/intended configuration do not
require management of the power domains, as the hardware itself will
request them automatically. Thus by default, don't specify the
power domains to avoid redundant resume/suspend cycles, which are
slow and require threading (IPC) making devices not isr ok.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Tests cases which needs to apply a single overlay file for testing
should not use snippets.
Cleanup the test case by reordering the snippet to be SoC specific and
adjust overlay selection using FILE_SUFFIX.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes a regression introduced in commit ef6aad9ca6 where the flash
node was incorrectly set to code_partition, causing FLASH_BASE_ADDRESS
to default to 0x0 and making the device unprogrammable.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
When loading from `.elf` files, it is not guaranteed that section
headers are word aligned with the `.elf` file. Attempting to perform
a direct assignment results in the compiler assuming the input pointer
is aligned, resulting in usage faults if the assumption is broken.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This local pointer assignment does nothing and readers may get a wrong
interpretation of the intention of the function.
Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
Return an error if trying to send data using a suspended UART,
instead of blocking, possibly forever, for a transmission that will never
succeed.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
Add console harness and a dedicated regex word for test validation
on STM32 platforms compatible with HAL_API_V2.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Ensure the device is added to the list only if the ENEC I3C
transaction succeeds.
Adding the device before enabling IBI may cause IBI retry failures
due to the device already being present in the list.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Zephyr's long term goal for crypto support is to use only PSA API. This
commit replaces usages of MD with proper PSA API for HMAC.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Moving from legacy Mbed TLS crypto to PSA API would cause mps2/an385
platform to fail due to stack overflow. This commit increases
the stack size to solve this problem.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
With the long term goal to transition all crypto support toward PSA API,
this commit deprecates CONFIG_JWT_SIGN_RSA_LEGACY.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Initial DMA support. DMA supports implementation of SSI IP but using vendor
specific DMA in the wrapper. The setup of the DMA is done in
mspi_dw_vendor_specific.h.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
MSPI slave mode is selected through devicetree using the
op-mode property. Mode selected by SSIISMST bit in the
CTRLR0 register. EXMIF can only be Master (controller).
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Handling of asynchronous transfers uses the system workqueue,
hence they are not available when multithreading is disabled.
Also add missing dependency on multithreading in the
MSPI_DW_HANDLE_FIFOS_IN_SYSTEM_WORKQUEUE Kconfig option.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
enum mspi_op_mode in mspi.h has different syntax to this binding.
Aligning these will allow for cleaner code in the implmented drivers.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
This is a new callback option that drivers can use for when a request
or xfer has timed out. E.g if an Async RX request never received
anything, this callback can be used so a user can clean up their
application.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
The nrf-qspi-v2 peripheral is similar to EXMIF on nrf54h20
but supports DMA and slave-mode. The wrapper around
the SSI IP is also different with DMA features.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Add code comments explaining the handling of short prepare
that can be enqueued out of order and present in use of FIFO
for prepare pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Verifies that the throttling is working for boards that enable
CONFIG_SOC_FLASH_NRF_THROTTLING
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
In the case of a CIG having multiple CIS, and all CIS has been
requested to being disconnected (i.e. they all enter the
BT_ISO_STATE_DISCONNECTING state), then when the first disconnect
complete is handled in bt_iso_chan_disconnected, then the
cig->state was prematurely set to BT_ISO_CIG_STATE_INACTIVE.
This meant that if the application called bt_iso_cig_terminate
when the 2nd CIS entered bt_iso_chan_disconnected and called
chan->ops->disconnected(chan, reason) then the CIG would be
removed. When the CIS then entered bt_iso_cleanup_acl, it
would access removed data from cleanup_cig.
Change bt_iso_chan_disconnected to not allow the termination
of the CIG until all CIS have entered the BT_ISO_STATE_DISCONNECTED
state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add SMBus Block Write-Block Read Process Call API for STM32.
This implementation also supports PEC mode (packet error checking) and is
dependent on PEC support already being supported in-tree.
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This reduced the amount of duplicate code and unifies the code
with other platforms.
With this change the caller and callee status registers are
stored separately. Also, a different set of status registers
are stored:
- FPSCR instead of FPDSCR. FPDSCR contains the default values
to be assigned to FPSCR when a new floating-point context
is created. It therefore seems more correct to store the
FPSCR.
- FPCCR and FPCAR are no longer stored.
FPU retention was originally added in:
8a5365c26c.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This reduced the amount of duplicate code and unifies the code
with other platforms.
With this change fewer registers are stored and restored.
See also comment in scb.h for scb_context stating that
only essential registers are stored and restored.
No longer stored:
- ICSR
- SCR
- CFSR
- HFSR
- DFSR
- MMFAR
- BFAR
- AFSR
No longer used:
- SHPR[3..12]. This backup register was declared in the wrong way.
In core_cm33.h and core_cm4.h this is declared as an array of
12 uint8_t's. That is 3 uint32_t's.
Orignal SCB retention was added in
2055f7d595.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This reduced the amount of duplicate code and unifies the code
with other platforms.
MPU retention was originally added in
ee9d23945f.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Enable openamp sample for imx943 evk.
Default configuration in openamp sample(as master):
m33 as master, m7_1 as remote.
m7_0 as master, m33 as remote.
m7_1 as master, m33 as remote.
Default configuration in openamp/remote sample(as remote):
m7_1 as master, m33 as remote.
m33 as master, m7_0 as remote.
m33 as master, m7_1 as remote.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Enable ipc static vrings sample for imx943 evk.
Default configuration in static_vrings sample(as master):
m33 as master, m7_1 as remote.
m7_0 as master, m33 as remote.
m7_1 as master, m33 as remote.
Default configuration in static_vrings/remote sample(as remote):
m7_1 as master, m33 as remote.
m33 as master, m7_0 as remote.
m33 as master, m7_1 as remote.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Enable mbox_data sample for imx943 evk.
Default configuration in mbox_data sample(as master):
m33 as master, m7_1 as remote.
m7_0 as master, m33 as remote.
m7_1 as master, m33 as remote.
Default configuration in mbox_data/remote sample(as remote):
m7_1 as master, m33 as remote.
m33 as master, m7_0 as remote.
m33 as master, m7_1 as remote.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Enable mbox sample for imx943 evk.
Default configuration in mbox sample(as master):
m33 as master, m7_1 as remote.
m7_0 as master, m33 as remote.
m7_1 as master, m33 as remote.
Default configuration in mbox/remote sample(as remote):
m7_1 as master, m33 as remote.
m33 as master, m7_0 as remote.
m33 as master, m7_1 as remote.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Support only power-of-two disk sector sizes to enable significant
throughput improvements:
* SCSI data zero-copy
* allow queuing multi-packet transfers
Previously large SCSI buffers did not improve performance. With this
change, larger SCSI buffer allows scheduling bigger USB transfers which
reduces overhead.
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add USB UVC device's new uvc_add_format() function to the release note,
and document the semantic changes of UVC APIs in the migration guide.
Signed-off-by: Josuah Demangeon <me@josuah.net>
The UVC class now lets the application select the format list sent to the
host. Leverage this in the sample to filter out any format that is not
expected to work (buffer too big, rarely supported formats).
Signed-off-by: Josuah Demangeon <me@josuah.net>
The UVC class was deciding itself which formats were sent to the host.
Remove this logic out of the UVC class and introduce uvc_add_format() to
give the application the freedom of which format to list.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Make use of the recently merged fmt->size to know the maximum size of the
frame to be allocated, which works for both compressed and uncompressed
video.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When running out of descriptor, return an error instead of ignoring it.
The application need to make sure to adjust the Kconfig macros to have
enough descriptors for all formats to add.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Enable OUTPUT_DISASSEMBLY_WITH_SOURCE when using LTO to help
find the assertion check in the source code corresponding to
the faulting instruction address.
arm-none-eabi-addr2line tool is not able to resolve the
source file and line number when using LTO.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Make overlay-all-bt_ll_sw_split configs consistent with the
one used in hci_ipc for nRF5340 SoC.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Reduce Controller assertion check code size for ARM Cortex-M
CPUs by using the undefined instruction exception.
`arm-none-eabi-addr2line` commandline can be used to get the
source file and line number.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce development and fatal assertion classification
in the Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce a board variant for storing an app in external QSPI NOR Flash
and chainloading it with MCUboot (placed in internal Flash) to be executed
in place (uses MCUboot's swap-using-offset mode, set via Sysbuild).
The new variant requires on MCUboot app side: a board/SoC DT overlay to
set the internal Flash & Flash controller as the chosen 'zephyr,flash' &
'zephyr,flash-controller', and CONFIG_STM32_MEMMAP=y (this was upstreamed
to MCUboot.)
Change external Flash memory attribute "zephyr,memory-attr" to
DT_MEM_ARM_MPU_FLASH, since ATTR_MPU_IO (corresponds to
"DEVICE_NON_SHAREABLE & P_RW_U_NA") is actually for memory-mapped devices
(with registers...) and was causing access issues with apps like LVGL that
would freeze the target. Also, change the size of the external flash
"zephyr,memory-region" node, since we only need to define accesss rights
to the memory space actually used by the external flash chips, not the
total addresssable QSPI memory.
The 2nd QSPI NOR contoller node was removed, since it does not reflect the
actual hardware layout, that has only one controller and the 2 NOR flash
chips are connected to it in parallel with a shift register.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Legacy crypto support is going to be removed in the next Mbed TLS release
(which will be named TF-PSA-Crypto for the crypto support) so this
commit transitions UUID library from legacy crypto to PSA API.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since the sample build is oversized for the RA8P1 CM85,
I’ve realigned the code MRAM size for both cores (CM85 and CM33)
to allow the CM85 build to run the sample successfully
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
This commit adds testing support for dma driver on ek_ra8m2:
- tests/drivers/dma/chan_blen_transfer
- tests/drivers/dma/loop_transfer
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for i2s test app on Renesas RA ek_ra8m2:
- tests/drivers/i2s/i2s_api
- tests/drivers/i2s/i2s_speed
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Tests for validating the robustness of the interface between the controller
and the flash chip using pattern-based testing.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Use proper settings of clock, data bus width for sama7g54.
Update queue number checking and the macro definition in header file.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add property for selecting the source for GMAC Reference Clock to dts
bindings yaml file.
Choose the source for the GMAC Reference Clock by GMAC_UR register.
Signed-off-by: Tony Han <tony.han@microchip.com>
Replace cache coherence functions:
- SCB_InvalidateDCache_by_Addr() to sys_cache_data_invd_range()
- SCB_CleanDCache_by_Addr() to sys_cache_data_flush_range()
Signed-off-by: Tony Han <tony.han@microchip.com>
Add Himax HM01B0 camera sensor driver.
It depends on I2C and it is required to configure the camera.
Signed-off-by: Antonino Scarpaci <antonino.scarpaci@gmail.com>
Add build test coverage for the TM1637 auxdisplay driver.
Creates gpio_devices.overlay for GPIO-based auxdisplay devices
and adds corresponding test case to verify the driver builds
correctly on native_sim platforms.
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Add a new auxdisplay driver for TM1637 7-segment LED displays.
The driver supports:
- 4-digit 7-segment display output
- Decimal point positioning
- Brightness control (0-7 levels)
- Display on/off control
- All digits (0-9)
- Basic cursor positioning
The driver implements the standard AUXDISPLAY API
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Add device tree binding for TitanMicro TM1637 7-segment LED
display controller. The TM1637 uses a GPIO bit-banging protocol
with clock and data pins.
Properties:
- clk-gpios: Clock GPIO pin
- dio-gpios: Data I/O GPIO pin
- bit-delay-us: Bit delay for GPIO protocol timing
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Use the peers asychronous control character map to only escape
characters that need to be, instead of always escaping bytes 0 to 31.
For data packets with values randomly distributed, this results in 11%
fewer bytes needing to be transmitted over the link, if no bytes need to
be escaped (256+2)/(256+2+32).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Accept the `ASYNC_CTRL_CHAR_MAP` option in configuration messages from
the peer. The map is reset to the default value each time the interface
comes up.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Expose the currently configured value for the PPP peers Asynchronous
Control Character Map through a public function.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Correct the input section define for the device reset configuration
setting when enabling the CMake Linker Generator, which cause a build
failed when using the IAR build tool.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
When enabling the DTC (Data Transfer Controller) for the I2S SSIE driver
on Renesas RA8x2 boards, a redundant condition check prevented the
interrupt service routines from entering during data transfer. This
caused the transfer to fail when DTC was active.
This commit removes the unnecessary condition check, allowing the DTC to
operate correctly with I2S SSIE transfers on RA8x2 devices.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
When performing polling-based data transfer without enabling interrupts,
the current implementation stops transferring as soon as either the TX or
RX buffer becomes NULL. This causes the transfer to stop prematurely,
even if the other direction still has data to send or receive.
This commit fixes the condition so that data transfer continues
as long as one direction (TX or RX) still has data remaining.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
This commit adds testing support for dma driver on ek_ra8d2:
- tests/drivers/dma/chan_blen_transfer
- tests/drivers/dma/loop_transfer
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for i2s tests app on Renesas RA ek_ra8d2:
- tests/drivers/i2s/i2s_api
- tests/drivers/i2s/i2s_speed
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for test apps on Renesas ek_ra8d2:
- tests/drivers/pwm/pwm_api
- tests/drivers/pwm/pwm_loopback
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
- Add support Renesas r7ka8d2kflcac SoC.
- Move sdram-controller node from r7ka8p1kflcac.dtsi to ra8x2.dtsi
since this device node is available for all RA8x2 SoCs
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Fix the GPIO port "ngpios" for RA8x2 series SoCs to match
the values specified in the Hardware User’s Manual (HUM).
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
This adds a link to the board catalog in the sidebar of each binding
page, directing users to boards using the compatible.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This adds the ability to filter boards in the catalog by compatible
strings. It supports wildcards so e.g. one can quickly find all boards
with an "st,lsm*" accelerometer.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There might be different UI widgets that deal with tags so make sure
that we use identifiers and selectors that are not too generic.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commits adds a `compatibles` field to each board entry in the board
catalog, similar to the `supported_features` field.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Test all attribute combinations of Vishay RGBIR color sensor VEML6046.
- Print OVERFLOW in case of saturation of sensor.
- This small program is intended to be helping when finding appropriate
attributes for an application of the sensor.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
- add driver for Vishay VEML6046 RGBIR color sensor
- add new compatible "vishay,veml6046"
- support fetch and get sensor subsystem operations
- triggered mode and interrupts are not yet supported
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Update the documentation of ESP32 related boards:
* use included sections for common parts
* fix the `References` links if applicable.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
The LPSPI and SOC hardware has some electrical timing characteristics
that need to be met in order to pass these test properly, these values
should be fine for the purpose.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The old controller based timing properties being present in boards DTS
is making it so that overlays cannot specify timing parameters of spi
devices, because the old controller properties take precedence in the
driver still. We should remove these anyways, so first step is to remove
from board level, luckily there is only these two cases.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Disable various samples because they require certain digital or
analog signals from the Arduino header, which are not connected
and therefore not defined via the connector gpio-map.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Added mikrobus_serial, mikrobus_i2c, mikrobus_spi and mikrobus_header
node labels to FRDM-RW612 device tree board definition, allowing
compatible shield boards to be used. Also extend the FlexComm SPI
pinmux to support CS0 (Arduino connector) and CS1 (MicroBus connector)
as hardware controlled CS pin.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Added arduino_spi label to FRDM-RW612 device tree board definition,
allowing compatible shield boards to be used. Also extend the board
YAML file with related support tags arduino_gpio, arduino_i2c and
arduino_spi.
Signed-off-by: Stephan Linz <linz@li-pro.net>
The Python version installed with winget defaults to 3.8, make a more
recent version the default.
Also add a note on the execution policy for activating the Python virtual
environment.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- Removal of double enum (by me) caused wrong later enum entries
- See commit 36abe5efec
- Added the second power down state (but with different name)
-> This restores the old function but still fixes the double enum issue
- The second power down state equals a different valid value
in the mode register. Documentation does not state if they
are equal but it is likely that they only differ in readback value.
-> With this change all possible register values are mapped
-> The power down state values are 0b000 and 0b100
Signed-off-by: Martin Koehler <koehler@metratec.com>
One-shot reads through Read-Decode API matches functionality
from Fetch-Get API, but asynchronously.
Streaming mode supporting FIFO Watermark Interrupts. Works for both
Gyro and Accel drivers.
These changes are covered under the build-all test for sensor async
api.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
adds the `zephyr,memory-attr` property to the SRAM1 and SRAM2
memory nodes to explicitly define their MPU attributes as normal
RAM. This ensures proper memory protection and caching behavior
when these regions are used by the kernel or application.
Resolve a Data Access Violation encountered during
test, where the faulting address was 0x30000000.
Note: add the zephyr,memory-attr property in the board overlay for SRAM2
to avoid conflict with the support of h7rs ethernet with MPU regions
enabled.
see link below for more details :
https://github.com/zephyrproject-rtos/zephyr/pull/97364/files#r2439668915
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
enables the AHB2 peripheral clocks for SRAM1 and SRAM2
on STM32H7RSX series using LL_AHB2_GRP1_EnableClock.
These clocks are required to access the corresponding SRAM regions
during runtime.
Fixes potential access faults when using SRAM1 and SRAM2.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Use the zephyr:board-supported-hw directive for the documentation
of every imx7-based which board which didn't use it yet.
Bonus: remove redundant image from 96boards/meerkat96.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
Use the `silabs,sleeptimer` chosen node instead of a devicetree
compatible to select the devicetree node for the counter.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Use the `silabs,sleeptimer` chosen node instead of a devicetree
compatible to select the devicetree node for the RTC.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Different Series 2 devices have different RTC IPs, despite sharing
a HAL driver. Introduce separate bindings for the different IPs, and
use a chosen node to select the node to use for timekeeping.
A chosen node was selected over a nodelabel since chosen nodes can
be overridden by board-level dts and devicetree overlays, while
nodelabels can't.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Avoid mixing encoder library return code and driver return value to
fix wrong value returned by enqueue() in nominal case.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Roy Jamil <roy.jamil@ac6.fr>
Puncover v0.6.0 renamed the command-line argument
`--gcc_tools_base` to `--gcc-tools-base`.
Fixes compatibility error when running `west build -t puncover`
with puncover v0.6.0 or newer.
*Removes a reference to kit_pse84_eval from modules cmake file. These
includes aren't board specific.
*Removes reference to non-secure M33, which aren't currently supported.
Signed-off-by: John Batch <john.batch@infineon.com>
The fix in 1264a923f3 was incomplete, because
it doesn't initialize the variable. To quote from opengroup [1]:
address_len
Either a null pointer, if address is a null pointer, or a pointer to a
socklen_t object which on input specifies the length of the supplied
sockaddr structure, and on output specifies the length of the stored
address.
This caused the returned address to be incomplete, because it got truncated
depending on what addrlen_local got initialized with implicitly. This broke
talking to discovered MQTT-SN gateways.
I intend to implement integration tests for the MQTT-SN UDP transport to
prevent such issues in future, but that will be done in a separate PR.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/recvfrom.html
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Apply `:file:` markup to file names in the "Files generated by the script"
section under "Implementation Details" to improve clarity and readability.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Add the newly added Canis Labs CANPico shield to the CAN area, similar to
other CAN shields.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
C standards prior to C23 do not allow variable declarations immediately
after labels. Wrap such declarations in blocks to eliminate build
warnings.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Add support for shields based on the Microchip MCP251xFD CAN Bus
controllers, along with the Canis Automotive Labs CANPico shield
for the Raspberry Pi Pico.
Updated to focus on only the CANPico shield.
Use alternate image for shield.
Corrected image file extension.
Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
The "gpio-hog;" devicetree property configuring the "power enable" pin at
boot was not working, due to being placed on a gpio-nexus. This is not
supported and lead the gpio-hog inactive. Instead, let the board specify
their CSI_IO0 and CSI_IO1 pin as GPIO hogs with status = "disabled",
letting shields enable them and set the direction as needed.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add an instance for DCMIPP as well as devicetree definitions to allow
plugging Raspberry Pi 22 pins or 15 pins shields via the csi_* devicetree
labels.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
- Add DTS for MAX32664C
- Add driver for MAX32664C
- Add example for MAX32664C Heart rate measurement with Bluetooth
- Add private attributes and channels for health measurement
Closes: #93473
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
- Generate a full devices device tree file
- Use specific_part.dtsi + full_devices.dtsi way to
desribe all devices
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- create 'mcxe' as family and 'mcxe31x' as series
- add pinctrl_soc.h
- add soc.c/.h to do some soc level initialization
- add ecc initialization in mcxe31x_soc_initialization.S
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- adapt for mcxe31x series
- due to some bit defined in header files
add some conditional macro to separate
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- add clock_init function to initialize clock sources according
devicetree settings
- finish basic clock api function
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add a test case that verifies Kconfig value origin traces are correctly
generated in both JSON and pickle formats. The test includes a sample
Kconfig configuration with dependencies, selections, and choices to
cover various scenarios. A validation script checks the generated source
origin data against expected values.
In addition, the 'traceconfig' target is called to test the generation
of the Markdown file with the Kconfig trace report.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The new 'traceconfig' target generates a Markdown file listing all
configuration symbols, their values, and where those values originated
(user assignment, default, selection, implication, or unset).
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Collect and save trace data for all symbols in the merged configuration.
This includes information about where each symbol was defined or
assigned, which can be useful for debugging complex Kconfig setups.
The trace data includes the following information for each symbol:
- Name
- Visibility
- Type
- Value
- Kind and location of value origin (as defined in kconfiglib)
The trace data is saved for later use in two formats: a binary pickle
file and a human-readable JSON file.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Track information about what caused a value to be set in the 'origin'
property of Symbol. 'imply' and 'select' dependencies do not have a
location associated with them, so in those cases the location is
a string representation of the dependency expression. For defaults and
user values, the location in the Kconfig file is stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Store the location (filename and line number) where a 'select', 'imply',
'range' or 'default' was added to a Symbol or Choice.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The 'user_loc' stores the location (filename and line number) where a
symbol or choice was last set via a direct user selection.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Replace filename and linenr parameters to _warn() with a single loc
element, which is a constant (filename, linenr) tuple that can be more
efficiently passed and stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Replace 'filename' and 'linenr' usages with a single 'loc' attribute,
which is a (filename, linenr) tuple. This simplifies code dealing with
locations, and makes it explicitly constant. The original attributes are
now provided via properties for compatibility.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add shell command for testing BR/EDR power mode control. Supports
entering sniff mode with configurable parameters (min/max interval,
attempt, timeout) and exiting back to active mode. Provides real-time
feedback on mode change requests and status.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Implement mode change event handling and callback notification for
BR/EDR power mode transitions. Adds br_mode_changed callback to
notify applications when connection switches between active and
sniff modes. Handles HCI mode change events and propagates mode
and interval information to registered callbacks.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Implement BR/EDR power mode control with sniff mode functionality.
Adds APIs bt_conn_br_enter_sniff_mode() and bt_conn_br_exit_sniff_mode()
to manage power saving modes. Includes parameter validation and HCI
command handling for sniff mode configuration with min/max intervals,
attempt count, and timeout parameters.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Enable nxp micfil sample with 'CONFIG_USE_DMIC=y',
you can hear the voice played from the on-board micphone.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Enable MICFIL on frdm_mcxn236 board.
2. MICFIL CLOCK and DATA Pins are conflict with
flexcomm0_lpuart pins, so change flexcomm0_lpuart
pins to 'FC0_P2_PIO0_6' and 'FC0_P3_PIO0_7'.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Added pinctrl and dts nodes for uSDHC1 and uSDHC2, they are disabled
by default, and provided overlay files to enable them if needed.
Signed-off-by: Lei Xu <lei.xu@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
Some drivers need header file soc.h, according to Zephyr SoC Porting Guide
soc.h must be provided for each SoC, so created an empty one.
Signed-off-by: Lei Xu <lei.xu@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
Correct #address-cells property in exti interrupt controller nodes
for STM32 SoCs that defined it to 1 whereas value 0 is more applicable
as that interrupt does not expect sub-node nor interrupt mapping.
No functional changes as the value is ignored. This change rather targets
STM32 SoCs DTSI files consistency.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Adjust the way the SKIP option worked. Before this patch, a constant
priority offset was considered "high priority" this had the effect, that
the threads assigned to work on the priority were effectively usesless.
To fix it, consider this immediate handling as a pseudo-queue and compute
the tc-thead-mapping based on the effective count (+1 if skipping is
enabled). This makes it so that all threads are usefull and the
high-priority skip-path is considered as a pseudo tc-thread.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
Support spi_loopback example for frdm_mcxw23 and mcxw23_evk boards.
Test using tests/drivers/spi/spi_loopback.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
Introduce a new API function in the sdmmc_stm32 driver that allows
applications to access the Card Specific Data (CSD) register of the
SD/MMC card. This functionality, already available in the SPI-based SD
and MMC subsystems, was previously missing from the STM32 SDMMC driver.
This enhancement enables use cases such as verifying the correct SD card
during manufacturing, ensuring that OEMs use the specified SD card, and
preventing mismatches.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
This commit refactored IPV6 and IPV4 address events. Events have been
defined independently for each installed callback.
Previously, IPV6 address event was not triggered due to a mix of IPV4
and IPV6 flags.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit improves AIL address monitoring; Associated function will be
called after OpenThread mDNS module starts platform code by
'otPlatMdnsSetListeningEnabled`.
A new flag, `mdns_socket_is_enabled` has been added to support this new
logic.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Update include of header file arm_mpu_mem_cfg.h which has been moved
to a Cortex-M/-R-agnostic include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Move the helper file arm_mpu_mem_cfg.h, which translates the values
of the Kconfig symbols CONFIG_FLASH_SIZE and CONFIG_SRAM_SIZE to size
definitions to be used during MPU setup, from a Cortex-M-specific
include directory to the Cortex-agnostic zephyr/arch/arm/mpu directory,
as:
- the contents of this header file are not dependent on the target being
an ARMv7M, only ARMv8M is excluded, but the contents are identical
for the ARMv7/8 Cortex-R MPU implementation,
- the header file zephyr/arch/arm/mpu/arm_mpu.h, included within
arm_mpu_mem_cfg.h, is also compatible with both Cortex-M and Cortex-R,
the distinction between the two implementations takes place at an
even lower level,
- several ARMv7/8 Cortex-R targets now reference this header file in their
MPU region setup (Xilinx ZynqMP, TI K3, Renode cortex_r8_virtual) while
so far referencing it in an ARMv7 Cortex-M-specific include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
DIRECT_XIP requires different images based on
the slot where there it is saved, in hawkbit we
currently have no way of telling the server that or
chosing a image to download based on it, so
make sure it is not used.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Files in that directory relate to Arduino hardware products, so it makes
sense to include them in the Arduino Platforms section.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This reverts commit 3462a489f0 that
was marked as hotfix and merged despite reservations from
ARC maintainer
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added sys_read64 and sys_write64 functions for 64-bit memory operations,
similar to sys_read32 and sys_write32.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
At high baudrate when using async api of the uart, the abort
function in not giving the right informations since we're stopping
the dma after getting the status of it. It makes the uart_async_api test
failed on high baudrate.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch correct a bug where the uart/eusart tx callback might be
triggered before the dma complete callback at high baudrate when using
async transfer.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Updates the bt shell API to use the new Kconfig option
BT_APP_PASSKEY instead of BT_FIXED_PASSKEY as this is being
deprecated.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
The BT_FIXED_PASSKEY Kconfig option is being deprecated, and is replaced
by BT_APP_PASSKEY. The reason for the deprecation is an upcoming
errata, ES-24489, which mandates that a new passkey shall be generated
for each pairing procedure.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds the BT_APP_PASSKEY Kconfig, which allows the application to provide
passkeys for pairing using the new `app_passkey()` callback.
This is an alternative to BT_FIXED_PASSKEY, which will be deprecated in
a later commit.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
The .iface_status method of the wifi_mgmt_ops API needs to be added
so that the "wifi status" command on the network shell will work.
Signed-off-by: Dave Rensberger <davidr@beechwoods.com>
Split the subgroup validation from
bt_bap_base_get_base_from_ad into a new function
base_pull_subgroup to make the function simpler and
make Sonarcloud happy.
The new function, base_pull_subgroup, is also used
in the bt_bap_base_foreach_subgroup to reduce
code duplication.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Increase default UDC DWS stack size for ESP32-S3 in order
to guarantee quirks are executed without issues.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Ensure the USB clock is enabled before initializing the
controller by invoking the pre_enable hook. This avoids
initialization failures when the HAL has not yet configured
the clock.
Adds shutdown hook to allow interrupt and clock deinit.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add support for USB on STM32WBA6x series, along with a tiny rework of how
the st,stm32u5-otghs-phy is handled to make the code more generic by
actually consuming DT information.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add missing nodes for USB feature to STM32WBA6x DTSI.
(Note: only WBA65 DTSI exists today, but USB is available in other SoCs of
the series - this should be reworked later)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add missing OTGHS_SEL macro to STM32WBA clock header. This macro applies
only to certain SoCs of STM32WBA6x series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
MCUMGR_GRP_FS_HASH_SHA256 now already selects Mbed TLS and its PSA Crypto
support if TF-M is not enabled in the build, so there is no need to do
that in test configuration files.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The long-term goal of Zephyr is to rely exclusively on PSA Crypto API for
crypto support. At the same time Mbed TLS is going to remove legacy crypto
support starting from the next relase (v4.0).
Therefore this commit removes usage of legacy Mbed TLS crypto in favor
of PSA Crypto API. Mbed TLS will still be used in case of a build where
TF-M is not enabled.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
A recent change in OpenOCD deprecates ST-Link HLA interface requiring
changes in some board OpenOCD configuration files in the Zephyr tree.
Since this deprecation, in order to support old and recent OpenOCD
tool we needed to change of debug driver interface for these boards,
potentially causing trouble to user to have a recent OpenOCD and
an old ST-Link adapter firmware. Therefore add an entry in the migration
guide to give some hints on the potential issue and how to address
it.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This change aims to address a compatibility issue with recent OpenOCD
pre-release and what is planned in OpenOCD v1.0.0 planned end of 2025.
OpenOCD commit 34ec5536c0ba ("stlink: deprecate HLA support") [1] was
merged in December 2024 after release tag 0.12.0 and before coming
release v1.0.0. It deprecates the legacy HLA driver interface (also
called transport) in favor to the generic DAP interface that is
supported by ST-Link firmware v2.1 (that is version v2j24) and later.
Since the referred commit, OpenOCD config script must source a new
config file (interface/stlink-hla.cfg) in order to select hla_swd
transport. This change breaks many ST-Link based OpenOCD config files
of Zephyr. Alternatively, already existing interface/stlink-dap.cfg
can be used together with dapdirect_swd interface to use direct DAP
interface.
To overcome the issue and support older and newer OpenOCD releases,
this change uses OpenOCD native board config script files when
available or if none, we select the dapdirect_swd transport ID that
is supported since a long time and still maintained thank to
OpenOCD native interface/stlink-dap.cfg config script file.
One may potentially face connection issues if using both a recent
OpenOCD tool and an ST-Link adapter that embeds a old ST-Link
firmware v1.x. This ST-Link firmware only supports HLA interface.
It is not shipped by ST in ST-Link adapter since 2015. This situation
however may happen with old STM32 L0/L1/L4/F4 Nucleo/Discovery
boards or with old ST-Link adapter devices. ST-Link firmware v1.0 do not
support DAP direct SWD interface. In such a case, either upgrade the
ST-Link firmware (see STM32CubeProgrammer guide), or revert the change
made here to explicitly use hla_swd transport based on stlink-hla.cfg.
Alternatively, use an older OpenOCD release which may not be desired.
Link: 34ec5536c0/ [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Adjusted GET_ARG_N and GET_ARGS_LESS_N to use UTIL_CAT instead of simple
concatenation. This allows to use a macro as the argument N instead of
only numbers.
Adjusted the unit tests to showcase this.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Fixes#97473 by:
- Marking the test as passed if the hardware executes user threads for a
while without triggering a stack corruption, instead of waiting
indefinitely.
- Adding a timeout to ensure the test exists gracefully if the issue is
not reproduced.
Also fixes a stack corruption issue on QEMU targets, caused by
insufficient stack size and revealed by the timer change.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Allow the emulator to be set to an arbitrary UTC time, instead of being
locked to reporting the current system uptime as UTC.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Provide an escape hatch from the GNSS API requirement that a device
be active to run the configuration `get` functions. This is useful in
the context of an emulator device to query how other software modules
have configured the GNSS.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add an option for the GNSS fix state reported by the emulated GNSS modem
to be manually configured by test code, instead of being hardcoded to
always achieve a fix of hardcoded parameters after 5 seconds.
Signed-off-by: Jordan Yates <jordan@embeint.com>
GATT subscription in conn_stress test was failing and stalling the test
due to lack of TX buffers. Retry mechanism added as a workaround.
Removing this workaround would make the test fail due to deadlocks,
and require allocating more buffers with CONFIG_BT_L2CAP_TX_BUF_COUNT
set to 10 as a workaround.
Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
led0 in this board is active low according to the schematic.
Tested on a XIAO-nRF54L15 and a XIAO-nRF54L15 sense.
Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
8498c39e13 seems to have introduce
an incorrect dependency which prevents the RTC timer from
been built if any of the RTC's are enabled.
It should only depend on the rtc1.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Only uart2 and uart6 were considered before, so if any other uart
was used, it wouldn't work and even worse, it would crash when
trying to access it because the RDC wasn't configured.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
As per OpenThread API documentation, it is recommended for a Border Router
to use this functionality
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Instead of using a mutually exclusive group for sysbuild/no-sysbuild
argparse arguments, use the argparse.BooleanOptionalAction to allow passing
multiple arguments, where the last one is applied.
This is consistent with for example gcc compiler flags.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- We want to reuse ext_advs when first stopped and restarted
- This ensures SID is the same
- Fixes CAP/CL/ADV/BV-03-C
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
There's a bunch of convenience macros in sys/util.h that are intended to
help out with translating array indices and determining if an element is
part of an array or not. Use those instead of custom code.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
When RISCV_ISA_EXT_A is enabled,
ATOMIC_OPERATIONS_BUILTIN automaticly enabled,
we don't need to do it at the soc level again.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Use single evaluation clamp for few input drivers. No reason not to,
make some sense for the input_kbd_matrix call since one of the arguments
is a function.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix -Wsometimes-uninitialized warning by initializing data_opt directly
from fifo_wmark_cfg->opt. At this point in the code flow, fifo_wmark_cfg
is guaranteed to be non-NULL because we can only reach this code after
fifo_full_irq is true, which requires fifo_wmark_cfg to be non-NULL.
Added an assertion to document this invariant.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added mikrobus_i2c, mikrobus_spi and mikrobus_header node labels
to FRDM-MCXN947 device tree board definition, allowing compatible
shield boards to be used. Also add new FlexComm SPI pinmux for the
LPSPI6 on LPFLEXCOMM6 and enable required GPIO3 and GPIO5.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Added arduino_serial, arduino_i2c, arduino_spi and arduino_header
node labels to FRDM-MCXN947 device tree board definition, allowing
compatible shield boards to be used. Also extend the board YAML file
with related support tags arduino_gpio, arduino_i2c, arduino_serial
and arduino_spi.
Signed-off-by: Stephan Linz <linz@li-pro.net>
When CONFIG_WIFI_NM_HOSTAPD_AP is enabled, input 'wifi reg_domain', there
is error log shows 'zephyr_get_hapd_handle_by_ifname: Unable to get hapd
hanl, Interface ml not found'. The reason is the parameter dev of
hostapd_ap_reg_domain is from STA not SAP interface. Getting the correct
SAP dev can fix this issue.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
In eb785ef, "prescaler" has been deprecated and
"prescale_glitch_filter" is used for prescale setting.
This patch removes "prescaler" parameter and use
"prescale_glitch_filter" to simplify code and fix build
error caused by "precsaler" parameter.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The z_sched_cpu_usage() function was incorrectly using _current_cpu
instead of the requested cpu_id parameter when retrieving CPU usage
statistics. This caused it to always return stats from the current CPU
rather than the specified CPU.
This bug manifested in SMP systems when k_thread_runtime_stats_all_get()
looped through all CPUs - it would get stats from the wrong CPU for
each iteration, leading to inconsistent time values. For example, in
the times() POSIX function, this caused time to appear to move backwards:
t0: utime: 59908
t1: utime: 824
The fix ensures that:
1. cpu pointer is set to &_kernel.cpus[cpu_id] (the requested CPU)
2. The check for "is this the current CPU" is correctly written as
(cpu == _current_cpu)
This fixes the portability.posix.muti_process.newlib test failure
on FVP SMP platforms where times() was reporting backwards time.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add support for 64-bit devmem operations for 64-bit devices.
Signed-off-by: Sergii Vystoropskyi <vistorop@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Make the initialisation priority of cellular modems configurable, and
move it earlier in the sequence by default to provide room for devices
to be initialised later.
The updated default value is set to one earlier than
`GNSS_INIT_PRIORITY`, as LTE modems often embed a GNSS modem, whose
driver may depend on the baseline modem driver (GNSS user pipes, etc).
Signed-off-by: Jordan Yates <jordan@embeint.com>
The Kconfig symbols for selecting HAL content should be part
of the HAL module integration, not defined by the SoC. Split the
symbols between the Series 0/1 Gecko HAL and Series 2 SiSDK HAL
when moving them.
For now, the Series 0/1 HAL symbols retain their name, while new
names consistent with the symbols already defined in the module
integration layer are used for the Series 2 HAL.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Series 2 specific defconfigs for Bluetooth related options should
be set in the Series 2 specific defconfig file.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Move the Kconfig symbol for the SE HAL to hal_silabs.
Select the symbol in the entropy driver rather than unconditionally
at the SoC level.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
COUNTER_GECKO_STIMER is defined by the counter driver. It should
not be present in SoC Kconfig.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Kconfig symbols for selecting HAL content should be part of the
HAL module integration, not defined in the SoC tree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The indirection through a backend symbol for PM implementation
isn't necessary. Define symbol for PM HAL in HAL Kconfig, and
leverage it at SoC level.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Kconfig symbols for selecting HAL content should be part of the
HAL module integration, not defined in the SoC tree. Define the
sleeptimer symbol for WiSeConnect and SiSDK since both use it.
In the future, WiSeConnect should include the SiSDK configuration
and reuse it instead of redefining everything itself. This is a
larger scale refactor that this commit doesn't start tackling.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Remove DCDC defconfigs from Series 2 boards. These have no effect,
Series 2 derives DCDC configuration from devicetree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This removes CONFIG_INTEL_ADSP_SIM_NO_SECONDARY_CORE_FLOW for
both ACE15 and ACE30 simulator, as the latest simulator no
longer requires this workaround.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Move cpu_load to lib/os, as this functionality on its own does not
justify being a subsystem on its own.
Fixes#95498
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updated Doxygen for sensor_decoder_api.get_frame_count().
* Reworded grammar
* Changed channel to chan_spec to reflect data type
* Changed return value from ENOTSUP to EINVAL to be consistent with
sensor_decoder_api.decode()
Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
Former maintainers povergoing and sgrrzhf have not been active for several
releases despite attempts to contact them. Instead of keeping PRs and
releases gating on having them respond remove them from the maintainers
list until they can return.
Unfortunately this moves TF-A from maintained to odd fixes.
Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
For nxp's board.c, the macro used in some places is
'DT_NODE_HAS_STATUS(DT_NODELABEL(<node_label>),okay)', and the
macro used in some places is
'DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(<node_label>))'.
The purpose of this PR is to unify the use of macros
and use the latter.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
STM32F4xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Wrapp the 'done:' label with #if DT_ANY_INST_HAS_PROP_STATUS_OKAY
to avoid unused label warnings when reset_gpios is not defined.
Move declaration of 'val' under the corresponding #if block to limit
its scope and prevent “unused variable” warnings.
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
This driver is based on the XSPI driver for Renesas RZ/T2M and N2L,
and the SPIBSC driver for Renesas RZ/A3UL from the HAL.
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Add ITM to common device tree and set the correct clock config
when using SWO as a logging backend
Signed-off-by: Henrik Grunmach <henrik.grunmach@rohde-schwarz.com>
This patch makes the following improvements:
- Helper APIs for simplifying RTIO transfers.
- Simplify RTIO Streaming implementation to reduce processing time.
- Add streaming mode atomic state, in order to track overruning the
callback events generation.
- Add device pointer address to logging on error-occurrences, as it is
useful when the app has multiple instances of the driver (e.g: NXP's
VMU RT1170 has two).
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Wait until the trigger or streaming mode is configured. Otherwise,
rebooting in-between runs may cause multiple callbacks invoked when
the trigger may have not been enabled yet.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This induces extra-cycles in the encoding path while streaming, which
make it difficult to achieve high-bandidth performance. The use-case
being dealt with involves cranking the IMU at 8000 ODR in batches of
1.25 ms (10 samples at 800 Hz).
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As it introduces latencies due to switching to the threads pool.
Moreover, this is not required for streaming as it executes in a
non-blocking path.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Based on performance observed when cranking the sensor at +1000 Hz ODR,
otherwise is not able to keep up with the pace.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Microchip MEC SoC's include an interrupt aggregator affecting
the routing of interrupt to the ARM NVIC. IA can not be treated
as a true second level interrupt controller. All interrupt sources
with the exception of GPIOs and eSPI virtual wires can be routed
by IA to individial NVIC inputs. Each bank of GPIOs and VWires
are aggregated into a single NVIC input per bank. For the NVIC
to receive the interrupt signal the respective GIRQ enable must
be set. We attempted to add this informatation by encoding the
DT irq property. This exeperiment failed due to how Zephyr
builds the interrupt tables and MEC IA is not a true second
level interrupt controller. Therefore, drivers for MEC peripherals
need to GIRQ number and bit position to pass to HAL API's or
if a driver is implemented in the linux style without using
the full MEC HAL the GIRQ information is present in DT.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Previous commit made the input buffer of the hash packet constant.
Let's therefore adapt typing where used, and remove inappropriate
casts of constant buffers to non-constant ones.
All the "backend" hashing functions already take a constant input,
these changes only affect the "plumbing" between the Zephyr crypto
API and the actual implementation where applicable.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Hashing takes an input buffer, and writes the result in a separate
output buffer. Therefore, the input can be marked as constant, so that
constants can be supplied directly to the hashing context without any
intermediate copy, and without having to perform a type-unsafe cast
from (const uint8_t *) to (uint8_t *)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
- create 'mcxe' as family and 'mcxe24x' as series
- add pinctrl_soc.h
- add soc.c/.h to do system initialization
- Support flash boot if CONFIG_MCXE_FLASH_CONFIG==1
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- add clock_init function to initialize clock sources according
devicetree settings
- finish basic clock api function
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Adding files to allow running the following tests for the Infineon
HPPASS SAR ADC driver on the PSOC C3 family of MCUs:
* tests/drivers/adc/adc_api
* tests/drivers/adc/adc_error_case
Modifies the adc_error_cases test to use add a KConfig option
for the valid resolution.
Signed-off-by: John Batch <john.batch@infineon.com>
Adding files to allow running the following samples for the
Infineon HPPASS SAR ADC driver on the PSOC C3 family of MCUs:
* samples/drivers/adc_dt
* samples/drivers/adc_sequence
Signed-off-by: John Batch <john.batch@infineon.com>
Adds HPPASS SAR ADC driver and HPPASS Analog driver files to support
ADC conversion for the PSOC C3 family of MCUs.
Signed-off-by: John Batch <john.batch@infineon.com>
* Separates HPPASS and HPPASS SAR ADC in the device tree
* Makes HPPASS SAR ADC a child of the HPPASS system to reflect hardware
architecture.
* Adds binding files for HPPASS SAR ADC driver.
Signed-off-by: John Batch <john.batch@infineon.com>
Adds a new kconfig CONFIG_MEM_DOMAIN_HAS_THREAD_LIST so that
only the architectures requiring to keep track of threads in
memory domains will have the necessary list struct inside
the memory domain structs. Saves a few bytes for those arch
not needing this.
Also rename the struct fields to be most descriptive of what
they are.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
It has been observed that, during the switching stress test,
the context switching becomes very slow due to enough CPUs
doing RCW transaction on hardware bus (e.g. spin locks).
Since the number of NOPs are the same for all CPUs, they are
simply entering and exiting the relax loop at the same time,
and hitting the bus with RCW transactions at the same time.
Not exactly a deadlock but it slows down the execution
enough to result in the test timing out. The SoC layer has
added an option to offset the number of NOPs per CPU by
adding the CPU to the number of NOPs. So enabling it for
the Intel ADSP boards to workaround the above mentioned
issue. I haven't encountered another slowdown after turning
on this option. So hopefully this lowers the probability of
that happening such that a simple retry can pass the test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This allows adding the CPU ID to the number of NOPs in
the custom arch_spin_relax(). With the same number of NOPs
for all CPUs, it is possible to have them all doing RCW
transactions at the same time over and over again if they
enter and exit the spin relax loop at the same time.
This behavior has been observed when doing lots of context
switching, like in the SMP switching stress test. So adds
a new kconfig to fine tune the relax loop behavior if
needed. The new kconfig allows adding the CPU ID to
the number of NOPs which will add some minimal offsetting
to workaround the above mentioned situation.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add some content in the testusb sample's README to provide a few more hints
that can be handy for USB newcomers trying to get the sample running along
with testusb.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Provide kconfig conf file to set timing parameters.
Provide overlay file for QTMR channel and pin configuration.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Move TEST_PWM_PERIOD and TEST_PWM_PULSE to kconfig
and update macro name with "CONFIG_" prefix.
The default timing parameters may be too big for timer
peripheral, because they have high frequence, can not
generate such slow PWM wave.
To keep compatibility, the default value in kconfig
are consistent with the code.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The mcux_qtmr_pwm_set_cycles can not set 100% and 0%
duty cycle PWM wave.
Set output compare setting based on pulse_cycles and
period_cycles:
1. If pulse_cycles is 0, generate 0% duty cycle wave.
2. If pulse_cycles equals period_cycles but not 0,
generate 100% duty cycle wave.
3. Otherwise toggle output when compare value matched.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
This covers both Read-Decode and Streaming mode. Since we haven't had
it there have been a few issues (addressed prior to this commit). From
now on, we should maintain this test similar to the others.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
... when CONFIG_DEMAND_PAGING_ALLOW_IRQ is set.
Found during code inspection. k_mem_page_frame_evict() is otherwise
rarely used,
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The benchmark_sync test produces incorrect results on SMP systems due to
a race condition between the producer thread and subscriber threads that
only occurs with parallel execution.
Thread configuration:
- Producer thread: priority 5 (lower priority, runs later)
- Subscriber threads (8): priority 3 (higher priority, runs first)
Expected behavior on uniprocessor:
1. Producer publishes message
2. Subscriber immediately preempts producer (priority 3 < 5)
3. Subscriber processes message, calls atomic_add(&count, 256)
4. Producer resumes, continues to next message
Result: All messages counted before producer checks final count.
Race condition on SMP:
CPU 0 (Producer): CPU 1-3 (Subscribers):
----------------- ----------------------
Publish msg 1
k_msgq_put(sub1) ✓
k_msgq_get() → processing
Publish msg 2
k_msgq_put(sub2) ✓
k_msgq_get() → processing
...continues...
Publish msg 128 ✓
atomic_get(&count) Still processing...
→ Reports incomplete count! atomic_add() comes later
On SMP, the producer doesn't get preempted since it runs on a different
CPU from the subscribers. It races ahead and checks atomic_get(&count)
while subscriber threads on other CPUs are still processing messages.
Observed results:
- Non-SMP: Bytes sent = 262144, received = 262144 ✓
- SMP: Bytes sent = 262144, received = 260352 ✗ (7 messages lost)
This is a benchmark test design issue, not a zbus bug. The test assumes
subscribers complete before the producer finishes, which doesn't hold on
SMP systems. Filter SMP configurations from this test variant for now.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The "_too_small" test variants intentionally configure an isolated buffer
pool with only 2 buffers to validate proper error handling when the pool
is exhausted during notification of 16 msg_subscriber observers. These
tests are likely to fail on SMP systems due to a buffer recycling race
condition:
Expected behavior (uniprocessor):
Publisher Thread:
1. Allocate buf1 for bar_msg_sub1 ✓
2. k_fifo_put(sub1_fifo, buf1)
3. Allocate buf2 for bar_msg_sub2 ✓
4. k_fifo_put(sub2_fifo, buf2)
5. Try allocate buf3 for bar_msg_sub3 → FAIL -ENOMEM
Subscriber threads process messages after notification completes,
pool exhausts at subscriber #3 as expected.
SMP race condition:
CPU 0 (Publisher): CPU 1 (bar_msg_sub1): CPU 2 (bar_msg_sub2):
------------------ --------------------- ---------------------
Alloc buf1 ✓
k_fifo_put(sub1, buf1)
k_fifo_get() → buf1
zbus_sub_wait_msg()
net_buf_unref()
→ buf1 FREED!
Alloc buf2 ✓
(reuses buf1!)
k_fifo_put(sub2, buf2)
k_fifo_get() → buf2
net_buf_unref()
→ buf2 FREED!
Alloc buf3 ✓
(reuses buf1 again!)
...continues...
All 16 allocations succeed!
On SMP systems, subscriber threads on other CPUs may consume and free
buffers quickly enough that they are recycled back to the pool before the
publisher's notification loop can exhaust it. The test's assumption that
notification completes before subscribers run does not hold with parallel
execution.
Since this is a test design limitation (not a zbus bug), filter SMP
configurations from these specific test variants rather than attempt to
artificially slow down subscribers or change thread priorities.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
According to the RM, erasing must be done per sector. So, the start
address and the size of an erase operation must be a multiple of 8192
bytes. So, the erase-block-size should be 8192 bytes.
Programming can be done per phrase (start address and size a multiple
of 16 bytes). So, write-block-size should be 16 bytes.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
Adds support for the USB device binding for MCTP. Binding created based on
the DMTF specification for USB Transport Binding. The overall design of
this binding follows the existing UART and I2C+GPIO bindings that already
exist in Zephyr.
Signed-off-by: Eric Ocasio <eric.ocasio@nxp.com>
MAX32658 is the 1.8V variant of MAX32657. From a software perspective,
both SoCs are functionally equivalent. Reuse the existing MAX32657
backend for MAX32658 to enable support with minimal changes.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Added mikrobus_serial, mikrobus_spi and mikrobus_header node labels
to FRDM-MCXA153 device tree board definition, allowing compatible
shield boards to be used.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Added arduino_i2c, arduino_spi and arduino_header node labels
to FRDM-MCXA153 device tree board definition, allowing compatible
shield boards to be used. Also extend the board YAML file with
related support tags arduino_gpio, arduino_i2c and arduino_spi.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Change SGI interrupt lines from 14-15 to 6-7 for nested interrupt
testing. SGI 8-15 are unaccessible from Non-Secure state (e.g., when
running with TF-A), causing test failures. SGI 0-2 are reserved for
Zephyr SMP IPIs, so use SGI 6-7 which work in both Secure and
Non-Secure configurations.
Fixes test failure: "isr0 did not execute" assertion at line 184.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The driver should not take the whole interface down and re-initialize on
every low power entry and exit. This is a lot of latency for no real gain
as far as I can tell. We can just do as the reference manual actually says
which is to set the sleep enable bit to put the module to sleep while still
being able to detect magic packets for wake on LAN.
Also, the only platform that this power action was "enabled" for was
kinetis, but that platform does not have any power management enabled in
Zephyr. Which means this code was never getting called even with all the
PM configs on. So basically this code is dead code. But it could be useful
for other platform, such as RT, so there's no reason not to remove the
dependency on kinetis and let it be used for any of the platform as long as
PM_DEVICE is enabled (hence the imply).
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Adds initial SoC-level support for the Microchip
PIC32CZ CA80/9x series, including SoC definition files.
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
Adds common and SoC-specific .dtsi files for the Microchip
PIC32CZ CA80 CA90 and CA91 family. These files define core
peripherals, address maps, and interrupt controller structure
shared across the PIC32CZ CA80 9x variants.
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
Fix QSPI and half duplex
Support hold on CS flag
Create functions to assert and deassert CS
Signed-off-by: Benjamin Santon <benjamin.santon@analog.com>
Boards that use MCUboot to start XIP from external flash default to
CONFIG_CANOPENNODE_PROGRAM_DOWNLOAD=y. However, in the no_storage
sample, dependencies such as CONFIG_FLASH are disabled. This causes
build errors. Work around this by explicitly disabling program download
in the no_storage sample configuration.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant.
There is no consistency about which level of the DTSI inclusion hierarchy
the macros from this header start being used, so including it from the root
file ensures they are always visible and available without headache. Today,
there are places where the header is included twice or more at different
DTSI inclusion hierarchy levels because of this ambiguity - this commit
solves the issue once and for all.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Explicitly cast down the string width to int, as otherwise it is
size_t which may have a bigger size.
Avoids the following build error:
subsys/net/lib/shell/dns.c:496:67: error: field precision specifier
‘.*’ expects argument of type ‘int’, but argument 4 has type ‘size_t’
{aka ‘long unsigned int’}
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As the number of DMA channels could be different between DMA instances,
get the number from "XDMAC Global Type Register" and validate the
channel used.
Signed-off-by: Tony Han <tony.han@microchip.com>
When the XDMAC is activated in the DT, configure it's register region
with strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
Replace the array size for sama7g5 registered clocks with macros and
put the macros to soc.h with descriptions.
Signed-off-by: Tony Han <tony.han@microchip.com>
Change the location of the names for programable clocks from the
stack to "static struct clk_programmable" array.
Signed-off-by: Tony Han <tony.han@microchip.com>
Allow to spread tc threads by more then one priority level and cleanup the
computation of the priority.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
To enable quality-of-service (QoS) applications, allow filters to modify
the priority of an incoming packet. This allows that processing can be
done on tc-queue-threads with different priorities.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
We added ECIA GIRQ get/set/clear functions avaiable for
all MEC parts. Drivers can make use of these functions
to get, set, and clear GIRQ status and enables for
their peripheral. In cases where code requires 8/16 bit
access to these or other SoC registers we added inline
helpers modeled after Zephyr's 32-bit sys_read/write/test
routines. This commit is part of a long term goal to share
drivers among all the MEC parts.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
1. add cs pin as espi driver wake up reference
2. removed the unnecessary update of the cached date
3. removed the unnecessary busy wait in notify funciton
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
Direct flash access can cause exceptions when performed while the flash
memory is inaccessible or being modified — for example, when code is
executing from PSRAM. To avoid such invalid access, this change introduces
asynchronous flash operations that are executed from a safe runtime context
via a work queue. This ensures all flash accesses occur only when the flash
is valid and accessible.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add board files for nRF54LM20A/ns.
Update existing nRF54LM20A board files to support this.
Signed-off-by: Dag Erik Gjørvad <dag.erik.gjorvad@nordicsemi.no>
Pass on the board revision to remote image build if specified for the
application image board target.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Remove the prompt for REMOTE_BOARD.
REMOTE_BOARD should not be having a prompt or be configurable on command
line.
Instead REMOTE_BOARD should be defined based on the SoC as this will
allow creation of new boards using the same SoC, and thereby be able
to build the sample out-of-the-box for any supported SoC.
This allows us to remove several single line config files.
For SoCs with more than two CPU clusters, such as the nRF54h20, then a
choice is provided to select specific core.
Remove the REMOTE_BOARD restriction, as this sample will build and run
even for single core SoCs, and may be useful for testing other sysbuild
multi-image features even for single cores SoCs.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Current implementation forces confirmation of current boot image and
second slot erase at hawkbit_init() and it is impossible to communicate
with hawkBit server without running it. This makes impossible to notify
update failures to server (#71750)
Add option HAWKBIT_CONFIRM_IMG_ON_INIT to allow disabling the auto image
confirmation and HAWKBIT_ERASE_SECOND_SLOT_ON_CONFIRM to select if the
second partition slot shall be erased or not.
Disable those to handle of these behaviors on application code.
Signed-off-by: Matheus Marques <code@matheusmbar.com>
Add pwm driver using tcc g1 peripheral.
Adds the support for generating pwm output.
Supports both 16-bit and 24bit mode of tcc peripheral
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Clarify HAL return value is of type HAL_StatusTypeDef and not an
int in STM32 DCMI and DCMIPP drivers. For consistency, rename
the variable holding HAL return value from ret to hal_ret.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
move changeable peripherals from dtsi to board, as
in litex these can change and might be on
different registers on custom out of tree
boards. So we limit riscv32-litex-vexriscv.dtsi
to just the interrupt controller and the cpu,
which don't change.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Refactor the code to read all PMP address CSRs (pmpaddr0 through
pmpaddrN) into a new helper function, `z_riscv_pmp_read_addr`.
This change encapsulates the register reading loop, improving code
organization and potential reusability. The new function includes size
assertions
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Fix wrong byproduct name for the unencrypted slot 1 image, avoiding
conflicts with the encrypted image.
Signed-off-by: Alberto Dalibor Rodda <fiabarod@proton.me>
As the CONFIG_ZVFS_OPEN_MAX is set to 0 by default, we must
use ZVFS_OPEN_SIZE in the tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Either remove the option from conf file or adjust its value
by using CONFIG_ZVFS_OPEN_ADD_SIZE_NET option because the
max number of socket descriptors is now calculated dynamically
at built time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add CONFIG_ZVFS_OPEN_IGNORE_MIN=y so that we can set the
CONFIG_ZVFS_OPEN_MAX without specifying individual sub values.
This is just specific to this test and not something that needs
to be done in other tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The number of file/socket descriptors is now determined by
CONFIG_ZVFS_OPEN_ADD_SIZE_* options and the networking side
already sets the minimum values so the CONFIG_ZVFS_OPEN_MAX
option is not needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remove unneeded CONFIG_ZVFS_OPEN_MAX config option as it is now
controlled by number of net_context i.e., CONFIG_NET_MAX_CONTEXTS
Some of the samples now use CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE
to specify the sample socket needs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that the CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS will
reflect the number of required file descriptors in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The number of net_context now determines the minimum amount
of network sockets that are to be allocated.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The ZVFS_OPEN_ADD_SIZE_ is used as a prefix for matching specific
Kconfig option names, i.e. it's not a real option in itself.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure we always allocate space for stdin, stdout and stderr file
descriptors if Posix device io option is enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The file descriptor table size is now controlled by adding together
the values of CONFIG_ZVFS_OPEN_ADD_SIZE_* options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of user trying to figure out what is the amount of file /
socket descriptors in the system, let the various subsystems etc.
specify their need using a Kconfig option. The build system will
then add these smaller values together and set a suitable file
descriptor count in the system.
This works the same way as the heap size calculation introduced
in commit 3fbf12487c
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
On most parts of the STM32F4 series, when the OTG_HS controller is used in
FS mode, the ULIP **low-power** clock must also be disabled for proper
operation. This was done properly in an old version of the driver but was
lost as part of refactoring[1].
Re-introduce ULPI low-power clock disable when OTG_HS is used in FS mode.
[1] See commit e31ddec781
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Ensure bus clock is enabled before accessing TRNG FIFO on
Series 2 VSE devices.
This is a minimal bugfix to work around an issue where certain
HAL APIs disable the bus clock after accessing the crypto block.
Long term, this driver should be rewritten to properly use
clock control APIs for clock management.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
When analyzing Zephyr coredumps from ARM Cortex M, sometimes the GDB
server fails with the error 'binascii.Error: Odd-length string'.
This happens because the GDB packet parsing logic does not correctly
handle the '=' separator in register write packets containing register
identifiers with more than one letter/digit. Fix it by properly
locating the '=' character and slicing the packet string accordingly.
Signed-off-by: Tomas Pajurek <tomas.pajurek@spotflow.io>
Actually do what the comment says and wait for Vdd33USB to be ready,
instead of waiting for the opposite.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Actually do what the comment says and wait for Vdd33USB to be ready,
instead of waiting for the opposite.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This commit prevents enter deep sleep mode during PECI transactions
since clocks if PECI will stop.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Add a callback for the periodic script result so that applications have
a way of detecting dead links.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add support for hardware reset via GPIO in the ADIN1100 PHY driver.
The reset pin is configured via device tree using the reset-gpios
property.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Clarify HAL return value is of type HAL_StatusTypeDef and may not
be a int. This change aims preventing one from mixing standard "errno"
int return values and STM32 HAL return value finding misleading
implementation in existing code.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add missing test of HAL_FLASHEx_DATAEEPROM_Unlock() return value.
By the way, add a error trace message when failing to relock the
EEPROM after we failed to program it.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct eeprom_stm32_write() to return a valid errno instead
of mixing HAL return values and errno return values.
Clarify HAL return value is of type HAL_StatusTypeDef and not an
int in eeprom_stm32_read().
Remove printing of HAL_FLASHEx_DATAEEPROM_Lock() error code since
not very useful.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
These represent the outputted frequencies of the AUXPLL of
different settings set in the device tree set using dt-bindings
in nrf-auxpll.h. This is added to remove the need for 'magic numbers'
in drivers and tests.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Board image needs not to be manually included in the documentation, as
zephyr:board:: directive takes care of this already.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Board image needs not to be manually included in the documentation, as
zephyr:board:: directive takes care of this already.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
My editor (nvim) started to automatically source .editorconfig.
This new feature broke my git workflow when I edit my staging changes
(yes, I edit patches and they still apply).
It took me a bit of time to understand my editor striped the trailing space
(which are meaningful patches) because of .editorconfig.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The STM32 QSPI, OSPI, and XSPI drivers support sending the ULBPR command
for flash ICs that require unlocking before writing to. This is done
conditionally based on the requires_ulbpr devicetree property.
Previously the driver would always log "Write Un-protected", even if a
write un-protect was not attempted. Fix this so that "Write Un-protected"
is only logged when a write un-protect is attempted and succeeds.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Use build assert to check counts_per_revolution DTS value compile time to
prevent runtime failure and also decrease flash usage slightly.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Enable TRNG in sama7g54_ek.dts files.
Add entropy for TRNG to sama7g54_ek.yaml support list.
Tested with tests/drivers/entropy/api.
Signed-off-by: Tony Han <tony.han@microchip.com>
Update the Raspberry Pi Pico HAL to be based on the latest release of
the upstream SDK (v2.2.0).
SDK v2.2.0 has new include directory structure, so update the relevant
CMakeLists.txt files accordingly.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Sort some entries alphabetically to improve readability and
maintainability. This commit just reorders existing entries and does not
change any include paths.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Add support for the ST MB1835 2.47-inch round DSI TFT-LCD daughter board
designed for STM32 Discovery kits.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Added the removal of the 'amba-ahb-dbus-width' devicetree property
from the binding of the Xilinx GEM Ethernet controller driver to the
current migration guide.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Obtain the value for the AMBA AHB bus width (32 bit/64 bit/128 bit) from
the design_cfg5 register at init-time rather than specifying it in the
respective SoC's DT.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Remove the obsolete DT parameter "amba-ahb-dbus-width" from all GEM
controller instance declarations for both the Zynq-7000 and the
ZynqMP.
The value matching the current target SoC is now being read at
run-time from a design configuration register
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
This parameter no longer needs to be configured at the SoC level in
the declarations of the GEM controller instances (used to require
different values for the Zynq-7000 and the ZynqMP) as the value matching
the current target SoC is now being read at run-time from a design
configuration register.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Add openamp_rsc_table support on imx93evk Cortex-M33, communication
with Linux which runs on imx93 Cortex-A55.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Add device-tree node for MU1 (Message Unit instance 1), which is used
for communication between Cortex-A55 and Cortex-M33.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
The current calls list should not be queried if the SLC is not
connected. Or the error `-ENOTCONN` will be returned by function
`hf_query_current_calls()`.
Check the connection status of HF before submitting a delay-able
worker. Only the SLC is established, submit the delay-able worker.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add the command `query_calls` to query the current calls list.
The received current calls list will be printed in callback
`hf_query_call()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add the function `bt_hfp_hf_query_list_of_current_calls()` to support
users to query current call list.
Add the callback `bt_hfp_hf_cb::query_call` to notify the received
current calls.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Allow to configure the MMU for non-cacheable normal memories.
This mode is needed for instance by net samples to access to
to non word-aligned memory.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add new flag to allow to select normal non-cacheable memory.
This is needed for armV7 to be able to configure non cacheable
memories with "normal" attribute instead of "device" attribute.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Enable i2s_codec samples for frdm_mcxn236.
With 'CONFIG_USE_DMIC=n', you can hear the sine wave
from the codec.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Added new test case for pinctrl
Added sam_e54 overlay file, testcase.yaml, CMakeLists.txt and prj.conf
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
The PMP stack guard test was previously limited to the non-multithreaded
(no-mt) configuration.
This commit updates the test implementation to conditionally handle
stack boundary lookup:
1. When CONFIG_MULTITHREADING is enabled, it uses thread-specific stack
information (e.g., z_interrupt_stacks[_current_cpu->id] for ISR stack
and k_current_get()->stack_info for the main thread stack).
2. New test configurations (arch.riscv.pmp.mt.*) are added to explicitly
run the tests with CONFIG_MULTITHREADING=y.
This ensures PMP stack guards are correctly verified in a multi-threaded
environment.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Moved the MSI init after the LSE init to respect the initialization flow
of the MSI PLL mode that need LSE to be enabled and ready.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Fix mcux flexcan driver failed to transfer when both loop back mode
and CAN FD mode are enabled.
Transceiver Delay Compensation feature must be disabled in loopback
mode. For some platforms, both FDCTRL[TDCEN] and ETDC[ETDCEN] can
enable such feature. In this case, SDK API only configure ETDC register
and current driver do not clear ETDC[ETDCEN].
Fix this issue by add ETDC[ETDCEN] configuration according to SDK
macro `FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` vaule.
Test this commit on mimxrt1180_evk/mimxrt1189/cm33 and set both CAN FD
mode and loop back mode.
Signed-off-by: William Tang <william.tang@nxp.com>
This adds a babblesim test that checks
* That duplicate net key index pairs are filtered out in the bridged
subnets list.
* That indexing into the filtered list works as expected (indexing
happens into the already filtered list, not the full bridging table)
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This commit adds functionality to filter out duplicate entries in the
Bridged Subnets List message.
This is done by iterating through the part of the table we have already
processed, to check if this is the first time we see a given key pair or
not.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Change HDC_302X_TEMP_OFFSET_SCALE and HDC_302X_HUMIDITY_OFFSET_SCALE
from float literals to double literals to avoid implicit conversion
warnings when compiling with clang and -Wdouble-promotion flag.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Redefine some macros due to different naming scheme in the header file.
Get the clock rate from the device tree when 'SOC_ATMEL_SAM_MCK_FREQ_HZ'
is not defined.
Signed-off-by: Tony Han <tony.han@microchip.com>
When the PWM is activated in the DT, configure it's register region
with strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
The HDC302X sensor driver is added,
you can use this driver to read temperature and humidity.
Also set an offset, upper and lower limits to get warned
when temperature or humidity get out of band.
The sensor is build for ultra low power applications.
Signed-off-by: COUSSEMENT Stijn <stijn.coussement@psicontrol.com>
Do not register the device when the class instance has already been
initialised. Fail on initialization if no HID device is registered.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Reduce floating-point operations in the nxp_pmc_tmpsns.
Provide new calculation method without floating-point operations.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. The updated regex better matches device names
for various temperature sensors. If a device name
contains hyphens, the new regex can match it.
2. enable rt700 die_temp_polling sample
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Adds initial SoC-level support for the Microchip
PIC32CX SG series, including SoC definition files.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Adds common and SoC-specific .dtsi files for the Microchip
PIC32CX SG family. These files define core peripherals,
address maps, and interrupt controller structure shared
across the PIC32CX SG variants.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Use of the `sensor get` help. No channel provided allows the sensor_shell
to iterate through every channels. Getting the last channel gives the last
channel index and therefor the channel count. Provide futur proofing for
new channels.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
The max30101 allows to configure time slots in samples acquisition.
It is now supported by adding matrix mapping for the slot/fifo
indexing. When a channel is present multiple times, the resulting
sample from the `sensor_channel_get` is averaging each entry.
Added Die temperature sample acquisition with
`CONFIG_MAX30101_DIS_TEMPERATURE` Kconfig.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
The max30101 sensor driver doesn't support triggers.
Add `.trigger_set` API and corresponding Kconfig and
device tree parameters. Add `SENSOR_CHAN_AMBIENT_LIGHT`
and `SENSOR_TRIG_OVERFLOW`.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
The max30101 sensor driver doesn't support multiple instance.
Update Kconfig and maxim,max30101.yaml for instance based
configuration. Propagate changes over existing files.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
Enable this kconfig setting to force using a specific raw value for the
OVRDVAL field in the DLLCR registers.
This option gives more granularity than the 'data-valid-time' field in
the dts. The unit of 'data-valid-time' is nanoseconds while the unit of
OVRDVAL are raw delay cells.
Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device
will set the OVRDVAL and OVRDEN fields in the DLLCR register
but works only when the 'rx-clock-source' is configured to '#0 External
input from DQS pad' and the frequency <= 100MHz.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
This commit enables MCXN236, MCXN947 LPUART pin internal
pullup resistor. For MCXN947 and MCXN236, during LPUAR
initialization, the RX pin is pulled down internally
and STAT[RAF] is set to one. In this state, attempting
to enter low power mode will trigger LPACK reset and
therefore cannot truly enter low power mode. The correct
setting should be to enable LPUART pin internal pullup
resistor.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Implement Modem Status Command(MSC) and a per DLC flow
control by using it.
Send flow control signals when our input buffer don't fit
full frame anymore.
Stop TX if we have received from controls on MSC.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Replace the look-up table used to obtain the prescaler enumeration with
a simple multiplication.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The existing formula assumed prescaler enumerations were consecutive,
which led to incorrect values being passed to HAL functions. Update
the code to calculate correct prescaler enumerations.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
In case of using HAL_OVERRIDE, avoid clearing the FIFO ERROR flag
before calling the HAL DMA IrqHandler so that the HAL DMA code
handling can be used.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
If hal_override is set, avoid reporting an error and clear the
transfer error (TE) bit so that HAL code can properly handle it.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The size of icm45686_encoded_data fifo_payload is guaranteed
to span the full number of frames read as it was allocated during
icm45686_event_handler() buf_len_required size.
This update suppresses the static analysis warning of
out of bounds memory access at index 1 by explicitly declaring
fifo_payload to be a VLA at the end of icm45686_encoded_data.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Change the __ASSERT on unsupported fifo packet header to
CHECKIF so the user can choose how to handle the invalid
packet.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
When operating in streaming mode, a FIFO empty event, which
is caused by host reading the last byte of the last FIFO frame,
can cause FIFO data corruption.
During subsequent reads to the FIFO, the first frame that arrives
after the empty condition will be corrupted. Once the issue occurs,
the internal state cannot recover and the FIFO must be flushed in
bypass mode to clear the corrupted state.
The current workaround from TDK is to read M-1 frames when M frames
are reported by fifo_count. Since M is fixed by the fifo_watermark
DT parameter, and in cases where fifo_watermark == 1, the watermark
trigger threshold is set to M + 1 frames and M frames are read out
during a watermark threshold event.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
When an unsupported fifo packet triggers an assert, it is
helpful to see the packet as a hex value to help when debugging.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Fixes incorrect 'dma-requests' value in
dts/arm/nxp/nxp_mcxn23x_common.dtsi and
dts/arm/nxp/nxp_mcxnx4x_common.dtsi. The
'dma-requests' indicates the maximum value of
the DMA request sources (slots) index supported
by DMAMUX rather than the number of request sources.
Fixes: #97389 (which introduced the incorrect values)
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In commit f3edf52264, I erroneously put
"main" under the existing "tags" entry which is obvisouly wrong, it
should be under "branches". Sorry :|
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
tx_int_sem serves solely as a signal indicator and does not require signal
counting. Within eth_stm32_tx, the semaphore is reset each time a packet
is transmitted. Upon receiving the transmission completion signal, the
function exits. Signal counting is unnecessary. Change to a binary
semaphore.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Take it from the chosen flash node parent (MPI controller) 'nor'
register, which contains the memory mapped address for the NOR flash.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Ideally we should be able to just use jedec,spi-nor (to keep Linux
compatibility), but, QSPI controllers live in a limbo in Zephyr. Adding
this binding won't make things worse than they are.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Compatible should be set at board level, depending on how MPI IP is used
(e.g. NOR, NAND, PSRAM).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
During a Host-to-Device Control transfer, an arbitrary amount of data is
sent from Host to the Device using OUT Data packets. If the total amount of
data to transfer, communicated via the wLength field of the SETUP packet,
exceeds the EP0 MaxPacketSize, several Data packets until all data has been
transfered.
Combined with HAL behavior, the STM32 driver did not handle this situation
properly and always ended reception after a single Data packet was received
regardless of whether or not all data had actually been received from Host.
Modify driver to handle this situation properly by keeping track of how
much data has been received and restarting transfers until we have received
everything the Host promised it would send.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Drop all existing transfers in control endpoints' queue when a new SETUP
packet is received. Also use the appropriate net_buf API in a nearby place.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
For a reason that escapes me for now, the doc build is not particularly
fast on our hosted runners, and we are starting to hit the 20 minutes
timeout. Increase to 60 minutes to be safe for now.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Building the full docs every 3 hours is not really the best approach
given we end up building "for nothing" when things are quiet, and on the
other hand introduce a 3-hours-at-most delay for changes to be reflected
on the public docs after a merge/push.
Therefore, drop cron and do the full build on every push to main.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add missing inclusion of stddef.h and stdbool.h to respectively define
size_t and bool types used in some cache.h function declarations.
This change prevents build errors like:
.../include/zephyr/arch/cache.h:105:41: error: unknown type name 'size_t'
105 | int arch_dcache_flush_range(void *addr, size_t size);
| ^~~~~~
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This was missing despite other mikrobus labels being there. Verified
against LPCXpresso55S69_Board_Schematic_RevA2_dec4.pdf
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
detect_version() used os.environ["ZEPHYR_BASE"],
which raises a KeyError when the variable is
absent, preventing the fallback path from running.
Switch to os.environ.get("ZEPHYR_BASE") and use
Path(__file__).resolve() for the fallback so the
path is absolute/canonical.
Signed-off-by: Paul Oberosler <paul.oberosler@raspberrypi.com>
Move interrupt controller selection from SOC_FAMILY_QEMU_VIRT_RISCV
to individual SoC configurations.
This follows Zephyr best practices where hardware capabilities should
be selected at the most specific level possible (SoC porting guide).
This enables conditional selection of mutually exclusive interrupt
controllers within the same SoC.
Changes:
- Remove 'select RISCV_HAS_PLIC' from SOC_FAMILY_QEMU_VIRT_RISCV
- Add 'select RISCV_HAS_PLIC' to each individual SoC:
* SOC_QEMU_VIRT_RISCV32
* SOC_QEMU_VIRT_RISCV32E
* SOC_QEMU_VIRT_RISCV64
No functional change - all existing QEMU RISC-V boards continue to
use PLIC as before.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
This commit enhances DNS upstream resolver functionality by adding
support to query for PTR and SRV records.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
The linter is super fast, no need to limit to only changed files.
For example if the linter configuration changes, all Python files need to
be validated.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This adds a role that can be used to reference the board catalog page,
optionally with filter parameters to pre-filter the list of boards.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Suppoted feature 'usb' is not required or used in any of the USB
samples or tests. The only valid feature for USB is `usbd`, or
`usb_device` for the legacy samples and tests.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Replace `sizeof(unsigned long)` with `PMPCFG_STRIDE` (defined as
`__riscv_xlen / 8`) for dimensioning PMP configuration register arrays
(`pmpcfg_regs`).
The size of PMP configuration registers should be derived directly from
the target architecture's XLEN. Using `sizeof(unsigned long)` can cause
size mismatches, particularly with static analysis tools like SonarQube.
These tools might assume a host-specific size for `unsigned long`,
leading to spurious out-of-bounds access warnings when analyzing code
for different RISCV base architectures (e.g., RV32 vs. RV64).
This change ensures the array sizing is correctly and consistently tied
to the target's register width (XLEN).
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Add test cases verifying that invalid credentials are rejected by the
socket when configured on TLS/DTLS socket with TLS_SEC_TAG_LIST socket
option.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
So far the TLS/DTLS credentials would only be validated upon first use,
i. e. when TLS/DTLS handshake was initiated. This could lead to some
confusion, especially when trying to understand the reason of the
handshake failure, as it wasn't clear whether the handshake failed due
to peer sending bad certificate or due to local configuration issues.
This commit attempts to improve this, by pre-validating the credentials
as soon as they are configured on a socket with TLS_SEC_TAG_LIST socket
option. That way, in case bad credentials are configured on a socket, or
more commonly, mbed TLS is misconfigured to handle certain credential
type, it will be caught early during socket configuration, instead of
during the handshake.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Updatehub now only use PSA Crypto API for crypto support and it
automatically enables Mbed TLS when TF-M is not available in the build,
so there is no need for neither a specific test case for PSA nor
the overlay file.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Following the removal of legacy crypto support the code could be further
simplified so this commit accomplish to this part.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The long-term Zephyr's goal is rely only on PSA Crypto API for crypto
support in Zephyr and at the same time Mbed TLS will remove this support
from the next release.
Therefore this commit removes usage of legacy crypto hash support from
updatehub.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Update workflow to use the new version of Vermin to enrich the Python
minimum version checks in the CI pipelines.
Signed-off-by: Morten Kristensen <me@mortens.dev>
The "status" property was defined after the pllX subnodes
in pll node, which violates the Devicetree Specification
v0.4, section 6.3:
"Nodes may contain property definitions and/or child node
definitions. If both are present, properties shall come
before child nodes."
This caused the Device Tree Compiler error: "Properties
must precede subnodes. Unable to parse input tree"
This commit moves the "status" property to precede all pll subnodes,
fixing the syntax error and ensuring compliance with the Devicetree
Specification.
Signed-off-by: Stanislav Bobokalo <stas.gurland@gmail.com>
Apparently some compiler may expect the fields initialized in a certain
order when there are anonymous fields in a struct.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
A previous commit (84163d3) changed the RTT backend from outputting a
binary stream to a hex encoded stream when dictionary logging is
enabled.
This commit adds a Kconfig option to keep the binary format, which is
required for live_log_parser.py, and also for log_parser.py when the
--hex argument is not used.
Signed-off-by: Jesper Puge Nielsen <jpni@demant.com>
Add a new overlay for testing the M1K flash controller:
it515xx_m1k.overlay (only supported on it515xx_evb)
Update testcase.yaml to include this overlay with DTC_OVERLAY_FILE
and platform_allow accordingly.
example:
west twister -p it515xx_evb -s drivers.flash.common.it515xx_m1k
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Refactor the flash common test setup by moving the flash0 node from
it8xxx2_evb, it82xxx2_evb, and it515xx_evb board DTS files into
dedicated test-specific overlays under
tests/drivers/flash/common/boards:
it8xxx2_indirect.overlay for indirect flash testing
Update testcase.yaml to reference this overlay using DTC_OVERLAY_FILE
and restrict platform availability with platform_allow for the three
supported board: it8xxx2_evb, it82xxx2_evb, and it515xx_evb
example:
west twister -p it8xxx2_evb -s drivers.flash.common.it8xxx2_indirect
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:
Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#
Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
for devices larger than 16MB
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Add a west config option to skip rebuilds by default or not when doing
west flash. Also add corresponding symmetrical CLI options.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add tests support for RTC driver on these Renesas RA boards:
- ek_ra8m1
- ek_ra8d1
- ek_ra8p1
- ek_ra4l1
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
RA boards
Add samples test support for RTC driver on these Renesas RA boards:
- ek_ra8m1
- ek_ra8d1
- ek_ra8p1
- ek_ra4l1
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for the battery backup (VBAT) functionality on
Renesas RA8 family. This allows the RTC to retain timekeeping
data when the main power supply is lost by switching to the
VBAT domain automatically. This commit add support for these
SoC series: ra8m1, ra8p1, ra8d1
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
RA8 family
Add a battery backup (VBAT) node to the device tree for the Renesas
RA8 family. This enables support for RTC VBAT domain switching when main
power is lost.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Renesas RA family
Add dts bindings for the battery backup (VBAT) node used
on the Renesas RA family.
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
uicr/zephyr/zephyr.hex needs to be built after all other zephyr
images.
Instead of adding a dependency on uicr, we check the sysbuild_images
property to find images.
Also, we check it as late possible by using the cmake_language(DEFER
DIRECTORY feature. Which will ensure that running this code will be
one of the last things that the CMake sysbuild program does at
Configure time.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit adds `latch-enable` property to power elpm child
node and marks the `polarity` property as required.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Relocate the initialization of the gpio-q group and the elpm
module to early SoC preparation hook. The elpm xlpout signal
is connected to the main power rail and is driven by firmware
after bootup. Initializing these modules early ensures that
the power rail remains stable and does not drop.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Fix the transmit timestamp value sent in SNTP queries:
* Use sys clock as a time source instead of the uptime,
* As NTP epoch is different from Unix epoch (starts in 1900), adjust
the seconds value with appropriate offset,
* Finally, adjust the fraction calculation to the nanoseconds value
from struct timespec. Do the math in 64-bit to avoid overflows and do
the division at the end for more accurate results.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The macro `NRF_802154_TX_STARTED_NOTIFY_ENABLED` has been removed
from the nRF 802.15.4 Radio Driver.
Setting it in CMakeLists.txt became pointless and is removed.
Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
The MTU of HFP HF or AG is fixed value. It cannot be configured.
Fix the issue to make the MTU of RFCOMM is consistency with the MTU
of L2CAP.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Enable watchdog node, add alias used in samples and add 'watchdog' to
the supported list (for twister).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add board support for WeAct Studio ESP32-C3-Mini, a compact
development board based on ESP32-C3FH4 with 4MB internal flash.
Features:
- ESP32-C3 RISC-V single-core @ 160MHz
- 400KB RAM, 4MB flash
- USB Serial/JTAG for flashing and debugging
- Wi-Fi 802.11b/g/n and Bluetooth 5 LE
- On-board blue LED (GPIO8)
- Boot button (GPIO9)
- Exposed GPIOs: 0-10, 18-19, 20-21
Supported peripherals:
- USB Serial/JTAG
- I2C (GPIO0, GPIO1)
- SPI (GPIO3-6)
- GPIO
- Watchdog
- TRNG
- Wi-Fi
- Bluetooth
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Rename the modulino pixels driver to use the official marketing name,
the "smartleds" one was picked incorrectly from the source code of the
on board mcu of the module itself, but that was clearly out of date.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The zephyr:code-sample directive automatically adds a link to the sample
source code on GitHub -- remove all manually added links that are just
redundant and subject to bitrot / copy-paste errors.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Properly close down the CMUX channel before shutting down
the modem.
The CMUX Close-Down command should indicate the remote end
to clean up, even if we don't have shutdown script or power-key GPIO.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If we immediately send disconnected event when CLD is received,
we might close the UART pipe before the response is actually send.
Also, shutdown_handler should not retry indefinitely.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This patch adds support for the WeAct Studio STM32G030 Core Board,
a compact and low-cost development platform based on the STM32G030F6P6
microcontroller.
Main features:
- STM32G030F6P6 MCU (32 KB Flash, 8 KB SRAM)
- User LED
- Exposed SWD header for programming/debugging
- UART1 (PB6/PB7) as default console
- I2C2 (PA11/PA12) and SPI1 (PA1/PA6/PA7) peripheral mapping
- 3.3V or 5V input power options with onboard regulator
The board has been tested with the following Zephyr samples:
- samples/basic/blinky
- samples/hello_world
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
mbedtls_ssl_write() function has a limitation, that when the function
returns MBEDTLS_ERR_SSL_WANT_WRITE, the consecutive call to this
function have to contain the same data as the previous call. As there
doesn't seem to be a viable workaround for this at the socket layer
(other than dropping non-blocking support which is not an option), we
need to carry this requirement for non-blocking sockets as well,
therefore document this case in secure sockets documentation.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When bt_l2cap_send_pdu() succeeds, it transfers buffer ownership to the
stack, which must eventually invoke the provided callback. This contract
is honored in all paths where transmission becomes impossible:
- Normal transmission: callback invoked with err=0 after HCI Number of
Completed Packets event (tx_notify_process)
- Send errors (after tx allocated): callback invoked with err=-ESHUTDOWN
via conn_tx_destroy
- Send errors (before tx allocated): callback invoked with the specific
error code in send_buf error_return path
- Connection disconnect: callbacks invoked with err=-ESHUTDOWN via
process_unack_tx -> conn_tx_destroy for all PDUs in tx_pending
However, when a channel is deleted (l2cap_chan_del), PDUs remaining in
the tx_queue are dropped without invoking their callbacks, violating the
ownership contract.
Fix this by extracting and invoking any non-NULL callbacks from the
closure stored in buf->user_data before releasing the buffers. The
callback is invoked with err=-ESHUTDOWN, making this path analogous to
process_unack_tx: both drain queues of unsent PDUs when transmission
becomes impossible due to external events (channel deletion vs connection
disconnect). The only difference is the buffer lifecycle stage - in
l2cap_chan_del, PDUs are still in tx_queue (closure in buf->user_data),
while in process_unack_tx, they've progressed to tx_pending (callback in
bt_conn_tx struct).
Note: conn_tx_destroy() cannot be used here because no bt_conn_tx struct
has been allocated yet - the closure is still in buf->user_data.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Document the ownership contract and callback semantics for L2CAP
transmission buffers:
- Extend tx_queue documentation in bt_l2cap_le_chan to explain SDU/PDU
storage, callback handling, and transmission order semantics
- Document bt_l2cap_create_frag responsibilities regarding callback
invocation after HCI Number of Completed Packets or on disconnect
- Document bt_l2cap_send_pdu callback contract: invoked exactly once
after transmission completes or with -ESHUTDOWN on disconnect
These documentation additions clarify the requirements for proper
buffer lifecycle management and callback invocation throughout the
L2CAP transmission path.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This PR adds support for glyph c6 board based on esp32c6.
Tested using blinky,hello world and button.
Adapted from esp32c6_devkitc
Signed-off-by: Muhammed Asif <asifp3104@gmail.com>
fix(coap_link_format): Correct parameter constness in func signature
For function coap_link_format:coap_well_known_core_get_len()
the request parameter is declared to be a pointer-to-const,
but the const is missing for one of the two function definitions,
that are chosen via CONFIG_COAP_WELL_KNOWN_BLOCK_WISE.
With this fix the code also compiles when enabling
CONFIG_COAP_WELL_KNOWN_BLOCK_WISE.
Signed-off-by: Felix Kolbe <felix.kolbe@gmail.com>
Adds simplified i2s test for the following platforms:
- esp32_devkitc/esp32/procpu
- esp32s2_saola
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Optimizes i2s_esp32_stream_data and i2s_esp32_stream_conf structs and adds
property sanity check according to soc series based on SOC_GDMA_SUPPORTED
feature
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Allows to defer processing of an empty tx queue when tx_callback is
executed. This prevents error conditions if the tx dma interrupt is
generated too early, as occurs with esp32 and esp32s2.
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Reworks i2s_esp32_read() and i2s_esp32_write() to allow consistent use of
stream->data->state
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Deprecate the CONFIG_XOPEN_STREAMS Kconfig option in favour of
CONFIG_XSI_STREAMS, which matches the naming conventions of other XSI
Kconfig options and the actual Option Group name in the specification.
Please use CONFIG_XSI_STREAMS instead.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
CONFIG_XOPEN_STREAMS does not follow the pattern of other XSI Option
Groups, where the Option Group name is not the same as the feature
test macro that indicates it is supported by the implementation.
Deprecate CONFIG_XOPEN_STREAMS and rename it to CONFIG_XSI_STREAMS.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/\
V1_chap02.html#tag_02_01_05_09
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add notes in the migration guide that users should no longer include
`<zephyr/posix/time.h>` or `<zephyr/posix/signal.h>`, and to include
them in the standard paths, along with `<limits.h>`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A Kconfig options for the SiSDK Protocol Crypto library, which provides
accelerated cryptographic primitives using the RADIOAES peripherals for
Series-2 devices.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Add build test configuration for renesas_lvd on Renesas RA boards
that currently support the comparator driver on LVD.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
On several boards, such as the Arduino Giga and
Portenta H7, they are often times setup with their
camera buffers and potentially video buffers in
SDRam. This can lead to a significant number of
DMA errors, which currently stops the camera from
returning any additional frames.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Forward the get_selection and set_selection APIs
to the camera objects, to allow some of the
selections to be supported at the camera level.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Implements the set_selection and get_selection APIs,
if forwarded to it by a camera controller.
It uses the new messages
to allow you to set a crop window on top of the
current format window. It also then allows you
to move this crop window around in the frame
window.
With this driver I also updated it to allow any resolution
from the displays min to max limits.
static const struct video_format_cap fmts[] = {
GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
VIDEO_PIX_FMT_RGB565),
GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
VIDEO_PIX_FMT_YUYV),
When the resolution is set, it computes the scale factor.
Using the set_selection(VIDEO_SEL_TGT_CROP) allows you
define a crop window within the format window.
It clamps the ratio to a max of 3 as some other
drivers limit it saying it helps with frame rates.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
The long-term goal of the Zephyr project is to rely exclusively on PSA
Crypto API for the crypto support. In parallel Mbed TLS is going to remove
legacy crypto support from the next (4.0) release.
Therefore this commit deprecates CONFIG_FLASH_AREA_CHECK_INTEGRITY_MBEDTLS
and it also updates the migration guide document about this change.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This adds the shield definition for the Adafruit INA228 Power Monitor.
It connects to boards using the STEMMA-QT interface.
Product photo from https://learn.adafruit.com/assets/125551, with the
license CC BY-SA 3.0
Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
Use PM device runtime API is it is enabled to power up the receiving
UART during the test.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Use SMF_CTX() in SMF unit tests instead of (struct smf_ctx *) casts for
clarity and consistency. No functional change.
Signed-off-by: Vlad Kulikov <vlad_kulikov_c@pm.me>
Previously, the `sigev_notify_function` field was missing from
`struct sigevent`. Additionally, `sigev_notify_attributes` were
incorrectly named `sigev_thread_attr`.
Add it back to ensure that we are able to support realtime signals.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
In order to avoid warnings, declare `union sigval` ahead of
`struct sigevent` and declare `siginfo_t` ahead of `struct sigaction`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A previous typo went undetected that declared a type-defined
`sigevent_t`, which is obviously incorrect, since it is only specified as
`struct sigevent`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A previous typo went undetected that declared a type-defined
`timespec_t`, which is obviously incorrect, since it is only specified as
`struct timespec`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
C11 requires `<time.h>` to define `struct timespec`, so do not define
it when C11 is already known.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Avoid redefining `time_t` by always including the definition from
`<time.h>`, since the C library may use something other than `long`.
This is still safe according to the specification, since it explicitly
states:
> Inclusion of the <signal.h> header may make visible all symbols from
> the <time.h> header.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Indicate that C library headers have declared `struct sigevent` and
`struct sigval` to avoid redefinition warnings / errors.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The documentation build shouldn't need to pull in anything beyond what's
active by default in the west.yml manifest. In fact, due to the way the
manifest_projects_table.py script currently works, it is important that
have a local west config that's "vanilla" so that the table of
active/inactive projects is correct.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The sidebar used for the "wikipedia"-style card in the documentation
pages of board is actually something that is worth reusing elsewhere
so move the corresponding styles from board.css to global custom.css
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Issue was that the gpio interrupt was happening before the work item was
initialized, and then trying to schedule it, resulting null pointer
dereference and fault occurring.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
These busy waits were only introduced during a debugging exercise and
not supposed to have made their way into mainline.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
In case of hardware controlled CS pins the SPI context must be
initialized after the clock and pin control have been initialized.
Otherwise, corresponding STM32 LL operations would access a SoC
functional unit that is not yet supplied with a clock and fail
silently without error handling.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Product photo from https://learn.adafruit.com/assets/99220
with the license CC BY-SA 3.0
The bindings file for the sensor does not give any guidance on the
"repeatability" property, so I did choose "high".
Tested with the SHT40 and SHT41 shields (not SHT45).
Compile-testing of the overlay file is done via the dht_polling sample.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Clarify that the rule applies to APIs being introduced to Zephyr, and it
is not necessarily retroactive to apply to existing APIs.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Updated CMakeLists.txt to use bins directly with whd-expansion.
Updated Kconfig.airoc to include CYW55513UBG_SM.
Updated west.yml to latest hal_infineon revision.
Signed-off-by: Chaitanya Gaikwad <ChaitanyaSandeep.Gaikwad@infineon.com>
For devices that need an erase before a write, ZMS do not verify that
the next available location in the open sector is filled with the
erase_value.
Fix this by adding a check at init.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Add driver for Allegro Microsystems ALS31300 3-axis linear Hall Effect
sensor. The driver supports:
- I2C communication interface
- X, Y, Z magnetic field measurements
- Device temperature readings
Signed-off-by: Fabian Barraez <fabianbarraez@gmail.com>
These changes enhance the driver's compatibility with the STM32U5 series,
enabling its use in applications requiring MIPI.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
These additions enhance the flexibility of the MIPI DSI host configuration
for STM32U5 series, enabling finer control over the DSI PLL and PHY
settings.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Add a new Kconfig symbol MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS to wrap the
Mbed TLS configuration option with the same name. Built-in key
support enables platforms implementing
mbedtls_psa_platform_get_builtin_key() to use keys derived from a
hardware unique key or stored in a secure element.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Initial version of the support for the STM32 JPEG HW codec,
currently supporting only NV12 to JPEG without DMA support
and using SW based conversion from NV12 to MCU required
for the JPEG codec.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Update the temperature data processing to
handle different data sizes based on FIFO configuration.
The temperature sensor data size and conversion
formula vary depending on the FIFO mode:
1. FIFO disabled: Uses 20-bit data format
2. FIFO enabled (standard resolution): 16-bit data
3. FIFO enabled (high resolution): 20-bit data
The implementation now:
- Uses the 'fifo_highres_enabled' flag
to determine the correct data size
- Applies the appropriate conversion formula
based on the resolution mode
- Handles all three possible FIFO configurations
- Ensures accurate temperature readings in all modes
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
Document that CONFIG_CLOCK_STM32_HSE_CLOCK is no longer user-configurable
and the replacement mechanism for setting its value (through Device Tree).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Ensure the CONFIG_CLOCK_STM32_HSE_CLOCK symbol cannot be overridden by
making it depend on the Device Tree node "clk_hse" being enabled. The
symbol's value is also directly sourced from that node instead of being
user-configurable.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Provide the HSE clock frequency by enabling and configuring its Device Tree
node in the board's DTS instead of using Kconfig.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Provide the HSE clock frequency by enabling and configuring its Device Tree
node in the board's DTS instead of using Kconfig.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
SDHC support was disabled in commit
e67470933a2005d82bfa3a7f0328196a139b2cc0 due to unresolved runtime
twister failures observed after rebasing adi-main to Zephyr v4.1,
however the feature was still left in the board's list of supported
features. This caused twister to continue selecting
tests/drivers/disk/disk_performance for the board, which fails to build,
and thus continued failures in ci. It was mainly observed on push events
because recent PRs haven't changed anything in this area.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Some SDHC related tests fail on CI checks when
rebase adi-main on to Zephyr v4.1 release
candidate.
This commit disables SDHC until the problem is
solved.
Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
Add ethernet DMA buffer/descriptor region (sram2) and read only
flash region 0x08FFF800 with unique device ID registers to MPU region
list. The unique device ID is used to create a random mac address by
the ethernet driver. Ethernet DMA buffer/descriptor memory section is
also added to linker script.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Add SOC_SERIES_STM32H7RSX to applicable Kconfig parameters and enable
use of .eth_stm32_desc and .eth_stm32_buf linker sections for ethernet
dma.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
currently Kconfigs in stepper area are not uniformly organized
some folders have config while the others follow menuconfig
Also without having activated drivers explicitly following
Kconfigs appear in autoconf.h
CONFIG_STEPPER_ADI_TMC 1
CONFIG_STEPPER_ADI_TMC50XX_RAMPSTAT_POLL_INTERVAL_IN_MSEC 100
CONFIG_STEPPER_ADI_TMC51XX_RAMPSTAT_POLL_INTERVAL_IN_MSEC 100
CONFIG_STEPPER_ALLEGRO 1
refactor Kconfig.tmc51xx to tmc51xx folder
refactor adi_tmc bus related Kconfigs in adi_tmc/bus
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Creation of the zephyr/samples/net/openthread/shell/boards to support
the MCXW7x boards components.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
Add retained memory driver for BURAM on Silicon Labs Series 2
devices. This is a 128-byte register-based backup memory available
in all power states.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Parallel build for Doxygen has been available since v1.9, and allows to
claim a few seconds off the build time (only the input processing can be
done in parallel, but that's still a noticeable performance
improvement).
Set NUM_PROC_THREADS to 0 to use as many cores as available on the
system (21 seconds build-time down to 16 on my machine).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add PM support to cc23x0 SPI module. This implies listing states which
cause power loss and enabling device runtime PM for the DMA in the DT.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Provide default values for common kconfig symbols for main, idle and
isr stack sizes, which apply on all STM32 MCU families with low RAM
memory(less than 8 KiB).
These kconfig symbols help reduce kernel sizes to fit within
limited RAM.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This driver adds support for the Infineon FM25XXX series of chips.
Has been tested on Infineon FM25CL64B-G.
Signed-off-by: Luna Pes <zephyr@orangemurker.com>
Move the watermark threshold trigger mode to a configurable dt boolean.
When using the default configuration of watermark threshold
interrupt greater than or equals, extra interrupts are serviced
to icm45686_event_handler().
When `fifo-watermark-equals;` is added to the sensor DT overlay,
the new behavior is only one interrupt is generated per watermark
threshold crossing. Until the host drains the fifo, no extra interrupts
will be generated.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
When compiling with C++ enabled (CONFIG_CPP), add an unused member to
prevent an empty struct; this makes the struct size the same for both C
and C++.
Fixes the following warnings:
In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:32:
In file included from include/zephyr/kernel_structs.h:29:
In file included from include/zephyr/arch/structs.h:29:
include/zephyr/arch/riscv/structs.h:11:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
11 | struct _cpu_arch {
| ^
In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:36:
In file included from include/zephyr/arch/cpu.h:25:
In file included from include/zephyr/arch/riscv/arch.h:18:
include/zephyr/arch/riscv/thread.h:68:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
68 | struct _thread_arch {
| ^
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
When Mesh is built without CONFIG_BT_SETTINGS and with CONFIG_ASAN
(and CONFIG_NO_OPTIMIZATION), the call to bt_mesh_settings_set is not
optimized out. Since settings.c isn’t compiled when CONFIG_BT_SETTINGS
is disabled, the linker reports an undefined reference.
Guard the call with !IS_ENABLED(CONFIG_BT_SETTINGS) so the call and the
subsequent code is compiled out when settings are disabled.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When building with the address sanitizer and size optimizations some of
the mbedtls assembler fails to build, with an error like:
error: ‘asm’ operand has impossible constraints or there are not enough
registers
Avoid this issue by forcing speed optimizations for this problematic
file if any optimization is chosen.
A similar fix was originally introduced in the module:
https://github.com/zephyrproject-rtos/mbedtls/commit/4f1e8f5a78d
but it seems to have stoped working when the content of the file was
moved.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The generated docs for building this sample suggested using
`-DCONF_FILE=overlay-tunnel.conf`, but that was just an artifact of
using the `:conf:` directive in the kind of generic app-command.
Without specifying `-DEXTRA_CONF_FILE=overlay-tunnel.conf`, which
also pulls in `prj.conf`, there were a few build errors.
Update the docu to provide a concrete example of building for
`native_sim` with `:gen-args: -DEXTRA_CONF_FILE=overlay-tunnel.conf`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit addresses an issue where the IMU interrupt is enabled too
early by the nxp_nbu driver, this leads to a race condition where the
interrupt can be triggered even though the IMU driver is not fully
initialized.
The interrupt shall not be enabled at Zephyr level since this will
be done by the low level driver in the hal_nxp.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Update hal_stm32 to include
- fix for compiling for STM32H5 with clang
- ale/cle pin definitions for FMC peripheral
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add initial support for Nuvoton NuMaker-M333x SoC series,
including basic initialization and device tree includes.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Adds a sample which demonstrates how to use DTLS over UDP. This
copies the certificate files from the echo server sample to use as
dummy certificates
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Issue:
- The calibration value had the correct elements but false operations
- This leads to wrong values or even saturation
Changes:
- Added explenation of formula
- Moved constant from MACRO into formula to get rid of the
confusing 10000000ULL constant
- Added rounding for better results
Signed-off-by: Martin Koehler <koehler@metratec.com>
Button 0 and LED 0 share a GPIO pin on slwrb4311a. Remove the
`led0` alias in a board overlay to make the button sample work
out of the box.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add SLWRB4182A, a radio board for EFR32MG22, as well as SLWRB4311A,
a radio board for BGM220. The boards have similar pinout, but with
some differences to the LED and enable pins.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add bg22_ek4108a board definition for the EFR32BG22 Explorer Kit.
The board has similar pinout to the other xg22 explorer kits.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Move to explorer_kits directory, share configuration between
bgm220_ek4314a and xg22_ek2710a, as their pinouts are similar.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Reset cause API was expanded with two more reset causes.
These are RESET_BOOTLOADER and RESET_FLASH.
Add handling of RESET_BOOTLOADER and RESET_FLASH to reset_cause test.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add support for WeAct Studio ESP32-C6 Mini development board.
The WeAct ESP32-C6 Mini is a compact development board based on the
ESP32-C6FH4 chip (QFN32 package) with 4 MB in-package flash. This
board features complete Wi-Fi 6, Bluetooth LE 5.3, Zigbee, and Thread
support.
Key features:
- ESP32-C6FH4 chip (RISC-V 32-bit, up to 160 MHz)
- 4 MB in-package flash
- 22 GPIOs
- USB Type-C connector with USB Serial/JTAG
- Boot and reset buttons
- RGB LED
Unlike the ESP32-C6-DevKitC which uses the ESP32-C6-WROOM-1 module,
this board has the ESP32-C6FH4 chip directly mounted in QFN32 package.
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
The net capture sample is likely one application that does rely on linking
against the native C library rather than Picolibc, since it needs to hook
into Linux's tun / tap interfaces.
However, after removing `<zephyr/posix/...h>` from the default search
path, a number of conflicts appear between the native libc socket types
and Zephyr's in `net_ip.h`.
Issue 97050 already captures this partially. However, there seems to be
some confusion about POSIX headers and types and ISO C headers and types.
There are C libraries that do not include all of the necessary POSIX
headers and types that Zephyr depends on. For example:
* minimal libc
* IAR
* newlib
* picolibc
The latter two might surprise some.
In any case, the work required to properly namespace `net_ip.h` constants
and types is well out of the scope of the current release cycles, so this
small workaround should suffice.
A non-exhaustive list of constants and types from `net_ip.h` that conflict
with native types are
* PF_INET
* PF_INET6
* PF_PACKET
* PF_CAN
* PF_LOCAL
* SOCK_STREAM
* SOCK_DGRAM
* SOCK_RAW
* struct iovec
* struct msghdr
* struct cmsghdr
* struct sockaddr
* struct sockaddr_storage
A non-exhaustive list of errors that arise are of the form(s) below:
```shell
In file included from $HOME/../zephyr/net/ethernet.h:21,
from $HOME/../samples/net/capture/src/main.c:15:
../zephyr/net/net_ip.h:45: warning: "PF_INET" redefined
45 | #define PF_INET 1 /**< IP protocol family version 4. */
|
/usr/include/bits/socket.h:45: note: this is the location of the previous \
definition
45 | #define PF_INET 2 /* IP protocol family. */
|
In file included from /usr/include/bits/socket.h:38:
$HOME/zephyrproject/zephyr/include/zephyr/net/net_ip.h:89:9: error: \
redeclaration of enumerator ‘SOCK_STREAM’
89 | SOCK_STREAM = 1, /**< Stream socket type */
| ^~~~~~~~~~~
/usr/include/bits/socket_type.h:26:3: note: previous definition of \
‘SOCK_STREAM’ with type ‘enum __socket_type’
26 | SOCK_STREAM = 1, /* Sequenced, reliable,...
| ^~~~~~~~~~~
$HOME/zephyrproject/zephyr/include/zephyr/net/net_ip.h:250:8: error: \
redefinition of ‘struct iovec’
250 | struct iovec {
| ^~~~~
In file included from /usr/include/sys/socket.h:26:
/usr/include/bits/types/struct_iovec.h:26:8: note: originally defined here
26 | struct iovec
| ^~~~~
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The bluetooth hci on silabs siwx91x depends on the nwp
(network coprocessor). This patch allows to check for the correct
initialization of the nwp before using bt hci on siwx91x.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The goal of this patch is to switch from the nwp.c and nwp.h soc files
to the new nwp driver. During this transition, we also renamed
CONFIG_WISECONNECT_NETWORK_STACK to CONFIG_SILABS_SIWX91X_NWP which are
a better naming to let the user knows that the network coprocessor files
will be added to the compilation.
The switch from a soc file to a driver device introduce a notion of nwp
device that allows us to check for good initialization and ressources
allocation.
Before this patch, it is not possible to know if the nwp have booted
successfully or not. We can now check if the device driver is ready
or not before trying to do operation related to the nwp.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The firmware interprets the client idle timeout in units of 32 beacon
intervals, not in milliseconds. This mismatch caused the applied timeout
to be higher than the configured value.
Fix the driver to use the correct unit.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Added pinctrl and dts nodes for uSDHC1 and uSDHC2, they are disabled
by default, and provided overlay files to enable them if needed.
Signed-off-by: Lei Xu <lei.xu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Update release-notes about the following additions:
- CONFIG_PSA_CRYPTO
- CONFIG_PSA_CRYPTO_PROVIDER_TFM
- CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS
- CONFIG_PSA_CRYPTO_PROVIDER_CUSTOM
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove previous Kconfig choices CONFIG_BT_MESH_USES_MBEDTLS_PSA and
CONFIG_BT_MESH_USES_TFM_PSA and use CONFIG_PSA_CRYPTO instead.
This commit also updates test code accordingly.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The goal of new Kconfig PSA_CRYPTO_PROVIDER is to automatically enable
any of the PSA Crypto API provider available for the platform without
having the user to manually pick the proper one. This provider can be
either TF-M, if that's enabled in the build, or Mbed TLS otherwise.
PSA_CRYPTO_PROVIDER simplifies also modules/subsystem Kconfigs removing
blocks as:
select MBEDTLS if !BUILD_WITH_TFM
select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
Kconfig PSA_CRYPTO_PROVIDER_CUSTOM is also added to allow the end user
to add a custom implementation of PSA Crypto API instead of TF-M or
Mbed TLS ones.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The driver code only relies on legacy Mbed TLS crypto, not on PSA API, so
enabling MBEDTLS_PSA_CRYPTO_C is not needed here.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The dependency should be PSA_CRYPTO_CLIENT and not
MBEDTLS_PSA_CRYPTO_CLIENT because the former is more generic. TF-M can
indeed provide PSA Crypto API, not only Mbed TLS.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The function `log_backend_std_get_flags` was not documented.
Create a doxygen style documentation for it.
Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
Refactor internal event bits to use state enum values
and define set_state() and wait_state() so we don't need
two set of variables to maintain.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Fix for collecting and presenting measured data.
During verify measured values, the test skipped all results
after the first incorrect one. Furthermore, it duplicated
already collected data on the output list. So in this case the
result list include wrong data.
Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
From the analysis of the the masurments so far it follows that
the expected value of the state_1 is too hight.
Change expected value of state_1 from 0.14 to 0.12.
Regarding the test:
tests/subsys/pm/power_states
Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
The `/connector` node conflicts with
`boards/raspberrypi/rpi_pico/rpi_pico-common.dtsi` definition.
Renaming it to `connector_arduino` to avoid conflict with that.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
soc_prep_hook() is always called from z_prep_c() which is implemented
as a C function. As such, there is no need to check for the associated
CONFIG_SOC_PREP_HOOK since the platform/hooks.h header will define hooks
as no-op function-like macros if their associated Kconfig isn't enabled.
Remove the Kconfig check from all arch implementations of z_prep_c() and
call soc_prep_hook() directly instead, to avoid duplicating the Kconfig
check already performed in platform/hooks.h
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Document the expected early boot sequence and when platform hooks should be
called by the arch-specific coode, and under what conditions.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Clean up the top-level comment in the platform hooks header which is used
when generating documentation:
- capitalize "soc" as "SoC"
- capitalize "zephyr"
- simplify "soc and board specific" -> "SoC/board-specific"
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The hooks' signature was not visible to Doxygen due to preprocessor
conditionals - instead, the dummy no-op implementation was seen instead.
Update #ifdef guard to make the hooks' signature and the associated
documentation visible to Doxygen such that it appears in docs.
Also fix a tiny typo on soc_reset_hook()'s documentation comment.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add DSA Qbv support, add set_config/get_config to set and get
Qbv configuration. support enable/disable, set/get times,
set/get list length and set/get gate control list.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
Add NET_QBV in Kconfig, Qbv is Enhancements for Scheduled Traffic (EST),
one feature of TSN. The PTP clock provides the time reference for Qbv
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
Use THREAD_ANALYZER_LONG_FRAME_PER_INTERVAL config to reset
longest frame value to zero after printing so that longest frame
now represents longest frame for the most recent interval. The
longest overall frame is often at startup and this modification
allows one to observe subsequent long frames.
Signed-off-by: Jay Lawlor <jlawlor@amperecomputing.com>
Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
This commit excludes it8xxx2_evb platform for gen_isr_table
test since it8xxx2 soc don't support software triggering
interrupts.
Fixes issue #94382.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Replace CONFIG_PM with CONFIG_PM_DEVICE to include pm_lock
in cc23x0 UART driver in struct uart_cc23x0_data
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
In power management, add support to take into account the alarms
set in RTC. Alarm from RTC is processed like any other from SYSTIM.
This prevents from missing interrupts.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Add conditonal definition for RTC and SYSTIM with different
values for both of them respecting clock speed and ticks
per minute.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
In case RTC is used for system timer, it should not be used
as counter device. Dependency restricts counter driver to work
only with SYSTIM.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
This patch fixes a slip_get_mac() call in the wrong place, which was
causing the MAC address set in Kconfig not to be used.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Allow to use both partition and subpartition names when suing the
flash_map API.
That way it is possible to introduce a hierarchy within DTS in a
backward compatible way.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Currently the DT_FIXED_PARTITION_ADDR as well as
DT_FIXED_SUBPARTITION_ADDR works only for partitions under the
soc,nv-flash -compatible nodes.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
The DT_MTD_FROM_FIXED_SUBPARTITION must go one level more than the
DT_MTD_FROM_FIXED_PARTITION counterpart.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
fixes bugs in setting of correct WCH classification abbreviations.
Required for future CH32V307 support.
Signed-off-by: James Bennion-Pedley <james@bojit.org>
1. update hal_nxp to mcux sdk 25.09.00
2. Updated imxrt7xx part numbers to align with SDK.
3. Fixed typo in member of dsi_transfer_t structure. The sendDscCmd
and dscCmd shall be sendDcsCmd and dcsCmd.
4. Remove the call to the function 'CLOCK_OSC_GateOscRc400M'. This
function has been removed from the SDK.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add __printf_like attribute to ztest assertion functions
zassert, zassume, zexpect to validate format strings and arguments
at compile time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Correct b_u585i_iot02a board DTS overlay file DMA lists that was not
split by phandle and seemed to form a unique phandle. This is not
currently an issue with existing DT parsing macros and tools but may
generate build errors if tools are more strict on the DTS implementation
format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct STM32 boards DTS overlay files DMA lists that were not split
by phandle and seemed to form a unique phandle. This is not currently
an issue with existing DT parsing macros and tools but may generate
build errors if tools are more strict on the DTS implementation format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct STM32 boards DTS overlay files DMA lists that were not split
by phandle and seemed to form unique phandles. This is not currently
an issue with existing DT parsing macros and tools but may generate
build errors if tools are more strict on the DTS implementation format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct b_u858i_iot02a DTS overlay file DMA lists that was not split
by phandle and seemed to form a unique phandle. This is not currently
an issue with existing DT parsing macros and tools but may generate
build errors if tools are more strict on the DTS implementation format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct stm32h573i_dk DTS overlay file DMA list that was not split
by phandle and seemed to form unique phandle. This is not currently
an issue with existing DT parsing macros and tools but may generate
build errors if tools are more strict on the DTS implementation format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct nucleo_wba55cg board DTS overlay file DMA lists that was not
split by phandle and seemed to form a unique phandle. This is not
currently an issue with existing DT parsing macros and tools but may
generate build errors if tools are more strict on the DTS implementation
format.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct DTS file DMA lists that were not split by phandle and
seemed to form unique phandles. This is not currently as issue with
existing DT parsing macros and tools but may generate build errors
if tools are more strict on the DTS implementation formats.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct STM32H7xx SoCs DMA lists that were not split by phandle and
seemed to form unique phandles. This is not currently as issue with
existing DT parsing macros and tools but may generate build errors
if tools are more strict on the DTS implementation formats.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct STM32H5xx SoCs DMA lists that were not split by phandle and
seemed to form unique phandles. This is not currently as issue with
existing DT parsing macros and tools but may generate build errors
if tools are more strict on the DTS implementation formats.
Clean indentation by the ways for the modified DTSI file lines.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct STM32F4xx SoCs DMA lists that were not split by phandle and
seemed to form unique phandles. This is not currently as issue with
existing DT parsing macros and tools but may generate build errors
if tools are more strict on the DTS implementation formats.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This patch (merged upstream and to zephyr fork) avoids an incorrect warning
generated by gcc 14.3 about array bounds. It should not change the
generated code at all.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For lptmr counter driver, since "prescaler" has been
deprecated and replaced by prescale-glitch-filter.
Update related setting in device tree files.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
In current code, if timer-mode-sel is 0(Timer Counter Mode),
bypass_prescaler_glitch will be 1, that makes prescaler setting
be bypassed. But this setting is very useful, especially for
long timing count.
In this patch, we update prescale-glitch-filter default value to 0,
to indicate prescaler and glitch filter are disabled, which comply
the existing devices DTS setting (prescaler = 1).
And if user sets prescale-glitch-filter properity other than 0,
we should set bypass_prescaler_glitch to false to make prescaler work,
and the clock frequence should be calculated with prescaler setting.
Update prescaler field in dt-bindings to tell developer should use
prescale-glitch-filter instead.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The lptmr0 has been enabled with default settings defined in
dts/arm/nxp/nxp_rt118x.dtsi. Enable lptmr3 to test with
designated prescaler.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The opamp addresses were wrong given the ranges translations.
This resulted in using the NS addresses on a S build.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add the description of NPU Cache (aka cacheaxi) to allow configuring
them in NPU Cache driver.
I intentionally chose this over creating a new dedicated node as
the exclusive user is NPU Cache and this could be done as part of
NPU driver initialization.
Update the NPU driver to take those into account as part of its init
routine.
Signed-off-by: Mickael Guene <mickael.guene@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add DMA nodes for MCXW7X SOC DTS.
This SOC used TRIGMUX instead of DMAMUX.
Enable EDMAv3 for the frdm_mcxw71 and frdm_mcxw72
platforms.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Co-authored-by: Declan Snyder <declan.snyder@nxp.com>
Support EDMAv3 platform that do not have dmamux or always on capability.
Therefore, memory to memory transfer is limited in this environment.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Co-authored-by: Emilio Benavente <emilio.benavente@nxp.com>
create internal bt_a2dp_init_req and bt_a2dp_init_ctrl_req to init `req`,
then the `req->status` will not be forgotten to be cleared as 0.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Define the STM32_CK48_ENABLED especially for the stm32F4 series
when ck48 node is enabled to leverage its already implemented support.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Due to the flag `BT_HFP_HF_FLAG_CLCC_PENDING` is set when receiving
the +CIEV or +CIND notification, the command `AT+CLCC` will be
pending due to the flag is not cleared.
Add a flag `BT_HFP_HF_FLAG_INITIATING` to indicate the HF
initialization is ongoing.
Add a flag `BT_HFP_HF_FLAG_QUERY_CALLS` to indicate the current calls
list needs to be queried.
Set the flag `BT_HFP_HF_FLAG_INITIATING` at the beginning of the HF
initialization. Set the flag `BT_HFP_HF_FLAG_QUERY_CALLS` instead of
setting the flag `BT_HFP_HF_FLAG_CLCC_PENDING` if the current calls
list needs to be queried and the flag `BT_HFP_HF_FLAG_INITIATING` is
set.
After the HF initialization is done, query list of the current calls
by calling the function `hf_query_current_calls()` if the flag
`BT_HFP_HF_FLAG_QUERY_CALLS` is set.
Set the flag `BT_HFP_HF_FLAG_CLCC_PENDING` if it is not set in the
function `hf_query_current_calls()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is no need to disable systimer in application level
as the restart procedure automatically handles it.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit adds the following functionality support:
1. More baudrate setting.
2. 7 bit data moded.
3. Tx (CR_SOUT) and Rx (CR_SIN) signal invert.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add test case that validates behavior of pm_policy_state_all_lock_get
and pm_policy_state_all_lock_put.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add function for getting and putting a lock for all power states.
It is much faster version of requesting 0 us latency with actual
intention to disable all power states.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Optimise the PPP frame wrapping process by performing all work inside a
single function into a contiguous buffer, instead of operating on the
ring buffer one byte at a time.
On a nRF54L15 (M33 @ 128 MHz) before the change:
```
Wrapping 1062 byte packet: ~4.1 ms
Wrapping 1355 byte packet: ~5.0 ms
```
After the change:
```
Wrapping 1026 byte packet: ~2.4 ms
Wrapping 1341 byte packet: ~3.1 ms
```
Signed-off-by: Jordan Yates <jordan@embeint.com>
DMA syscalls as they were implemented were unsafe. Accepting a void* was
never acceptable as many things could not be verified about it.
Accepting a channel identifier meant that a user mode thread could
start/stop any DMA channel which in theory could be owned by any other
driver. This shouldn't be possible.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Fix additional space in active receive states.
Add additional information when logging duplicate
broadcasts.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When cap_commander_broadcast_reception_start is called during the
handover, the failed_conn was not correctly.
It is now being set by cap_commander_broadcast_reception_start
and if that is called via handover, it will be correctly set.
If it is called via bt_cap_commander_broadcast_reception_start
then it will be cleared in case of error.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a miniscule delay to ensure the MAX32 SPI config is applied and active
before returning and initiating any transactions.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add PyOCD runner support to enable flashing and programming
the pic32cm_jh01_cpro board using the PyOCD tool.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Correct mipi_dsi_stm32_host_init() and mipi_dsi_stm32_attach()
to return a valid errno instead of mixing HAL return values and
errno return values.
Clarify HAL return value is of type HAL_StatusTypeDef and not an
int in mipi_dsi_stm32_transfer().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct stm32_ltdc_set_pixel_format() to return a valid errno instead
of mixing HAL return values and errno return values.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Not needed on Cortex-A as all code and data is in DDR
memory and there is no quickaccess section in the Cortex-A
linker script.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Add back test failure that was missed when fixing double
and redundant advertising start in
commit 7a672c05b3 ("Bluetooth: tests: bsim: Fix double
advertising in test_connect2").
Also, relates to commit 8cfad44852 ("Bluetooth: Deprecate
adv auto-resume").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Commit 76740ae added a special case to the STM32 QSPI driver to support
Microchip QSPI flash ICs, such as the SST26VF series,
which use the PP_1_1_4 opcode in PP_1_4_4 mode.
This commit adds the same special case to the STM32 OSPI and XSPI drivers.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Commits 72370b2 and ff34d57 added the requires-ulbpr
(Unlock Block Protection Register) property to the devicetree binding
for devices controlled by the STM32 QSPI peripheral, and support for
this property to the STM32 QSPI driver.
Some QSPI flash ICs (e.g. Microchip SST26VF series) require this
command to be sent before writing/erasing is possible.
This commit adds the same support to the STM32 OSPI and XSPI drivers.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
This patch adds the necessary switch option to the slip configuration
callback to enable the dynamic configuration of the MAC address of this
interface.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Updating border router configuration to increase sistem stability and
enable additional features required by Thread certification suite
-common:
Increased some thread stacks and enabled stack sentinel
Stack sentinel will be disabled once the sample will not be marked as
EXPERIMENTAL
Enabled link metrics, mac filtering, MLD reports
-nxp-wifi-rcp:
Increased number of multicast ipv6 address for conformance testing
Increased number of DNS SERVERS
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
In STM32 ADC binding, rename the possible values of the sequencer and
oversampler properties to use lowercase string, similar to the internal
regulator.
Adapts the driver and the dtsi with the new values.
Fixes a macro issue in the driver. Since the value from the dtsi didn't
start with internal_regulator_, the reconstruction of the defines by
the macro ANY_ADC_INTERNAL_REGULATOR_TYPE_IS was missing this prefix and
the comparison failed. Add a new argument to the IS_EQ_STRING_PROP to be
able to insert such a prefix.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add ARC-specific variant of kernel.common.stack_protection test that
omits frame pointers to work around GNU toolchain code generation issue.
The GNU toolchain generates FP-relative memory accesses (st r0,[fp,-8])
for local variables when frame pointers are enabled, which bypasses ARC
hardware stack checking that only monitors SP-based instructions. This
causes the test to fail with MPU violations instead of
stack check violations.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
There are some cases when OpenThread opens a sockets and doesn't choose
as default it's internal interface, this leading to usage of
platform UDP module which will then send back the packet to the
OpenThread interface. In this case, the packet should not be treated as
originated from backbone interface.
Backbone router multicast listener callback functionality is improved.
A route with a prefix length of 128 is set
and a multicast address is added for each listener registration.
OpenThread interface joins that multicast address group.
Enabled forwarding capabilities for Backbone interface.
A border router should be able to perform default packet forwarding for
destination addresses with a multicast scope greater than admin-local.
In order to achieve this, multicast routes have been added to those
addreses. [https://datatracker.ietf.org/doc/rfc7346/]
For Border Router application, `ip6_addr_cb` is not installed.
otIp6SubscribeMulticastAddress call would re-register an IPV6 multicast
address which might have been registered by an OpenThread node using
`ipmadd add` command and even if that node performed `ipmaddr del`,
the address was still present in multicast listener table. This also
led to a missing MLDv2 message with that specific multicast IPV6
address.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Some platforms do not have flash memory. The flash mpu region cannot
be created in case CONFIG_FLASH_SIZE is zero.
Signed-off-by: Yanqin Wei <yanqin.wei@arm.com>
Signed-off-by: Divin Raj <divin.raj@arm.com>
Introduce `lwm2m_set_cache_filter()` so applications can drop cached
samples before they reach the LwM2M SEND path.
Fixes#91590
Signed-off-by: Julien Vermillard <julien@clunkymachines.com>
Add notice about removal of LPTIM clock source configuration through
Kconfig in the Zephyr 4.3 release notes.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Remove the possibility to configure the LPTIM timer clock source
through Kconfig. The deprecation warning was added 3 years ago in
Zephyr 3.2 by commit bbac316be7867d44bcb9f3600fcb2e77f7237223; more
than enough time has elapsed for this option to be removed.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Combine mode is not for all TPM IP depneds
on IP version, which is necessary for PWM capture feature.
Add pre-process check and wrap
mcux_tpm_capture_data with CONFIG_PWM_CAPTURE macro.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Update the HW models module to:
c282625e694f0b53ea53e13231ea6d2f49411768
Including the following:
c282625 Fix broken link in Readme.md
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The documentation build shouldn't need to pull in anything beyond what's
active by default in the west.yml manifest. In fact, due to the way the
manifest_projects_table.py script currently works, it is important that
have a local west config that's "vanilla" so that the table of
active/inactive projects is correct.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
drivers/modem/simcom-sim7080.c is not built.
And the author indicates it was added to the tree in error.
Let's remove it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The second parameter to strtok_r cannot be null.
It is the separator strtok is meant to search for, and it is
not kept anywhere in the saved state (the saved state
is just a pointer to the next piece of the original string).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
strtok_r is a POSIX extension of string.h. To ensure this C library
header provides the prototype we need to define _POSIX_C_SOURCE.
So let's do so.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Partially revert 1bcc065224
This change impacts all other scripts that import those modules, while
those weren't updated.
It will be hard to maintain this list, whilst keeping the entire tree
compliant.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Timeout and retries for DNS lookups were hardcoded. This commit
introduces kconfig settings for the default values and functions
for runtime configuration.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Starting gnss with xtra functionality is only possible if the
validity of the xtra file was queried. Enabling xtra will be skipped
if the file is not valid
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
If a socket gets closed by the network while waiting on data
in offload_recvfrom this would hangup forever since modem_socket_wait_data
does not support timeouts. When the socket gets closed this wait is
unblocked.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
The modem handler error can not be used to transport the result
of CAOPEN since it is overwritten by the trailing OK.
Socket does not get closed forcefully when connecting failed.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Query available tx size before sending data instead of using
hardcoded number. Removed unnecessary strg+z send after data.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Connection id and pdp index were swapped. Corrected this and
hardcoded pdp index since 0 is always used as index.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Socket functions return EINVAL instead of EAGAIN when modem is
not in networking mode. Using EAGAIN could lead to a infinite sleep
loop in offload_sendmsg().
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Network and gnss can be disabled with stop functions instead of power
cycling the modem. The start functions will also not power cycle the
modem. In order to call the start functions the modem needs to be
booted.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
On first boot a fixed baudrate is set for the sim7080. This makes power
on detection more reliable.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Placed sim7080 driver in separate directory and split it in multiple
source files for better readability.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
Add documentation for regulatory domain configuration, maximum TX
power, and RTS threshold support in the SiWx91x Wi-Fi driver.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Set different default value for NXP_FW_DUMP_FLASH_START_ADDR, based on
mimxrt1060_evk board and rw612 soc.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Remove the redundant dependency of NXP_WIFI_EXTRA_DEBUG in Kconfig.
Add NXP_FW_DUMP_FLASH_START_ADDR for the start address in flash to
store FW dump.
Add NXP_FW_DUMP_FLASH_ERASE_LENGTH for the erased length in flash
to store FW dump.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add --permit-permanently-transitioning-device-to-deployed safety flag
to gen_uicr.py, required when enabling both UICR.LOCK and
UICR.ERASEPROTECT together. This prevents accidental permanent locking
of devices since this combination makes the configuration irreversible.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.APPROTECT configuration, which controls debugger
and access-port permissions through the TAMPC peripheral.
This introduces three Kconfig options that allow independent control
over access port protection for different processor domains:
- GEN_UICR_APPROTECT_APPLICATION_PROTECTED: Controls debug access to
the application domain processor
- GEN_UICR_APPROTECT_RADIOCORE_PROTECTED: Controls debug access to
the radio core processor
- GEN_UICR_APPROTECT_CORESIGHT_PROTECTED: Controls access to the
CoreSight debug infrastructure
When enabled, each option sets the corresponding UICR.APPROTECT
register to PROTECTED (0xFFFFFFFF), which disables debug access for
that domain. When disabled, the registers remain at their erased value
(UNPROTECTED), allowing full debug access.
This feature is critical for production devices where debug access must
be restricted to prevent unauthorized access to sensitive code and data.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.ERASEPROTECT configuration, which blocks ERASEALL
operations to prevent bulk erasure of protected memory.
This introduces a Kconfig option GEN_UICR_ERASEPROTECT that enables
blocking of ERASEALL operations on NVR0, preserving UICR settings even
if an attacker attempts a full-chip erase.
This is a critical security feature for production devices. When enabled
together with UICR.LOCK, it becomes impossible to modify the UICR in
any way, establishing a permanent device protection scheme. Due to this
irreversibility, it should only be enabled during the final stages of
production.
When enabled, the gen_uicr.py script sets UICR.ERASEPROTECT to
0xFFFFFFFF, which prevents the ERASEALL command from affecting the
NVR0 page.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.LOCK configuration, which locks the entire UICR
configuration in NVR0 to prevent unauthorized modifications.
This introduces a Kconfig option GEN_UICR_LOCK that enables locking
of the UICR. Once locked, the UICR can only be modified by performing
an ERASEALL operation.
This is a critical security feature for production devices, typically
enabled alongside UICR.APPROTECT, UICR.PROTECTEDMEM, and
UICR.ERASEPROTECT to establish a complete device protection scheme.
When enabled, the gen_uicr.py script sets UICR.LOCK to 0xFFFFFFFF,
which configures the NVR0 page as read-only and enforces integrity
checks on the UICR content.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.SECONDARY.PROTECTEDMEM configuration, which enables
configuration of the protected memory region for secondary firmware.
This introduces Kconfig options for configuring:
- GEN_UICR_SECONDARY_PROTECTEDMEM - Enable/disable protected memory
for secondary firmware
- GEN_UICR_SECONDARY_PROTECTEDMEM_SIZE_BYTES - Size of the protected
memory region in bytes
The implementation validates that the configured size is divisible by
4096 bytes (4 KiB) as required by the hardware, and converts it to
4 KiB units when writing to UICR.SECONDARY.PROTECTEDMEM.SIZE4KB.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.SECONDARY.TRIGGER configuration, which enables
automatic booting of secondary firmware based on specific reset reasons.
This introduces Kconfig options for configuring:
- UICR.SECONDARY.TRIGGER.ENABLE - Enable/disable automatic triggers
- UICR.SECONDARY.TRIGGER.RESETREAS - Bitmask of reset reasons that
trigger secondary firmware boot
Individual Kconfig options are provided for each reset reason:
- APPLICATIONWDT0/1 - Application core watchdog timeouts
- APPLICATIONLOCKUP - Application core CPU lockup
- RADIOCOREWDT0/1 - Radio core watchdog timeouts
- RADIOCORELOCKUP - Radio core CPU lockup
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add support for UICR.WDTSTART.
UICR.WDTSTART configures the automatic start of a local watchdog timer
before the application core is booted. This provides early system
protection ensuring that the system can recover from early boot
failures.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix an issue where it was not possible to use a console port for
receiving data when the console port was added after receiving was
already requested
Signed-off-by: Max Meidinger <mmeidinger@internships.antmicro.com>
Introduce `z_riscv_pmp_write_config` to abstract writing to pmpcfg
registers. This function handles the differing register layouts and slot
counts between RV32 and RV64 architectures, writing to the appropriate
pmpcfg0, pmpcfg1, pmpcfg2, or pmpcfg3 CSRs as needed based on
CONFIG_PMP_SLOTS.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
This reverts commit 2654845b93.
The conf file embedded within the snippet are setting sample
specific Kconfig, making its usage impossible with other
application.
Remove the snippet and introduce instead board specific
config & overlay including venc file_suffix in order to allow
future addition of other encoders available on the same
board.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Make the STM32 VENC driver depends on the VIDEO_ENCODER_H264
in order to be compiled only if VIDEO_ENCODER_H264 is
enabled by an application.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add video subsystem related Kconfig in order to allow an
application to enable encoder support.
This is useful for platforms having several video devices
available as well as several video encoders, since it allows
to only compile / enable part of those devices depending on
their kind.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The stm32n6570_dk device-tree describing the hardware available
on this board, the Video ENCoder (VENC) status should be enabled,
and its usage should be enabled or not based on the
sample / application configuration.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Match the behavior of other Adafruit boards by including the
zephyr_i2c label to allow the use of JST SH I2C shields.
Signed-off-by: Lena Voytek <lena@voytek.dev>
This adds a few tests to test switching between threads where
they are under different memory domains. This is mainly to test
if permissions are set correctly during context switch.
By default the new tests are disabled and must be explicitly
enabled. This is due to some architectures requiring some config
changes (for example, x86 needing more reserved memory domains,
and ARM64 needing more translation tables). To avoid causing
mass CI failures, only enable platforms that have been tested,
for now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The priv_stack_ptr for reading and writing tests was not set
correctly on Xtensa, and was always 0. Test would pass since
the NULL page should always generate access faults on most
Xtensa platforms. However, those tests are supposed to test
reading and writing to the privilege stack. So fix that by
populating the priv_stack_ptr correctly.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arch_mem_map() takes in some flags to describe the to-be mapped
memory regions' permissions and cache status. When the flags are
translated, they become attributes in PTEs. So for functions
being called by arch_mem_map() and beyond, rename flags to
attrs to better describe its purpose.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
In functions which manipulate both L1 and L2 tables, make
the variable names obvious by prefixing them with l1_ or l2_.
This is mainly done to avoid confusion when reading through
those functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The assert error messages when l2_page_table_map() fails are not
correct. It returns false when it cannot allocate new L2 table,
and it is not able the address having already mapped. So correct
the error message.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is simply done to conserve code space in the vector text
areas. These vector text areas are very small and we should
only put code that is absolutely necessary for interrupt and
exception entrance. The saving of PS into the thread struct
can be deferred a bit. So do that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
xtensa_asm2_s.h is not exactly a C header. Rename it to
xtensa_asm2.inc.S to clearly state that it is has assembly
code in it as its main purpose is to declare assembly macros.
This is being done to keep checkpatch.pl from treating it as
C file and complaining about non-C syntax.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the block of FPU and HIFI registers in the Base Save
Area (BSA), used during interrupts and exceptions, to the end of
the block. This is done to minimize code usage in the vector
text section. During interrupt entrance, the code stores a small
set of registers first before jumping to the long handler. When
the offset to these registers from the beginning of BSA is small
enough, the compiler will emit S32I.N instead of S32I. This
saves us one byte per store (2 vs 3 bytes). This is mainly done
to avoid overflowing the vector text area.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a function to handle DTLB multihit exception when
userspace is enabled, as this exception may be raised due to
the same page being able to accessed by both kernel and user
threads. The auto-refill DTLBs may contain entries for same
page, one for kernel and one for user under some situations.
We need to invalidate those existing DTLB entries so that
hardware can reload from the page table.
This is an alternative to the kconfig invalidating DTLBs on
every swap: CONFIG_XTENSA_MMU_FLUSH_AUTOREFILL_DTLBS_ON_SWAP.
Although this does not have extra processing per context
switching, exception handling itself has a high cost. So
care needs to be taken on whether to enable that kconfig.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When a page can be accessed by both kernel and user threads,
the autofill DTLB may contain an entry for kernel thread.
This will result in load/store ring exception when it is
accessed by user thread later. In this case, we need to
invalidate all associated TLBs related to kernel access so
hardware can reload the page table the correct permission
for user thread.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This saves the EXCCAUSE and EXCVADDR into BSA during exception.
These will then be used during exception handling. The reason
for doing this instead of reading from both registers during
exception handing is that another exception will override
the value in these register (e.g. DTLB miss). When returning to
the previous exception handler, these register no longer
contains the original exception cause and address. We need to
save it so that we are actually handling the orignal exception.
Coredump also now uses the EXCCAUSE and EXCVADDR from BSA
instead of reading the registers.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The software bits inside PTE are used to store original PTE
attributes and ring value, and those bits are used to
restore PTE to previous state.
This modifies reset_region() to properly restore attributes
and ring value when resetting memory regions to the same as
when the system boots.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
- Add support MRAM node on Renesas SoC dts layer for RA8P1, RA8T2
- Move the MRAM and SRAM resource defination to SoC dts layer
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
When using the eSPI peripheral channel for HOST_CMD,
the STS0 bit indicates that EC is busy.
To reflect this properly,
STS0 should only be set when there is actual input data to process.
This avoids falsely signaling a busy state when there is no data.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
Invalid header length and cause an integer overflow in
bt_br_acl_recv leading to undesired behavior.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
The `sched_yield()` function was originally included to facilitate the of
POSIX_REALTIME and POSIX_THREADS_EXT Option Groups in Issue 5.
It was then marked as part of the _POSIX_PROCESS_SCHEDULING Option in
Issue 6, but then was not clearly marked as part of the
POSIX_THREADS(_BASE) Option Group until Issue 7.
Moving it to `pthread.c` (and making it a function with regular
linkage rather than inline) ensures that it will be available with the
`POSIX_THREADS` Option Group.
For more information, please see `POSIX_THREADS_BASE` in
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/\
V4_subprofiles.html and
https://pubs.opengroup.org/onlinepubs/9799919799/xrat/\
V4_subprofiles.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Instantiate NRF_PLATFORM_LUMOS for all nrf lumos product,
Add NRF_SKIP_CLOCK_CONFIG kconfig to be a general kconfig
in nordic soc Kconfig, so that it can be used by other
lumos product.
Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
Don't wait indefinitely on registers instead do a timeout and
restore to the IDLE state. Further fixes an issue that errnwarn
mask got shared by multiple instances of i3c
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Changes the link close upon success to use the `prov_link_close` helper
function instead of doing it manually, as minor cleanup.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
According to MshPrt 5.4.4, The Provisioner, upon receiving the
Provisioning Failed PDU, shall assume that the provisioning failed and
immediately disconnect the provisioning bearer.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Remove myself from this area. I'm not working with this anymore and I
don't really have the bandwidth to properly review significant changes.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
stream_flash_ctx is opaque so actually ensure that Doxygen treat all its
fields as hidden from the public documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Test the behaviour of the idle timeout on native sockets. Only tests
a subset of the "active" paths to not require any external services.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Implement idle timeouts, primarily in the common connectivity library,
with individual interfaces notifying the library when the interface has
been used.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add an interface idle timeout parameter to the connectivity
binding structure. This will be used to track idle timeouts for
interfaces.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a helper macro to declare a network interface, enabling the use of
`NET_IF_GET` in the driver before the call to `NET_DEVICE_OFFLOAD_INIT`
or `NET_DEVICE_INIT`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add KConfig LOG_BACKEND_SWO_SYNC_PACKET to allow disabling SWO
synchronization packets. Useful if the SWO is used as a UART replacement
to avoid that the sync packets show up as special characters in a terminal
application.
Signed-off-by: Fabian Otto <fabian.otto@rohde-schwarz.com>
Change the npm13xx_charger fetch function to first trigger a sample
and then block until the result is available.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Add WBA65RI Nucleo board to ST wkup_pins board sample.
By the way, sort the board names in sample.yaml.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add variant 'ns' to nucleo_wba65ri board to embed TF-M in the SoC
secure world.
The flash layout is synced with the layout defined in Zephyr TF-M
integration of platform STM32WBA65I.
- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
(with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)
Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) is
not yet merged but is in under review [1].
Link: https://github.com/ARM-software/psa-arch-tests/pull/406 [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add missing low power consumption numbers in nucleo_wba65ri board
documentation. These numbers are dumped from the SoC datashhet.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Replace (R) and (TM) special charaters with |reg| and |trade|
aliases in nucleo_wba65ri board documentation file. By the way
also fix some characters case, add info and move Cortex-M description
in the overview section to prevent information duplication.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add variant ns to stm32wba65i_dk1 board to embed TF-M in the SoC
secure world. The flash layout is synced with the layout defined
in Zephyr TF-M integration of platform STM32WBA65I.
Successfully tested against a few samples and test samples:
- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
(with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)
Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) is
not yet merged but is in under review [1].
Link: https://github.com/ARM-software/psa-arch-tests/pull/406 [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Enable TFM_BL2_NOT_SUPPORTED configuration for STM32WBA65x SoC since
TF-M does not implement the BL2 boot stage for this SoC series.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add TF-M directive STM32_FLASH_LAYOUT_BEGIN_OFFSET needed to specify
the gap needed by external boot stage resources at flash beginning.
The offset tells STM32 TF-M firmware the base offset in the flash
where the several TF-M and non-secure image areas shall be located.
The CMake directive was introduced mainline TF-M commit [1] and merged
in Zephyr TF-M repository [2].
Link: fc035b874e [1]
Link: 954dc80541 [2]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Declare stm32wba65i-dk1 and nucleo_wba65ri boards support in TF-M.
Both comply with TF-M integration of platform stm/stm32wba65i-dk.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add stm32wba65i-dk1 board support with UART console, LEDs, joystick keys
using ADC channel 6.
Board YAML file does not list 'supported' tags since the board is
very similar to nucleo_wba65ri for which supported features are already
covered.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The current size_report generates "ram" and "rom" reports, but not one
showing the total of all run-time memory used (the "ram" report does not
include memory required to load the code for non-XIP boards).
Summing the existing reports does not work as it double-counts
statically initialized data.
The new "all" report shows the correct accounting of all run-time memory
used.
To support this functionality the "targets" argument has been extended
to allow multiple arguments, for example to generate all three reports:
$ size_report -k ... -z ... --output=. ram rom all
In the JSON output, the location ("ram" or "rom") is included in the
"loc" property for each symbol.
Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
1. MCXN23x edma1 has 8 channels, not 16.
2. MCXN23x edma0 and edma1 have 94 requests, not 120.
3. MCXNx4x edma0 and edma1 have 117 requests, not 120.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The `sys/types.h` header is part of POSIX, which is optional in Zephyr and
is mostly unimplemented by Zephyr's minimal C library.
Additionally, the only reason `sys/types.h` is included in `string.c` (in
the minimal libc) is because of the non-standard `mem_word_t` type.
`mem_word_t` is not used anywhere else in-tree or in modules hosted by the
Zephyr project. It is only used in `string.c` in the minimal c library.
It's definitely not specified here
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
and so does not really belong in `sys/types.h`.
Move `mem_word_t` into the minimal libc's `string.c`. If needed, it can be
removed at a later date and switched for `uintptr_t`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add initial support for the WeAct Studio STM32WB55 Core Board based on the
STM32WB55CGU6 dual-core MCU (Cortex-M4 + Cortex-M0+).
The board configuration supports:
- 64 MHz system clock from 32 MHz HSE crystal
- Console over USART1 (PA9/PA10)
- Default LED on PB2
- DFU and STM32CubeProgrammer flashing
- External SWD debugging
Bluetooth functionality requires flashing a compatible STM32WB HCI Layer
wireless coprocessor binary before use. The extended HCI binary
(stm32wb5x_BLE_HCILayer_extended_fw.bin) has been verified.
Tested with:
- samples/basic/blinky
- samples/hello_world
- samples/bluetooth/peripheral
- samples/bluetooth/beacon
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
Use information provided in the dts node for the MSPI controller
regarding maximum amount of data that can be transferred in one
packet and split the requested transfers if necessary.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add a property with which MSPI controllers can indicate their limits
on the maximum amount of data they can transfer in one packet.
Use the property for the SSI controller, for which the clock stretching
feature requires the use of the NDF field of the CTRLR1 register, which
is 16-bit wide, hence the data length limit is 64 kB.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Move the call to bt_iso_reset to before bt_conn_cleanup_all.
The reason for this is that bt_conn_cleanup_all will disconnect
all the ACL connections, which will put the CIS in a disconnecting
state, without finalizing them.
This means that if we get a num_completed_packet event between
the call to bt_conn_cleanup_all and before the BT_HCI_OP_RESET
request has been completed, we will trigger an assert in the
hci_num_completed_packets function as the CIS still exists,
but where we would already have cleaned up the pending TX
without telling the controller.
Moving the call to bt_iso_reset means that the CIS will have
been fully terminated at this point, which will prevent
the assert from happening. Since CIS depends on ACLs, this
is also the logical order for resetting them.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Commit: bf12516cb4
added several features to the NXP MCUX ADC16 driver, such as:
support for selecting the reference voltage between ADC_REF_EXTERNAL0
and ADC_REF_VDD_1. However, many NXP platforms with ADC16 previously
specified ADC_REF_INTERNAL as the reference voltage in the DT. This
caused these platforms to fail in ADC tests/examples.
This commit updates the reference voltage configuration for these
platforms to ADC_REF_EXTERNAL0. This update is backward compatible.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Fixes an issue in a board using ethernet that faults with the
default 512 byte size by doubling the default to 1KiB. The actual
size of the thread depends upon the device and application
configuration so needs to be fine tined for each application
anyhow
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Update the HW models module to:
26ed181181eed53e400db8f63fa83c566a05d971
Including the following:
26ed181 54L CLOCK: Fix: Handle clock being stopped before it is fully
started
b643b28 54L CLOCK: Account for relationship between PLLs and XO
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This doesn't try to optimize memory usage for QOS=-1 publications, because
it's easier to use existing structs and allocators instead of adding new
ones with less fields.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The publish and subscribe APIs allocate topics implicitly, but don't
support allocating predefined or short topics. Additionally, we don't want
to force using short topics in case the passed topic is 2 bytes long, in
case the user doesn't want that (e.g. because the server doesn't support
it).
So instead, we add a new API which works similar to
mqtt_sn_predefine_topic, which allows allocating a short topic before using
any of these APIs.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
- These are independent from connections since they are always valid.
- Implicitly created topics(e.g. from publish or subscribe) can't be
deleted either, so that doesn't make things worse compared to those.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
I guess a very long time ago, before `stdint.h` was included in the
minimal libc, the SimpleLink module required a full C library.
It's definitely there now, so remove the stale comment and drop the
unnecessary `select REQUIRES_FULL_LIBC`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a custom Zephyr POSIX subprofile specifically for enabling the
default features that Zephyr requires as per the coding guidelines.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The getopt sources were not formatted according to our codying style
conventions, so apply formatting rules as a separate commit.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Separate the POSIX implementation into two categories:
- Extensions to ISO C
- System Interfaces
The first category include standalone functions that generally do not
require OS support or depend on any other features within the POSIX
specification. The Option Groups that comprise this category include
- POSIX_C_LIB_EXT: e.g. strnlen(), fnmatch()
- POSIX_C_LANG_SUPPORT_R: e.g. gmtime_r(), strtok_r()
The second category includes the majority of other POSIX Option Groups
that do require OS support. The latter group may also be categorized
generally as being NATIVE_LIBC_INCOMPATIBLE, although that might
eventually become more granular.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The eventfd configuration does not need to be so deeply nested within
POSIX since it does not depend on POSIX completely.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
add static for functions and variables.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 1282bf7b8d814ef7a217c6f0c424aa4b2f34d363)
use the sizeof of struct or variable; use macro to do the data shift.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit d6d567355d08cefd1e11d88563fc300928af4972)
In the cmd result callback, save the configuration to stream if result is
success.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 9a9477fa0214f245a66e24a2edd90132293d5086)
get the avdtp error code based on Zephyr err code to make the codes more
clear.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 1d4d97fdb41791501eb63934f096bcc88cb2da81)
If the previous cmd req is triggered, the cmd fail to trigger again and
keep the previous cmd req.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit f4197d51b62799748a75c97bd0b68778185ff293)
The `a2dp` is got by `req` through CONTAINER_OF, then the if always is
true.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 24ef59d835c69a30fe8a8e6569405791532d9e0d)
avdtp defines the data format by struct, use it to fill net buf.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit a89f4eddac6f13f981f2ca0b94f07edaad104afa)
check the buf tail room before adding data to buf.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 65f8a9e03baf899684198e707170ad17817f7ce5)
In current implementation, the SLC connected event will be early
notified. It causes the SLC state of AG is not aligned with the state
of HF.
The SLC connected event should be notified after the procedure of HF
indicators is done if the HF indicators feature is supported by both
devices.
Do not notify the SLC connected event after the AG has successfully
responded with information about how call hold and multiparty services
are supported if the HF indicators feature is supported by both
devices.
Notify the SLC connected event after the procedure of HF indicators is
done.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
nRF71 supports tri-band, so, to cater both nRF70 and nRF71, rejig the
configuration and add a helper to convert from Kconfig to the interface
structs.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
CCC operation fails when no known devices exist, causing whole bus
initialization procedure to fail. Do not initialize the bus if no known
devices exist.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
A race condition occurs when the TX DMA callback is triggered before
the `dma_stat` variable is initialized to zero. This leads to
`dma_stat` being reset after the DMA TX done flag is already set.
To prevent this, move the initialization of `dma_stat` before starting
the DMA load operation.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The address resoution from RFC6763 is generally a PTR, SRV, TXT, and
an A or AAAA. Records, so this change is mainly to start drawing a
clear functional change between the DNS query shell and the DNS
service shell that should be more of a "avahi-browse" or "dns-sd"
functional style.
So, this is not a very robust implementation since it is a chain of
queries when the goal should be to get additional records from the
message itself but those changes can be added iteratively.
Basic point of this change is to show the procedure for the "browse"
- PTR service resolution
- SRV query from the result of the PTR
- AAAA (or A) from the result of the SRV
TXT records are ignored for now but should be added into this as
additional record support is extended.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Shift GPIO pad control flags by one bit so that they do not overlap with
drive strength flags.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Added pmod_serial and pmod_header node labels to EK-RA6M4 device tree
board definition, allowing compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
rename project from can_shell to stepper_shell
drivers.stepper.shell_async is a relic of the past
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
CD pin of the SDMMC on the STM32N6570-DK board was incorrectly set as
active high, but is actually active low
Signed-off-by: Sebastian Dauenhauer <info@magical.rocks>
Previously, `time_t` was only checked in some C libraries to be greater
than or equal to a 64-bit integer and it was skipped in other C libraries.
The C standard still does not make this guarantee, and other code within
Zephyr already has been changed to accomodate both 32-bit `time_t` and
64-bit `time_t`.
There really is no point in having this test, since it is inconsistent
at best.
Until Zephyr changes to a 64-bit `time_t` (e.g. `time64_t`), then there
is no guarantee of safety against the Y2038 problem.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Issue based on rebasing with in-flight changes where the callback adds
an argument on the readout transfers. Moreover, handle that result and
error if failure.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Uses an STM32U585 microcontroller.
Some drivers will need to be developed (led matrix, internal RPC)
Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Until now, the main thread preempted thread2 between k_event_post() and
k_event_test(). Then main thread consumed the event before it was tested by
thread2.
This behavior was not correct since the caller can't know the event is in
fact consumed (the CMSIS-RTOS specification says osEventFlagsSet() "returns
the event flags stored in the event")
This behavior is now fixed. So we can fix the test.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The CMSIS-RTOS specification says "The function returns the event flags
stored in the event control block".
In the original code, osEventFlagsSet() called k_event_post() and then
k_event_test(). It worked mostly fine if the thread has higher priority
than the waiter thread. In the opposite case, the event was not reported
to the user.
With the last changes, the waiter thread use k_event_wait_safe(). So, the
event is posted and consumed in an atomic way. So, the issue above happen
even if the waiter thread has a lower priority then the poster.
This patch fixes the both cases.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The CMSIS-RTOS specification says "The function returns the event flags
before clearing".
In the original code, if another thread set an event between k_event_test()
and k_event_clear(), there was a risk the function clear a flag without
reporting it to the caller:
T1 T2
k_event_test(..) == 0 ...
... k_event_post(.. 1)
k_event_clear(.. 1) ...
return 0 (while event 1 has been cleared)
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In osEventFlagsWait(), if an event raises after the call to k_event_wait()
and before the call to k_event_clear(), we may clear it while it is not
going to be report to the caller.
Reported-by: Rahul Gurram <rahul.gurram@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Coverage options deserve their own kconfig, otherwise the testsuite
Kconfig will be very crowded and difficult to read.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The DMA configurations for TX and RX were mixed-up
letting the DMA RX channel not fully configured.
This fix correctly configures the DMA RX channel
with DMA_ADDR_ADJ_NO_CHANGE.
Signed-off-by: Rémy Dziemiaszko <remy.dziemiaszko@smile.fr>
Add support for the `times()` function, which can be used to get the
number of ticks spent in "system" and "user" mode, and which returns
the "real time" that has expired, since an arbitrary point in the past.
The following invariant should always hold:
rtime <= stime + utime
The `times()` function measures time for the calling process and all
of it's child processes. In Zephyr, we don't support separate processes
(yet), so the time spent in child processes is zero.
Additionally, in Zephyr we do not differentiate between "system" time
(i.e. time spent executing kernel code) and "user" time (time spent
executing application code). We only have information on "total time"
(time spent executing code) and "execution time" (time spent executing
code plus idle time).
For now, only report utime, since it is not clear how to obtain other
values.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Set cs_is_gpio only if there is a GPIO CS, configure the CS as
a native hardware CS if not
This fixes incorrectly trying to use a GPIO CS when there isn't one
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
Replace get_last_of(init_state) with get_child_of(init_state, NULL),
and add a brief comment to avoid relying on a trivial wrapper. Also,
the wrapper name get_last_of() is not very descriptive; using
get_child_of() with an comment makes the intent more explicit.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
Add the lv_arclabel.c source file to modules/lvgl/CMakeLists.txt
so that the Arclabel widget is compiled and available in Zephyr projects.
Previously, the arclabel widget was not included, making it unusable.
Signed-off-by: Yehuda Eisenberg <yehuda@yehudae.net>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32 reset controller position argument provided to STM32_RESET()
macro sometime uses an unnecessary U suffix. Remove these useless
suffixes for this series for consistency among STM32 SoCs DTSI files.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove the useless U suffix used for STM32_RESET() macro bit position
argument in the DTS example snippet to prevent it spreads in DTS/DTSI
files while useless.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add required sample test variant to enable systematic build of
stm32f7 platform using DMA configuration.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Remove I2C and EEPROM from kv260_r5_defconfig. As they can be enabled by
the application as needed.
Fixes#97323
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Siwx91x memory controller is currently 4 times slower than expected.
Investigations point out the clock is not correct.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In the original HAL, sl_si91x_psram_init() and sl_si91x_psram_uninit() were
also in charge of configuring the pinctrl and the clocks. A workaround
have been introduced to avoid change in pinctrl but they still changed the
clock configuration.
We definitely need to expose the clock configuration to Zephyr users. The
HAL has been patched to split the sl_si91x_psram_*init() function in
smaller pieces. So it is possible to configure the devic without changing
the clock or the pinctrl. Let's use these new functions.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Added mikrobus_header, mikrobus_i2c and mikrobus_spi node labels to
da1469x_dk_pro device tree board definition, allowing compatible shield
boards to be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Restore the auto-phy config for tests which seem particularly sensitive
to timings related to this.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Make sure to consider both the new peripheral and central Kconfig options
when calculating needed TX buffers.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Remove deprecated Kconfig option usage, and replace it with corresponding
options which yield the same behavior as before.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The BT_AUTO_PHY_UPDATE option was problematic in the sense that it didn't
really allow any kind of fine-tuning of what automation is desired. In
particular, it didn't allow specifying which PHY was the preferred one (it
was hardcoded to 2M) and also didn't allow specifying role-specific
(central vs peripheral) preferences.
To solve this, deprecate the old option, and instead introduce
role-specific options that allow specifying 1M/2M/Coded/None as the
preference. The new options have slightly different defaults than the new:
for central role 2M stays as the preference, however since it's uncommon to
require automated changes on the peripheral side the default is set to
None there.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
There's a regression from commit 8cfad44852
which introduced trying to enable advertising twice. Remove the other
attempt.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Enables MCU-Boot default Swap mode (was overwrite only)
for the FRDM-MCXA156, after the flash program size switched
to the 16-bytes (was 128).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Those are not applied properly as subsequent overlays may (and
actually do!) overwrite some of configurations tuned in here.
Also with latest improvements in userchannel HCI driver low
buffers are handled in similar way as on real boards so no extra
tuning is needed anyway.
This reverts commit b6e7b650a2.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Fix format specifiers for zassert strings for 64-bit platforms and
32-bit platforms that use 64-bit time_t.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier only for size_t type to ensure compatibility with
both 32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Move the RAIL interrupts installer from the Bluetooth HCI driver
to the SoC layer so that it can be used by other subsystems
as well.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
- The UUID is the device unique identifier read from the
OTP and made available in boot report to avoid the repetitive
slow reads from OTP.
Signed-off-by: Aymen LAOUINI <aymen.laouini@nordicsemi.no>
Add RHX100 board target to the nsim_arc_v platform documentation.
Update supported boards list and toolchain checking examples to
include both RMX100 and RHX100 references.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add board configuration for RHX100 RISC-V processor.
Provides device tree files for RHX100 and RHX1xx series,
YAML configuration for nSIM simulator integration,
and board-specific default configuration.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add explicit PMP_GRANULARITY default value of 8 to RMX SoC configuration.
This makes the PMP configuration more explicit and easier to understand.
No functional change as RISCV_PMP was already enabled and PMP_GRANULARITY
already defaulted to this value.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Uses shorter names for the RMX SOC configuration.
Changes:
- SOC_SERIES_NSIM_ARC_V_RMX -> SOC_SERIES_RMX
- SOC_NSIM_ARC_V_RMX100 -> SOC_RMX100
Also updates board Kconfig to use the shorter names.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add device tree binding file for the Synopsys ARC-V RMX RISC-V
CPU core. This binding enables proper device tree property parsing by
the Enhanced Device Tree (EDT) system, allowing Kconfig device tree
macros to access CPU properties like clock-frequency.
The binding includes the standard RISC-V CPU properties by extending
riscv,cpus.yaml, which provides access to properties defined in cpu.yaml
such as clock-frequency.
Also removes hardcoded SYS_CLOCK_HW_CYCLES_PER_SEC from board level
and adds DT-derived value to RMX SoC level.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add arcmwdt RISC-V core/ISA mapping in target_riscv.cmake to
automatically derive compiler flags from Kconfig settings.
- Select series core flag from SoC Kconfig: -av5rmx/-av5rhx
- Map RISC-V Kconfig to ccac -Z flags (M/A/C/Zicsr/Zifencei/Zicntr)
- Handle compressed logic correctly: -Zc or individual Zc* sub-extensions
- Add F/D and compressed FPU (-Zf/-Zd, -Zcf/-Zcd)
- Add -Zmmul when M is not selected and ZMMUL is enabled
- Use OPTIONAL include to allow for arch-specific target files
Keep early compiler checks stable by not pushing -Z flags into
CMAKE_REQUIRED_FLAGS.
Co-authored-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Signed-off-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
Without this check, `spi_context_unlock_unconditionally()` is capable
to release the SPI bus semaphore (ctx->lock) which might be taken by
another SPI slave device in the meantime.
Actually, this race condition happens when `spi_release()` is called
when the SPI slave device in question (spi_cfg) has already released
its chip select and also the SPI bus lock semaphore.
So, any not required call of `spi_release()` may result in a SPI
communication issue where the SPI bus lock, held by another SPI
slave device, is prematurely released.
The observable result is the simultaneous engagement of two SPI
chip selects after such an SPI release call.
Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
bt_conn_get_info API is used to retrieve connection-related
information. However, bt_conn_get_info sends the HCI command
BT_HCI_OP_READ_ENCRYPTION_KEY_SIZE to retrieve current
key_size, causing excessive blocking time.
Signed-off-by: Xiang Liu <liuxiang18@xiaomi.com>
A helper script is added to the nrf_wifi repo for parsing and dumping
nRF70 FW stats blob.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Along with key-value pairs, add an option to dump vendor values as a
blob, use can choose either one or both.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
RX26T MCU support mapped interrupt features, add dependency config to
enable zephyr library source from hal
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Spinlocks in functions virtconsole_control_recv_cb and
virtconsole_send_control_msg were unnecessary since those were called
from virtio_pci_isr or virtio_mmio_isr, which already use spinlocks.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
There was a bug in the VIRTIO Console driver which could cause a deadlock
by attempting to add buffers to the control-tx virtqueue too fast and
with an infinite timeout.
This commit fixes it by placing messages that couldn't be sent in a FIFO
queue and taking care of them later in a callback function.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Update serial driver support for RX MCU:
- Add DTC support for SCI UART driver.
- Implementation Async APIs for serial driver.
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
Initial commit to support DTC driver on Renesas RX130.
* drivers: DTC: implementation for DTC driver on RX130.
* dts: rx: update dts node in SoC layer to support DTC on RX130.
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
Zephyr's TF-M has been aligned with upstream TF-M v2.2.0, which adds
support for Corstone-320 (CS320). The previous commit also updates TF-M
to fix compiler warnings seen with MPS4. So, with this update, enable
build and execution of non-secure variants of MPS4-based boards.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
The TF-M requirements document contained a hard-coded list of Python
packages which is incomplete and can easily drift out of sync with the
TF-M project. Replace this list with a reference to TF-M’s own
``tools/requirements.txt`` so that all required dependencies are covered.
Also update the list of boards that support TF-M.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
What is the change?
Split and redefine the DDR4 device tree nodes, in their respective board
variants so that linker scripts automatically generates a memory section
for each node.
Why do we need this change?
According to the official memory map of Corstone-320 available here:
https://developer.arm.com/documentation/109760/0000/SSE-320-FVP/SSE-320-FVP-memory-map
the non-secure world alias of DDR4 starts at 0x6000_0000 and
the secure world alias starts at 0x7000_0000.
Previously, the shared DDR4 node in mps4_common.dtsi listed multiple
regions, but Zephyr generated a linker memory region **only** for the
first address (0x6000_0000). This broke samples like `tflm_ethosu`,
on Corstone-320, which expect DDR4 memory region to start at 0x7000_0000
for secure variants of the MPS4 board.
Moving DDR4 definitions to per-board dts files ensures Zephyr creates
correct memory regions for each variant.
This also makes all the DDR4 regions available for applications to use
not just the first (applications would otherwise have to use some linker
magic to make those regions available in linker script).
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
when ep is configured, the ep is used by the avdtp session, so combine
them together when ep is configured.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
ep->stream is cleared when stream l2cap is released, it should not be
cleared by close and abort cmd procedure.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
When signal l2cap is disconnected, use `release_work` to release the
related stream l2cap connections. When releasing the sep's stream l2cap,
use `delay_work` to check the stream l2cap disconnecting result.
Move the stream l2cap disconnecting callback to sep because the chan is
in sep, then use this callback to indicate the sep stream chan is
released and sep is idle.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The `released` callback is enough indicate that the stream is
invalid/released, so remove the `aborted` callback.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The C/R bit in the address field should be handled as explained
in 5.2.1.2 in the spec (3GPP TS 127.010).
To detect if the frame is a command or a response,
we need to know who was the initiator of the CMUX channel.
> Initiator is the station that take the initiative to initialize
> the multiplexer (i.e. sends the SABM command at DLCI 0 )
See the table from given section of the specification.
Also, on UIH frames 5.4.3.1 says
> The frames sent by the initiating station have the C/R bit set to 1
> and those sent by the responding station have the C/R bit set to 0.
NOTE: This is different than a C/R bit in the Type field.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The shell history initialization function doesn't work in if the shell
instance hasn't been created through the shell macro. This removes the
function to avoid confusion.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
The ring_buffer API was not ideal for this use case, as it is designed for
concurrent access, which is not needed here. The new implementation using
k_heap is more readable and easier to maintain.
There is a slight penalty in memory usage & effectiveness due to the
overhead of k_heap, but since this isn't a production-critical path, the
trade-off is acceptable.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
Add new command to set scanning parameters, including scan window,
scan interval, and physical interface (1M and coded PHYs).
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
Adds a very rudimentary driver for getting some entropy from the
edgelock subsystem random number generator.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
On samples startup, video buffers are being allocated in order to
hold the captured data. Currently the timeout is set to K_FOREVER,
leading to having those samples waiting forever if there isn't
enought memory available on the platform.
Considering that this is done at beginning of the sample and at
that moment there isn't reason to having to wait for the
availability of memory, the timeout is replaced by K_NO_WAIT which
will allow to have the function returning with an error if the
allocation is failing.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Keep a separate buffer for each request context instead of having a
single common buffer for the entire client context. This allows to
simplify the retransmission logic, as parallel requests will no longer
overwrite the buffer for each other. That way, we can simply retransmit
the packet w/o a need to recreate it, and thus reach to the payload
pointer or callback.
This removes the requirement to keep the payload pointer, provided to
asynchronous coap_client_req() call, valid throughout the exchange
lifetime for simple cases (i.e. no block transfer used). In case of
block transfer, this is unavoidable and needs to be documented.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use buffers instead of pointers for path and extra options provided in
the struct coap_client_request, so that the library keeps a copy of the
path/options instead of pointers. That way, the library can still work
correctly in case of retransmissions or block transfer in case when the
original path or options were automatic variables that went out of
context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Define CMUX_HEADER_SIZE macro that is 6 or 7 bytes depending on
MTU.
Remove the previous CMUX_FRAME_SIZE_MAX that was a bit misleading
as it meant only the header size without data and was fixed to 7 bytes.
Redefine new macros CMUX_FRAME_SIZE_MAX and CMUX_FRAME_SIZE_MIN which
are actually frame sizes with data included.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Ensure that common documentation snippets meant to be "literalinclude"d
in other pages are not treated as regular rst files and de facto
excluded from the documentation global toctree.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This intermediate index page is unnecessary and causes the boards that
are included in its toctree to appear in multiple toctrees, which is a
Sphinx warning.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This intermediate index page is unnecessary and causes the boards that
are included in its toctree to appear in multiple toctrees, which is a
Sphinx warning.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update hal_espressif to remove direct ROM linkage
of setjmp and longjmp calls to use the toolchain
implementations instead.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Adds the missing sample.yaml's for building these in CI and with
twister.
Fixes a build issue that came up along the way.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Removed redundant try..except around the code
and fixed a test for that code which was false positive.
Signed-off-by: Łukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Memory APS6404L does not support address shift feature.
Since it is being configured for different platforms that uses this
memory, this is cauing an error while building.
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
Revert a change that broke the stable API function shell_set_bypass.
This reverts commit 6b876dba1b.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Revert a change that broke the stable API function shell_set_bypass.
This reverts commit ad7b6aa6dd.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
fs_open and fs_opendir rely on the structures in the first param
being intialized. (The init functions are documented with the type
declarations.) This simple documentation change mentions this need
to initialize (and emphasizes it). (Users of similar APIs such as
POSIX open and opendir do not expect this initialization need.)
Fixes#97205
Signed-off-by: Paul Hepworth <paulh@vpitech.com>
Correct mdio_stm32_read() and mdio_stm32_write() to return a valid errno
instead of mixing HAL return values and errno return values.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add missing empty line between local variable definitions and
instructions in eth_stm32_set_mac_config().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean tests on HAL_ETH_SetDMAError() and HAL_ETH_GetDMAError() return
value to explicitly test against 0.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disabling the internal regulator is immediate so there is no need to check
the state of the Enable bit in the register.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use the new differential support property instead of relying on the series
name to determine if the ADC supports differential input channels.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use the new channel preselection property instead of relying on the series
name to determine if the ADC channels need to be preselecting.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use the new deep powerdown property instead of relying on the series name
to determine if the ADC needs to be be put out or into deep powerdown mode.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use the new internal regulator property instead of relying on series name
to determine if the regulator should be enabled, and how to check that it
is ready.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For managing the CCRDY flag, rely on the presence of the LL constant
LL_ADC_FLAG_CCRDY rather than a list of series.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Fill out all ADC nodes of all STM32 with the new properties that apply to
them.
Also moves the status at the end of each node.
Also fixes ADC2 and 3 nodes for STM32F103 and ADC3 node for STM32L471 that
were missing some required properties.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add a bunch of new property for the STM32 ADC in order to simplify the
driver. All these properties are hardware-specific and should not be
modified by users.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for SMBus packet error checking (PEC) to the stm32 driver.
This feature allows SMBust communication to be slightly more robust in
the presence of noise, in that packet errors can be detected on the
receive side.
Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add tests for SMBus packet error correction (PEC). The two primary
utilities tested are
* smbus_pec(): compute the PEC byte for a Block Write
* smbus_read_check_pec(): verify a PEC after
* Read Byte
* Read Word
* Block Read
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
In the case that SMBus hardware does not automatically perform packet
error checking (PEC), provide generic inline functions in
`zephyr/drivers/smbus.h` that can be used by drivers to perform PEC in
software.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Move Xuantie supprot from arch/riscv/core/xuantie to the custom common
layer arch/riscv/custom/thead, with the following changes:
1. Rename Kconfig name
CACHE_XTHEADCMO -> RISCV_CUSTOM_CSR_THEAD_CMO
2. Split the original arch/riscv/core/xuantie/Kconfig to
a. arch/riscv/custom/thead/Kconfig: for T-Head extension
b. arch/riscv/custom/thead/Kconfig.core: for T-Head CPU series
(e.g. Xuantie E907)
3. Move cache line size defaults to SoC devicetree
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Update OpenISA RI5CY and Zero-RISCY CSR handling to use RISC-V custom
CSR common code. Move these stuff to 'arch/riscv/custom/openisa':
1. Rename 'soc_ri5cy.h' to 'ri5cy_csr.h' for CSR definitions.
2. Rename 'soc_zero_riscy.h' to 'zero_riscy_csr.h' for CSR definitions.
3. Move CSR context to common macro '__custom_csr_save/restore_context'.
4. Move compiler option '-march=rv32imcxpulpv2' to common code.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
CVA6 supports custom CSR. Move 'cva6.h' to 'arch/riscv/custom/cva6_csr.h',
allowing other SoCs using the CVA6 core to reuse the same CSR definitions.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
GD32VF103 uses Nuclei-specific CSR. Move 'nuclei_csr.h' to
'arch/riscv/custom' to allow reuse across SoCs with the same Nuclei core.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Egis ET171 implements Andes custom CSRs. Enable the following features:
1. Low level initialization of Andes CSRs
2. HWDSP and PowerBrake extensions with context save/restore
3. EXEC.IT extension
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
TLSR951x also supports Andes extended CSR. Reworks the following CSR
handling to use the RISC-V custom CSR common code:
1. Use common macros for HWDSP CSR context save/restore.
2. Use common macros for PFT CSR context save/restore.
3. Use common low-level CSR initialization via __reset hook.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Rework Andes-specific CSR to use RISC-V custom CSR common code.
Move these stuff to 'arch/riscv/custom/andes':
1. Rename 'soc_v5.h' to 'andes_csr.h' for CSR definitions.
2. Replace '_start' with '__reset' hook for low-level CSR initialization.
3. Move CSR context to common macro '__custom_csr_save/restore_context'.
4. Move 'EXECIT' CSR support to common code.
5. Move PMA CSR driver to common code.
6. Use RISC-V common linker.ld instead of SoC-specific linker.ld.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
RISC-V allows custom CSR implementation. Some SoCs from different vendors
may share the same core or the same custom CSR definitions and drivers.
This patch introduces 'arch/riscv/custom', which centralizes support
for custom CSRs, allowing code reuse across SoCs that come from different
vendors. Currently supported thess custom CSR:
1. Andes
2. Nuclei
3. OpenHWGroup CVA6
4. OpenISA RI5CY
5. OpenISA Zero-riscy
6. T-Head Xuantie
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Correct GT911 touchscreen reset line that is connected to GPIO E1,
not E4, on stm32n6570_dk boards. Note that GPIO E4 in connected
to SDcard data bus line D3 on that board.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Fix overriding the test certificates directory for enterprise mode
when using sysbuild. The override already works as expected without
sysbuild.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
mbedtls_ssl_get_peer_cid takes size_t, not socklen_t.
c546c1cad1
changed the type of socklen_t to something that is incompatible with native
offloaded sockets, which caused a compiler error.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Neighbor Advertisement (NA) messages without a link-layer address option
are now accepted on point-to-point links. See RFC 7066, ch. 2.2.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
Slip is naturally promiscuous, so this patch does nothing but
acknowledge that. Promiscuous mode in slip is important to allow
the interface to be added to a bridge.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch just formats the file before the real patch so that
whitespace changes do not mix with the real code changes.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Commit 539928d introduced a special behaviour for Microchip QSPI flash
memories into the STM32 QSPI flash driver, to handle the fact that these
memories use the PP_1_1_4 opcode (32H) for the PP_1_4_4 operation
(usually 38H).
The special Microchip-specific behaviour introduced in that commit sets
the address mode for a QSPI 1-1-4 write operation to 4 address lines,
rather than 1 address line, when the write command is configured as
SPI_NOR_CMD_PP_1_1_4. If the write command is configured as
SPI_NOR_CMD_PP_1_4_4, nothing is done and the operation will not succeed.
This behaviour is a bit backwards, as it results in a QSPI flash memory
configured in 1-1-4 write mode using 4 address lines (1-4-4 operation).
It should be the other way round, so that a QSPI flash memory configured
in 1-4-4 mode uses 4 address lines (1-4-4 operation).
This commit changes the Microchip-specific special behaviour to set the
opcode for the specified write mode, rather than using a different write
mode to that which is configured in order to use a valid opcode. This
means that a QSPI flash memory configured in 1-4-4 mode, or without the
writeoc DT property set (defaults to 1-4-4 for quad mode), will operate
in 1-4-4 mode. 1-1-4 mode is unsupported, as before.
Also update the Kconfig option description for
CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32 to remove references to the
Global Block Protection Unlock instruction - this was added at the same
time as the Microchip-specific special behaviour for the 1-1-4 / 1-4-4
opcode but is distinct from this and is not affected by
CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Add support for the touch input controller on the STM32H7S78-DK:
- Enable I2C1 on the board
- Add device tree node for the touch controller in the display panel
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Added three functions to support the EAD peripheral:
- Setting and storing key materials for EAD
- Encrypting data for EAD advertisements
- Decrypting data from EAD advertisements
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
The PMP initialization and thread seeding logic in arch/riscv/core/pmp.c
did not correctly handle scenarios where the global PMP entries span
across multiple `pmpcfg` hardware registers.
The `global_pmp_cfg` array, intended to store the hardware register
values, was hardcoded to size 1. This is only sufficient if all global
PMP entries fall within the range covered by the first `pmpcfg` register
(e.g., pmpcfg0). When more global entries are used, their configurations
reside in subsequent `pmpcfg` registers (pmpcfg1, pmpcfg2, etc.).
The code was only saving/restoring and checking `global_pmp_cfg[0]`,
leading to loss of configuration for entries mapped to higher `pmpcfg`
registers.
This patch fixes this by:
1. Resizing the `global_pmp_cfg` array to
`CONFIG_PMP_SLOTS / PMPCFG_STRIDE` to correctly accommodate values
from all potentially used `pmpcfg` CSRs.
2. In `z_riscv_pmp_init`, using `memcpy` to save the entire contents of
the local `pmp_cfg` array (derived from initial setup) into the
`global_pmp_cfg` array.
3. In `z_riscv_pmp_thread_init`, using `memcpy` to restore the entire
saved global configuration from `global_pmp_cfg` into a thread's
`pmp_cfg` array.
4. Updating the SMP consistency assertion in `z_riscv_pmp_init` to
compare the contents of the array element @ `index / PMPCFG_STRIDE`
of the `pmp_cfg` arrays.
These changes ensure that the configurations from all relevant `pmpcfg`
registers are preserved and correctly propagated to thread contexts.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Extend the save command to allow passing name/val pair to save a
subtree or individual setting to persistent storage.
Resolves zephyrproject-rtos#90407
Co-authored-by: Jamie <40387179+nordicjm@users.noreply.github.com>
Signed-off-by: Rami Saad <rami.saad@morgansolar.com>
psa-arch-tests includes device drivers that failed to mark
registers with 'volatile'. GCC 14.3 cleverly optimized
sequential register accesses using strd/ldrd instructions which
caused the drivers to fail.
Move the psa-arch-tests repository forward to the version which includes a
fix for this.
Signed-off-by: Keith Packard <keithp@keithp.com>
Factor out the logic for reading PMP configuration registers (pmpcfgX)
from dump_pmp_regs into a new static inline helper function,
z_riscv_pmp_read_config.
This new function encapsulates the architecture-specific (RV32/RV64)
and slot-count-specific reads of the pmpcfg CSRs, improving code
organization and potential reusability.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Apply the same CONFIG_ESPI_IT8XXX2 guard to the .h2ram_pool section
in the IT51XXX linker script, since the eSPI driver is compatible with
IT8XXX2. This keeps linker behavior consistent and avoids unused
memory allocation on non-eSPI platforms.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
The .h2ram_pool linker section was previously always included, even on
platforms that do not enable eSPI. This caused unnecessary memory
reservation in the RAMABLE_REGION for non-eSPI configurations.
Add a CONFIG_ESPI_IT8XXX2 guard around the .h2ram_pool section definition
so that it is only included when eSPI support is enabled.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This is a follow-up to commit f0f5f8cdef.
There is no need to check if TXE interrupt flag is set before
calling tx_dummy_bytes(), as the function can handle the case
when it is called even though there is no room in the TX FIFO.
On the other hand, the check may be actually harmful, as it may
prevent adding more items to the TX FIFO while the SSI controller
is waiting until the FIFO achieves its transfer start level.
Remove the check then and exit the ISR loop when no dummy bytes
could be written into the TX FIFO.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Limit the loop to the smaller of nvic_iser_nb and
GPC_CPU_CTRL_CMC_IRQ_WAKEUP_MASK_COUNT to ensure safe access.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This patch just formats the file before the real patch, otherwise
the changes would be hard to read.
The only addition was a third parameter (NULL) to all the usages
of the macro WAIT_FOR, since the dangling comma triggered conflicts
between clang-format and check_compliance.py.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
add adc0 to board dts
add adc to yaml test config
add adc default configuration to pinctrl
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
The ssd1396 shield uses an I2C interface, and the nrf5340dk board
overlay needs a bigger buffer size by default to work.
Signed-off-by: Sebastian Viviani <sebastian.viviani@nordicsemi.no>
Cast uintptr_t to unsigned long long and adjust format specifier
accordingly to ensure compatibility on both 32-bit and 64-bit
architectures.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %lld format specifier for variables of type eventfd_t. Cast variables
of type time_t to long long and use %lld format specifier to ensure
compatibility with 32-bit and 64-bit time_t.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
It's triggering on things without a flash driver or flash tag...
Disable it based on the presence of a activated flash driver.
Signed-off-by: Camille BAUD <mail@massdriver.space>
Remove FIXME and re-enable autoinitiated procedures.
Removing the configuration as bug doesn't appear anymore.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add stm32f749i_disco conf file to enable input driver
for touchscreen in LVGL samples applications.
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
Add stm32f749i_disco conf file to support samples display driver
applications . Increase the amount of HEAP to ensure
k_malloc allocation goes well.
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
Extension of support of pllsai for display configuration of stm32f469
discovery board. Enable Display panel through LTDC & DSI-HOST
blocks. Enable Touch screen. Enable FMC/SDRAM for Framebuffer.
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
Describe mipi_dsi block available on stm32f469 & above
Allow to display data on DSI panels taking output of LTDC
after serializing data.
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
All nRF development kits have long traces from the SoC to the Arduino
header. Set the drive strength on the SPI ports to high to increase the
chances that the default SPI frequency defined in shields works without
errors.
This aligns the remaining DKs with the nRF91 DKs.
Signed-off-by: Jordan Yates <jordan@embeint.com>
dt_nodelabel_int_prop did not check if the property existed on the node
before accessing it, which would result in a build-time crash (and thus
build error) if used on a node which lacked the requested property.
Fix by using the common _node_int_prop() helper which handles all edge
cases properly.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Button 0 and LED 0 share a GPIO pin on xgm240 boards. Remove the
`led0` alias in a board overlay to make the button sample work
out of the box.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add support for xGM240-RB4316A and xGM240-RB4317A radio boards
for xGM240 modules. The two boards share pinout configuration, but
have different radio and power configurations.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add support for xG24-RB4186C, a 10 dBm radio board using the
EFR32MG24 SoC. Pinout is mostly identical to RB4187C, so share
devicetree definitions between them.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Introduce xg24 directory to be able to share configuration between
rb4187c and new boards.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Lfs provide lfs_fs_gc function for some time now.
Function allow offloading of expensive block allocation scan.
Introduce lfs_fs_gc via api call fc_gc.
Signed-off-by: Maciej Zagrabski <mzi@trackunit.com>
Set the MOPL of RX and TX to `BT_OBEX_MIN_MTU` when registering OBEX
server.
Set the TX MOPL to `BT_OBEX_MIN_MTU` when sending OBEX connection
request.
Check if the MOPL of client exceeds MTU of transport when server
receives the connection request.
Check if the MOPL of server exceeds MTU of transport when client
receives the connection response.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Split the structure `struct bt_obex` into two parts.
Part 1 `struct bt_obex`, it is the common part and shared by all OBEX
sessions which share the same one transport.
Part 2 `struct bt_obex_server` and `struct bt_obex_client`. The
`struct bt_obex_server` is used to manage the OBEX session of server
role. The `struct bt_obex_client` is used to manage the OBEX session
of client role.
Add function `bt_obex_server_register()` to register the OBEX server
with specific uuid.
Add function `bt_obex_server_unregister()` to unregister the OBEX
server.
Add function `bt_obex_make_uuid()` to make UUID.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This patch fixes PSRAM initialization logic in x8 mode by ensuring that
the data line mode configuration accurately reflects the io-x16-mode
property specified in the device tree.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Removes the `overlay-` name from Kconfig fragment files as
overlay file refers to devicetree overlay files, not Kconfig
fragments
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Removes the `overlay-` name from Kconfig fragment files as
overlay file refers to devicetree overlay files, not Kconfig
fragments
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The function has been marked for deprecation.
Add entries in the release notes and migration guide.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Deprecate the bt_ctlr_set_public_addr function.
It is unused in the tree, and there is a vendor specific HCI
command that can be used for the same purpose.
The function does not have any tests and is basically
unmaintained.
Additionally it is the only function in the public
controller API, and removing it would allow us to
remove that part completely as unused.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The receiving segmented L2CAP data can not be handled properly. Due to
the `struct bt_l2cap_chan_ops::alloc_buf` is NULL, the partial data
will be notified through callback `struct bt_l2cap_chan_ops::recv`.
The GOEP does not consider this issue and handles it as a completed
packet. It causes the L2CAP disconnecting due to the partial packet
cannot be processed by OBEX.
Add a RX pool, and set `struct bt_l2cap_chan_ops::alloc_buf`. The
L2CAP will allocate the buffer from the pool to buff the segmented
data. Only the completed packet will be notified through
`struct bt_l2cap_chan_ops::recv`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The CONFIG_BUILD_NO_GAP_FILL option became obsolete after commit
2e8868c16e and has since been deprecated.
Remove the unused Kconfig select from the CC23x0 SoC configuration.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
It is possible to add MCUboot header through --pad-header option.
In such cases, the FLASH_LOAD_OFFSET does not point to the beginning of
the slot, but to the beginning of the executable area, thus the check
for the active slot should use ranges instead of exact values.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Use cpuapp_slot_partition instead of slot0_partition, so it is possible
to add MCUboot header through --pad-header option.
In such cases, the FLASH_LOAD_OFFSET does not point to the begining of
the slot, but to the beginning of the executable area, thus the check
for the active slot should use ranges instead of exact values.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Create a new Kconfig option allowing to tweak the RxFIFO size on OTG_FS
and OTG_HS instances, and replace the old hardcoded method with this new
mecanism.
The default value of 600 bytes yields a similar size to the the previous
hardcoded default of 160 words (= 640 bytes) when combined with the fixed
overhead computed by the driver (~56 bytes on OTG_FS with 6 endpoints).
Also fix a tiny error in a logging message (DRAM size in bytes, not bits).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The maximal packet size (for non-control endpoints) was obtained by the
driver from HAL definitions which appear to not properly reflect hardware
capabilities.
Update driver to allow endpoints with wMaxPacketSize up to the maximal
value allowed by the USB Specification depending on operation mode, since
all STM32 USB controllers always support these values. Also move the EP
max packet size field in the 'struct udc_stm32_config' to avoid implicit
padding and add a documentation comment.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32 OTG USB controllers use word-addressable RAM with a 32-bit word size
so all allocations from the USB SRAM must be 32-bit aligned. The driver did
not accept unaligned values of wMaxPacketSize, and FIFO allocation code was
implicitly expecting FIFO sizes to be aligned as well (since it allocated
"bytes / 4" without rounding up).
Update driver to accept values of wMaxPacketSize that aren't word-aligned
and to allocate properly sized FIFOs sizes when an unaligned size has been
requested.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The ST USB controller (compatible 'st,stm32-usb') is fitted with private
SRAM called the Private Memory Area or PMA. This is primarily used to hold
data transfered over USB, but it also contains the so-called 'buffer table'
(a.k.a. BTABLE) which holds the base address and size of buffers in the PMA
allocated to each endpoint. The BTABLE is placed by the driver at the start
of the PMA and occupies a fixed size ('USB_BTABLE_SIZE'), which was stored
in the driver configuration field 'pma_offset'. This mechanism is unused on
non-ST USB controllers from STM32 microcontrollers, but USB_BTABLE_SIZE is
still defined (to a dummy value) and stored in the 'pma_offset' field which
becomes unused.
Remove the 'USB_BTABLE_SIZE' definition and the 'pma_offset' field from the
driver configuration, and update the ST USB controller-specific verison of
'udc_stm32_mem_init' to derive the BTABLE size from the number of endpoints
that the controller has instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The EP0 max packet size was de facto a constant because its value was the
same regardless of which USB IP was in use. However, it was stored as part
of the instance configuration anyways which is wasteful and slower.
Create new "UDC_STM32_EP0_MAX_PACKET_SIZE" driver-level constant with which
all usage of the per-instance configuration field is replaced.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update hal_stm32 with pinctrl files generated from the latest Cube
data base tag (STM32CubeMX-DB.6.0.150).
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Automatic advertiser resumption is publicly deprecated since
Zephyr 4.0 [1].
Options and parameters for this behavior have been removed,
and the internal bit flag BT_ADV_PERSIST is now always false.
The behavior it used to configure (to keep advertising after a
connection has been established as long as there are connections
available) has also been removed.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertiser resumption is publicly deprecated since
Zephyr 4.0 [1].
Options and parameters for this behavior have been removed,
as well as all calls to bt_le_adv_resume().
Also remove adv_get_options() whose bt_le_adv_resume()
is the only caller.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertiser resumption is publicly deprecated
since Zephyr 4.0 [1].
Options and parameters for this behavior have been removed.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertiser resumption is publicly deprecated since
Zephyr 4.0 [1].
Options and parameters for this behavior have been removed.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
In bt_conn_unref(), if we remove the last reference to the connection,
we notify listeners that a connection object has been freed
and can be taken, then immediately reuse this freed slot
to resume advertising.
This behavior is source of errors, and automatic advertiser resumption
is publicly deprecated since Zephyr 4.0 [1].
Options and parameters for this behavior have been removed.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertiser resumption is deprecated since Zephyr 4.0 [1].
To maintain the behavior during the deprecation period, internal
transitional symbols were introduced to replace the deprecated ones
in the implementation:
- _BT_LE_ADV_OPT_CONNECTABLE: same option bit
as BT_LE_ADV_OPT_CONNECTABLE (deprecated)
- _BT_LE_ADV_CONN_ONE_TIME: same option bit
as BT_LE_ADV_CONN_ONE_TIME (deprecated)
The only option for connectable advertising is now BT_LE_ADV_OPT_CONN,
whose value is _BT_LE_ADV_OPT_CONNECTABLE|_BT_LE_ADV_OPT_ONE_TIME.
We can assume _BT_LE_ADV_CONN_ONE_TIME is true for connectable
advertisers, and meaningless for non-connectable advertisers.
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertiser resumption is deprecated since Zephyr 4.0 [1].
To maintain the behavior during the deprecation period, internal
transitional symbols were introduced to replace the deprecated ones
in the implementation:
- _BT_LE_ADV_OPT_CONNECTABLE: same option bit
as BT_LE_ADV_OPT_CONNECTABLE (deprecated)
- _BT_LE_ADV_CONN_ONE_TIME: same option bit
as BT_LE_ADV_CONN_ONE_TIME (deprecated)
The only option for connectable advertising is now BT_LE_ADV_OPT_CONN,
whose value is _BT_LE_ADV_OPT_CONNECTABLE|_BT_LE_ADV_OPT_ONE_TIME.
We can substitute BT_LE_ADV_OPT_CONN for _BT_LE_ADV_OPT_CONNECTABLE
when testing if an advertising set is connectable.
Note: to fix a ClangFormat warning raised by check_compliance.py,
this commit also includes a formatting change next to the lines
actually edited (subsys/bluetooth/host/id.c:810).
[1] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Automatic advertising resumption is source of errors [1],
and deprecated since Zephyr 4.0 [2].
Samples and tests no longer cover this feature.
Deprecated public symbols include:
- advertising options BT_LE_ADV_OPT_CONNECTABLE
and BT_LE_ADV_OPT_ONE_TIME
- advertising parameters BT_LE_ADV_CONN
and BT_LE_ADV_CONN_ONE_TIME
Withdrawing this API (options and parameters) makes the code paths
to automatic advertiser resumption unreachable.
[1] Bluetooth: Advertising resume functionality is broken #72567
[2] Bluetooth: Deprecate adv auto-resume #73395
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Fix format specifiers that did not match the argument type.
Use %zu format specifier for size_t type to ensure compatibility
with both 32-bit and 64-bit platforms. Escape percent signs in
format strings using %% to prevent warnings about unknown format
specifiers.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The clock-reference property is marked as required in the bindings file.
Without these changes creating new boards based on stm32u5 either requires
explicitly disabling otghs_phy or setting the clock-reference -property.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
When an IPV6 message that contains an RDNSS ICMPV6 option with a lifetime
equal to 0 is received, proceed to delete the indicated recursive DNS
servers listed in that option.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Due to the k_pipe rework, references to k_pipe in the SYSVIEW configuration
are now obsolete. This commit removes these references.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
The comment was referencing the old k_pipe api which has since been
retired. Updated the comment to reflect the current k_pipe api.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
The k_pipe_get and k_pipe_put APIs have been retired in Zephyr 4.2, this
commit removes references to these APIs in the documentation that was
missed in the original rework of thhe k_pipe API.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
The bt_conn_tx_processor logged connections not in the
connected state as LOG_WRN, but this is a case that is handled
and could occur during regular behavior.
For this reason the log statement was changed to LOG_DBG,
as the developer/user does not need to worry about it.
Also modifies the statement to log the conn->state for
debugging purposes.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use sleep mode instead of Low Power Mode (LPM). LPM is
similar to deep sleep, not intended to be used for general
idle.
Signed-off-by: Kevin Gillespie <Kevin.Gillespie@analog.com>
work and handler pointers are local and not initialized.
Initialize them with NULL to avoid compiler error maybe-uninitialized.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
There were recent changes to nrf54h20dk and STM driver.
Align test accordingly:
- add Kconfig that boots Radio core,
- update expected timing results.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Mention some dropped fields in the video_caps structure and the buffer
allocation size for application.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The mipid02 is just a bridge driver which does not deal with memory so
should not expose caps' min_vbuf_count.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Receiver drivers now need to set the format's size to expose it to
the application.
Application should base on the format size to allocate buffers. The
caps' min/max_line_count (which are needed only for HWs that cannot
support the whole image frame) can hence be dropped.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
When checking for "do not merge" labels on a pull request, also consider
any label that starts with "block:" as a DNM label (e.g "block: HW
Test").
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If we have multiple runners listed under a module,
Each runner py file will individually overload and overwrite the
prior module loaded, because it is using the same module name.
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
Fixes incorrect usage of n instead of _num as the instance identifier
in several lines of the driver initialization macros. This mismatch
caused build errors when multiple I2C instances were enabled, due to
redefinition of the same variable.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The "Caching Basics" page is already included in the toctree of
cache/index.rst, so it should not be included again at this level.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In commit 5e83d222b6, all bit masking
operations in audio/midi.h were modified to use BIT_MASK(n) instead of
literal hexadecimal constants. However, masking a number with a BIT_MASK
promotes it to an unsigned long (while UMPs are packets of uint32_t aka
unsigned on most platforms). This results in annoying warnings from LOG_*
calls, such as:
warning: format '%lX' expects argument of type 'long unsigned int',
but argument 4 has type 'uint32_t' {aka 'unsigned int'}
There is no point in making these long integers, so let's revert the
bit masks as they were before, with literal hexadecimal values.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Anything appearing after the @endcond tag is, well, not part of the
conditional block anymore. This fixes "INTERNAL_HIDDEN" text appearing
at odd polaces in the generated documentation.
Fixeszephyrproject-rtos/zephyr#94862
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The STM32 video encoder (VENC) peripheral is a hardware
accelerator allowing to compress RGB/YUV frames into
H264 video bitstream chunks.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Document introduction of the new size field inside video_format struct
as visible on the <zephyr/drivers/video.h> header.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Add size field to the video_format structure which needs to be set by the
driver and exposed to the application.
For uncompressed formats, this is the size of the raw data buffer in
bytes, which could be the whole raw image or a portion of the raw image
in cases the receiver / dma supports it.
For compressed formats, this is the estimated maximum number of bytes
required to hold a complete compressed frame.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add MAX32657 under tfm regression test case.
There is only one uart interface that used by NS side, so that secure
tests are disabled.
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Hao Zhang <Hao.Zhang@analog.com>
Specifying undefined symbol on linker invocation requests the linker to
search and include the symbol.
This ensures the symbol will be present in final output.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add option to build without software isr table for platforms which
support it (ARM and RISCV). The software ISR table takes up
kilobytes of RAM and introduces latency, and it is not needed if
CONFIG_MULTITHREADING=n.
The initially supported nrf54l15 and nrf54lm20 boards additionally
need CONFIG_CLOCK_CONTROL=n for the minimal sample so board configs
have been added for them. Note that the entry in sample.yaml uses
EXTRA_CONF_FILE to not overwrite the board specific CONF_FILE.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Default to using DIRECT_ISR if nothreading. This allows the SW ISR
table to be excluded if nothreading.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The size of the JSON_TOK_ENCODED_OBJ type was not defined, which
caused errors when generating an array.
Signed-off-by: Robin-Charles Guihéneuf <robin-charles@hotmail.fr>
This commit adds eSPI TAF support for npck3, including initialization
settings for flash operation mode. It also updates the mechanism to
release FLASH_NP_FREE, preventing a possible race condition between
automatic and standard requests.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
This commit adds eSPI support for npck3, including support for the
maximum frequency of 66MHz. The method to read the level of eSPI reset
pin differs on npck3, so the definition of eSPI_RST has been updated
accordingly.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit updates the OOB payload size. The maximum payload size in
the OOB chapter represents the protocol payload embedded whithin the
packet. The total size should also include the header length, so the
header length needs to be added when checking the overall size.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
This commit adds support for SLP_LAN and SLP_WLAN virtual wire signals
to notify the system.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit adds new device tree properties and Kconfig options to
distinguish the support in different chip.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Implement following responses from 3GPP TS 27.010:
5.4.6.3.8 Non Supported Command Response (NSC)
5.3.3 Disconnected Mode (DM) response
Close DLC when receiving DM response.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Use the privileged stack when starting K_USER threads in arch_new_thread().
Threads entering user mode with k_thread_user_mode_enter() keep their
existing flow. To support both cases, z_arm_userspace_enter() now takes an
internal ABI flag (sp_is_priv) indicating whether PSP already points to
the privileged stack.
Also fix calculation of the privileged stack top: use priv_stack_end
directly instead of priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE, which
failed to account for guard/FPU offsets applied to priv_stack_start.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Introduce new macros to define bitfields for RISC-V Physical Memory
Protection (PMP) attributes, specifically for specifying Read, Write,
and Execute permissions for IO memory regions in device tree bindings.
The following macros are added:
- ATTR_RISCV_TYPE_IO_R: Read access
- ATTR_RISCV_TYPE_IO_W: Write access
- ATTR_RISCV_TYPE_IO_X: Execute access
Corresponding macros for device tree usage are also added:
- DT_MEM_RISCV_TYPE_IO_R
- DT_MEM_RISCV_TYPE_IO_W
- DT_MEM_RISCV_TYPE_IO_X
These macros allow device tree source files to precisely describe the
intended access permissions for memory-mapped IO regions, enhancing
the system's memory protection configuration.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Nothing in the tracing/tracing.h header file requires the explicit
inclusion of kernel.h.
Fixes#95123
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Refactor the driver of FT8xx coprocessor by moving code common to
coprocessor commands to common functions.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Allows CONTAINER_OF inside trigger handler to be used to obtain a valid
ptr to the composite struct consisting of a struct sensor_trigger trig.
Fixeszephyrproject-rtos/zephyr#97124
Signed-off-by: Christoph Jans <jans.christoph@gmail.com>
Add the `__deprecated_version` macro to print version
information when deprecation warnings are triggered.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Add the `__deprecated_version` macro to print version
information when deprecation warnings are triggered.
Signed-off-by: James Roy <rruuaanng@outlook.com>
This commit only adds documentation. It will help a user to translate
pinout from the reference manual to a device tree gpio (HP and ULP).
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
If the disconnect work has not yet run when a connect event is received the
connect event is dropped.
Prevent this behaviour by reorganizing `network_evt_handler()`.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
To reduce the number of Kconfig files and improve maintainability,
we are merging the three different Kconfig files from Silabs for ADC.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit introduces a new configuration file for DMA support specific
to the Silabs IADC, along with updates to the test case YAML and device
tree overlay for the xg29_rb4412a board. The changes ensure that the ADC
driver can utilize DMA operations effectively.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit introduces DMA support for the Silabs IADC driver.
A new Kconfig option is added to enable DMA support, ensuring
compatibility with the existing ADC configuration.
DMA can be used for synch/asynch operation.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit updates the ADC sequence sample to improve handling of
differential mode readings. It modifies the conversion logic to
correctly interpret 16-bit/32-bit signed values and adjusts the
resolution accordingly. This ensures accurate millivolt conversion
for both differential and single-ended configurations.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit introduces a new Kconfig option for oversampling
in the ADC sequence sample. It allows to test oversampling for
IADC sequences.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The goal to add the zephyr,user io-channels is to be able to run the
ADC samples without having an overlays for each boards.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Update compatibility from "silabs,gecko-iadc" to "silabs,iadc". It
allows to use the new driver which are more custom to series 2 boards.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit updates the adc_raw_to_millivolts function to use 64-bit
arithmetic. It is necessary when the intermediate result is higher
than the maximum value of uint32_t. It also adds a range check to
ensure the conversion result does not exceed the limits of int32_t,
providing an assertion message for out-of-range values.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Add SDP discovery handlers for AVRCP CT/TG roles and corresponding
discovery parameters and a common result handling function.
Signed-off-by: Make Shi <make.shi@nxp.com>
Extends the cpu_freq tests and samples to support both
SMP and the selection of Stub vs SoC implementations
of cpu_freq_pstate_set().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Extends the CPU frequency scaling to support SMP for two models.
Model 1: Each CPU/core can have its frequency scaled independently
of the others.
Model 2: All CPUs/cores use the same frequency scaling.
In both models, IPIs are sent from the timer handler to each of the
CPUs to obtain the most up-to-date CPU load information. For the
first model, each CPU sets its next P-state after determining its
load. For the second model, the next P-state is set by the last
CPU/core to determine its load and is based on the CPU/core with the
highest load.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds two new CPU frequency scaling policy APIs:
cpu_freq_policy_reset()
cpu_freq_policy_pstate_set()
These new APIs allow the policy to better control and isolate relevant
logic from the rest of the subsystem.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This allows a project to select where cpu_freq_pstate_set()
gets implemented. The system integrator may choose to use
a default stub, a version implemented by the SOC, or a custom
version implemented by the project.
The existing 'native' SoC version now has its output contain
the string "SoC" while the new stub version has the string
"Stub" in its. This allows a means to differentiate between the
two.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds explicit restrictions on the use of both
cpu_freq_policy_select_pstate() and cpu_freq_pstate_set()
for use with SMP systems.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fix to improve decryption speed. Decryption starts after
payload reception, hence use fastest mode to decrypt PDUs.
nRF54Lx only supports decryption after payload reception,
this implementation was already there in the code.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Reverts relaxed radio packet assignment deadline as it is
too risky and can cause invalid bits be transmitted and/or
cause MIC failures.
Reverts commit 4dbfb22a7e ("Bluetooth: Controller: Relax
radio packet pointer assignment deadline"), and
commit 230df77993 ("Bluetooth: Controller: Relax radio
packet pointer assignment deadline").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
video_shell_get_ctrl_by_name() normalized the search string (`name`)
instead of the control's actual name (`cq->name`). This made the
comparison always succeed on the first control, causing incorrect
lookups at runtime.
Update the code to normalize `cq->name` before comparison so that
each control name is correctly checked against the search string.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
The test configuration `arch.common.stack_unwind.symtab` was failing in
weekly CI for quite a long time for the following platforms because
`CONFIG_ARCH_MMU=n` by default on those platforms, although they are
64-bit.
- fvp_baser_aemv8r/fvp_aemv8r_aarch64
- fvp_baser_aemv8r/fvp_aemv8r_aarch64/smp
The command below can be used to verify the fix.
```shell
twister -p fvp_baser_aemv8r/fvp_aemv8r_aarch64 \
-s arch.common.stack_unwind.symtab
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Warning:
unit address and first address in 'reg' (0x4cce0000) don't match
for /soc/netc-blk-ctrl@4cde0000/ethernet/mdio@4cb00000
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
/delete-property/ for newly added aliases which points to nodes
already removed in that overlay.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The arrays used for M-mode Physical Memory Protection (PMP),
specifically for the stack guard feature (CONFIG_PMP_STACK_GUARD),
were previously sized using the hardcoded PMP_M_MODE_SLOTS macro,
defined as 8. This affected arrays in both the _thread_arch
struct (m_mode_pmpaddr_regs, m_mode_pmpcfg_regs) and local
variables within the z_riscv_pmp_stackguard_disable function.
This commit changes the array sizing to use the Kconfig option
CONFIG_PMP_SLOTS. This option reflects the total number of PMP
slots available and configured for the target hardware.
Using CONFIG_PMP_SLOTS ensures these arrays are dimensioned
according to the system's actual capabilities, providing better
flexibility and correctness over a fixed size.
The PMP_M_MODE_SLOTS macro definition has been removed from
thread.h as it is no longer used.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
This makes userchan transport behavior similar to other HCI
transports (eg IPC). Improved logging gives clear overview
of what RX events are discarded helping for configuration
tuning.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
MCUBOOT requires LTO to be enabled, while using code relocation
forces switching it off. When `__ramfunc` is used, LTO can also
be used. Then the `cache_retain_and_sleep` function will work
correctly, but slightly slower.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add missing SoC header include required by memory region assertion
to adc_nrfx_saadc and i2s_nrf_tdm shims.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
Add a new sample demonstrating various ways of performing CoAP uploads
with the CoAP Client library:
* short uploads with payload pointer
* short uploads with payload callback
* block transfer uploads with payload pointer
* block transfer uploads with payload callback
The resource names have been chosen so that the sample can run out of
the box against the Zephyr's CoAP server sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add an optional payload callback field to the coap_client_request
structure, allowing the application to provide blocks of payload
interactively during the resource upload, instead of having to provide
entire payload in a single contigunous memory space.
If registered, the CoAP client library will call the payload callback
whenever a new PUT/POST message is being generated (note this is also
true for retransmissions) instead of using the payload pointer/length.
If the payload callback is NULL, then the library operates as usual.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
During block uploads, the server may respond with Block 1 option with
a smaller block size than currently used (so called block size
negotiation). The CoAP client however did not read the Block 1 option
from the response, therefore ignoring the server request to lower the
block size.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This check is totally wrong, min-residency-us and exit-latency-us are
not related to each other at all except that the end of the residency
period occurs when the exit starts, so they are totally orthogonal
values and should not be checking if one is less than the other or
anything like this. Even in the code for the default policy manager,
they are added together, so this check is incompatible / in disagreement
with that code, so it should be removed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The `ok` state is deprecated and very few files are using this.
The DTS spec also does not have this value.
This PR removes this value once and for all.
Signed-off-by: Kyle Micallef Bonnici <kylebonnici@hotmail.com>
If there are still bytes in the RX buffer, trigger another
MODEM_PIPE_EVENT_RECEIVE_READY event.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Introduce Bouffalo Lab L1C cache management functions
This allows invalidating instructions and data on
BL60x and BL70x
Signed-off-by: Camille BAUD <mail@massdriver.space>
This commit adds hwinfo to supported list of the following boards:
- MAX32655EVKIT
- MAX32657EVKIT
- MAX32690EVKIT
- MAX78002EVKIT
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
To avoid issues with multiple calls to fetch the USN returning garbage
data, memoize the returned USN value and re-use it on subsequent calls.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
- Configure BLOCK count by using kconfig option
'EXTRA_BLOCKS' instad of fixed value. This allows user to
customize the RAM usage based on their platform.
- Keep the PCM data in flash to avoid large RAM usage.
- Refine the sample to get the SAMPLE_BIT_WIDTH
and BYTES_PER_SAMPLE from Kconfig options.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add pinmux configuration to enable the can in zephyr.
Using the following pins:
- CAN2_TX, GPIO_IO25
- CAN2_RX, GPIO_IO27
Signed-off-by: Aziz Sellami <aziz.sellami@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
Add pinmux configuration to enable the can in zephyr.
Using the following pins:
- CAN2_TX, GPIO_IO25
- CAN2_RX, GPIO_IO27
Signed-off-by: Aziz Sellami <aziz.sellami@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
STM32L5xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
This change introduces stm32l5xx clock definitions and separates
it from L4xx series. This change comes because of CCIPR missmatch
of SAI between L4xx and L5xx series.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Fix SDMMC initialization by starting with 1-bit bus mode and
properly configuring wide bus operation after HAL
initialization.
The SDMMC protocol requires initialization to start in
1-bit mode before switching to wider bus widths.
Previously, the driver attempted to initialize directly
with the target bus width, which could cause later read/write
failures.
Changes:
- Initialize with SDMMC_BUS_WIDE_1B instead of target bus width
- Add HAL_SD_ConfigWideBusOperation() call if needed after
successful init
- Add error logging for wide bus configuration failures
Fixes potential SDMMC read/write failures issues on STM32 platforms.
Signed-off-by: Shan Pen <bricle031@gmail.com>
Cast elf32_off/elf64_off to uint64_t and use %llu format specifier
to ensure compatibility with both 32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
bt_iso_chan_send and bt_iso_chan_send_ts would log
twice for each TX, which is unncessary. LOG_DBG statements
include the function name by default, so the 2nd log
statement was unncessary, and were removed.
Added logging of the ts in bt_iso_chan_send_ts which
would still make it possible to tell the 2 apart,
even if CONFIG_LOG_FUNC_NAME_PREFIX_DBG=n.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix BAP unicast and server sample ISO Tx buffer count to
match the minimum required to consistently transmit SDUs
in every ISO interval.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add configuration files for the stm32n6570_dk board.
This enables streaming over ethernet of the images captured by
MB1854 camera module compressed in 1920x1080 H264 video bitstream.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Add video compression support to lowerize network bandwidth.
To visualise camera content on host PC, use GStreamer command line:
$> gst-launch-1.0 tcpclientsrc host=<board ip address> port=5000 ! \
decodebin ! autovideosink sync=false
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Allow to configure the number of allocated capture frames.
This allows to make tradeof between framerate versus memory usage.
2 buffers allows to capture while sending data (optimal framerate).
1 buffer allows to reduce memory usage but capture framerate is lower.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Add the zephyr,videoenc chosen node documentation for hardware
video encoder support such as H264 or MJPEG video encoder.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Added revisions to support Hybrid and 12P versions of
Bartlett Lake Platform.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Add a warning informing about security issues when
TLS/DTLS is used without providing MBEDTLS access to
time/date functions (enabling CONFIG_MBEDTLS_HAVE_TIME_DATE).
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
Extract common DTS bindings to zephyr,cellular-modem-device.yaml
as these are referred in the modem_cellular.c in the
MODEM_CELLULAR_DEFINE_INSTANCE() macro.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Fix implementation of Broadcast ISO Synchronized Receiver
using single switch timer to consider minimum compare value
requirement.
This fix reduces latencies to setup radio receptions and
fixes an assertion in lll_sync_iso when radio_tmr_start_us()
is checked for latencies.
Relates to commit 5dfc58cff9 ("Bluetooth: Controller: Fix
single switch timer minimum compare value").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Latest versions of OpenOCD don't seem to work with
`transport select hla_swd`, but the `board/stm32l4discovery.cfg`
file should work on any version of OpenOCD that contains it
(including my older version).
This should keep things forward-compatible.
Probably this will affect other stm32 boards using `hla_swd`
but I have no way of testing them.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Add a UC8151D node to the build_all display overlay so the
continuous-integration build exercises the new driver path. The dummy
profile overrides only CDI and VCOM to keep the overlay lightweight
while still covering the relevant code paths.
Signed-off-by: Marc Espuña <mespuna@cactusiot.com>
Add support for the UltraChip UC8151D e-paper display (EPD) controller.
The UC8151D is part of the UC81xx family of display controllers commonly
used in e-ink displays.
This implementation extends the existing UC81xx driver infrastructure by
adding device tree bindings, Kconfig options, and the necessary driver
code to support the UC8151D variant.
Signed-off-by: Marc Espuña <mespuna@cactusiot.com>
Set SL_SI91X_BT_BLE_STACK_BYPASS_ENABLE in ble_ext_feature_bit_map to
support host-driven BT/BLE stack operation on SiWx91x devices.
When enabled:
- Events are delivered directly to the host, bypassing internal stack
processing
- Ensures critical events like CARD_READY reach the host reliably
- Allows external host stack to control BT/BLE operations
- Provides more memory to the application, as the internal stack is
bypassed
This change enables direct event packet delivery from the firmware event
handler, ensuring proper operation when the internal BT stack is
bypassed.
Required for BT/BLE tester and host-controlled stack configurations.
Signed-off-by: Arun Kumar Nagelly <arnagell@silabs.com>
This fixes the following compilation warning:
format '%X' expects argument of type 'unsigned int',
but argument 2 has type 'long unsigned int'
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Passing a USB-MIDI device in a ump stream responder configuration,
as obtained from the device tree with DEVICE_DT_GET(), was wrongly
casting is from const struct device* to void*, hence removing the const
pointer attribute.
This incorrectness introduces some compilation issue. Let's therefore
make the device pointer constant in ump_stream_responder_cfg, and
add a macro to make the proper typecast consistently. Finally, adapt the
corresponding samples to use that new macro.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new section with Zephyr-wide naming conventions, as well as a
first rule for C code: area prefixes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add configuration for BLE
Add 32KHz Osc clock needed by BLE
Move nxp_nbu.c include to be shared on mcxw7x and mcxw2x
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Both MCXW2xx and MCXW7xx now share the same SoC family
(CONFIG_SOC_FAMILY_MCXW).
Isolate mcxw7xx-specific module/code from mcxw2xx.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Add HCI info and BLE interrupt.
Lower peripheral interrupt prio to make sure
LL irq have the highest one.
This is a prerequisite of the system.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
The millionths value is calculated incorrectly.
The sensor has a precision of 0.5 which is 500000 millionths, but
there is an extra zero in the code. This fix removes the extra zero.
Signed-off-by: Sašo Domadenik <saso.doma@gmail.com>
Handle the case where there are multiple different kinds of UART on one
platform, the other UART driver select SERIAL_SUPPORT_ASYNC but LPUART
did not, causing build error in LPUART driver. Shield LPUART driver from
this case by introducing driver config to indicate that in fact LPUART
is the one enabling ASYNC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Declare variable at the beginning of the function since having it
declared in the default case makes clang unhappy (can't declare a
variable after a label).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This is a development board for Egis et171 SOC.
It has basic peripherals such as GPIO, I2C, SPI,.. etc
and built-in USB.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
Fixed a wrong function declare of 'nds_l2_cache_init'.
Replace `SOC_FAMILY_ANDES_V5` with `DT_HAS_ANDESTECH_ANDESCORE_V5_ENABLED`
condition to enable it to be used by compatible MCUs
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
This is a SOC based on AE350. In addition to the core, some
modifications have been made to the peripheral functions,
including the integration of built-in USB.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
The DDR LUT entry for ERASE_CHIP was configured with an incorrect
kFLEXSPI_Command, resulting in the erase operation not being executed.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
The maximum speed should be configured individually for each board
since it depends on the layout and the controller's flexspi capabilities.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
In the DDR LUT, the dummy cycles were not defined for READ_STATUS_REG
and had a wrong value for READ.
The default amount of dummy cycles on this chip are 20 (0x14).
This means the LUT should contain the value of 0x28 (0x14*2) for DDR
at these entries.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Some parts of this file use tabs as indentation,
and some use spaces as indentation. This commit
unifies the indentation.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
TF-M owns the last 64kByte of SoC internal SRAM1 in 'ns' variant of
board nucleo_l552ze_q. Update the board variant DTS and YAML files
accordingly and remove the default allocation of 2kB of malloc pool
that worked around this missing information.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove configuration directive CONFIG_ARM_TRUSTZONE_M=y for board
variant nucleo_l552ze_q//ns that is already selected by the SoC defconfig.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
TF-M owns the last 64kByte of SoC internal SRAM1 in 'ns' variant of
board b_u585i_iot02a. Update the board variant DTS and YAML files
accordingly and use RAM3 (512kB) as default Zephyr RAM since it is
larger than the remaining 128kB left in SRAM1.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove configuration directive CONFIG_ARM_TRUSTZONE_M=y for board
variant b_u585_iot02a//ns that is already selected by the SoC defconfig.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct the flash size tag in b_u585_iot02a//ns YAML file. Non-secure
Zephyr firmware partition size is 1024 bytes large since merge of
commit f37660293b ("west.yml: Bump tf-m with stm32 patches").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
TF-M owns the last 64kByte of SoC internal SRAM1 in 'ns' variant of
board stm32l562e_dk. Update the board variant DTS and YAML files
accordingly and remove the default allocation of 2kB of malloc pool
that worked around this missing information.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove configuration directive CONFIG_ARM_TRUSTZONE_M=y for board
variant stm32l562e_dk//ns that is already selected by the SoC defconfig.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct the flash size tag in stm32l562e_dk//ns YAML size as
the non-secure zephyr firmware partition size is 168 bytes large.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
A follow-up to commit d6ce2f4f41 that
introduced a new fakedeferdriver node in app.overlay, but due to how
overlays are applied, the board specific overlay files also need to
be updated to avoid build errors, as they override whatever app.overlay
has.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32U5
DTSI files. Nodes are disabled by default; boards can enable encoder
mode via overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32L5
DTSI files. Nodes are disabled by default so boards can enable encoder
mode via overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32L4
DTSI files. Boards can enable them in overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32L1
DTSI files. Boards can enable them in overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child node (disabled) under TIM nodes in STM32L0
DTSI files. Boards can enable it in overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32H7
DTSI files. Nodes are disabled by default; boards may enable them via
overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32G4
DTSI files. Nodes are disabled by default; boards may enable them via
overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32G0
DTSI files. Boards can enable them in overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in STM32F7
DTSI files. Nodes are disabled by default; boards may enable them via
overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child node (disabled) under TIM nodes in STM32F3
DTSI files. Boards can enable the node via overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add st,stm32-qdec child nodes (disabled) under TIM nodes in the
STM32F1 DTSI files. Boards can enable encoder/decoder functionality
using overlays. No functional change.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Add overlay and config file required to run the uart_async_api
test on nrf54h20dk/nrf54h20/cpuppr/xip platform.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The TXFNF needs to be disabled for additional I3C targets
during the DAA process. Otherwise the TX interrupt might be triggered
before receiving full PID for target.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
The JLinkScript originally configured more than needed which reduces
readability, so stripped it down to the minimum.
At the same time improved behavior under reset and added ETM to the
radiocore JLinkScript.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Added a new convience snippet to redirect logs to STM and then sink them
to TPIU where they can be captured by a trace probe.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Make sure the nordic_vpr_launcher gets started after the coresight
driver if that is present.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Replaced the old tddconf with the full coresight driver that configures
the coresight peripherals locally on the running core.
Also fixed minor bug in the corresponding sample where messages were not
shown for the radio core.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Added driver and bindings for the coresight nrf submodule.
add integrated it for the nrf54h20.
The coresight subsystem is a combination of ARM Coresight peripherals
that get configured together to achieve a simplified configuration based
on a desired operating mode.
This also replaces the previous handling in the nrf54h20 soc.c which was
powering the subsystem up but not configuring it.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Pinctrl needs to set the needed drive and direction of the pins. Also
this later allows automatically setting the clock bit for the traceclk
pin.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Moved the nrf_etr driver from the drive/misc folder into the recently
established driver/debug folder where it is a better fit. Moved the
associated files such as bindings and headers accordingly as well.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Ignore FPU and SMP tests for QEMU Xtensa boards as they do not
support these features, and have been filtered out already.
Add both tags to the ignore list so twister will not even try
to run cmake on them just to filter them out later.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Align all Arduino STM32H7-based boards to the same shared configuration:
- M7 core uses USB CDC ACM as the UART console backend
- M4 core uses a board-specific USART as the UART console backend
- Switch to the usb_device_next stack
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add 'dt_node_has_prop' expression to use the existence of a node property
as a filter in Twister test configuration yaml files.
First argument must be a node alias (in aliases node) or a node path,
not a nodelabel.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
This commits aims to move spinel related variables from heap to global
arrays.
In this way, HEAP_MEM_POOL_ADD_SIZE_ does not need to be defined, or
updated if any change in data structure might occur.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
A handful of Bluetooth controller tests were using %d for
non-int values. Some of the values were either uint64_t or
long unsigned ints.
In most cases, the types could be modified to uint8_t and
the formats changed to use %u.
In some macros, the types were just cast, as the values
would never be larger than uint8_t. The values in this case
were defined as e.g. BIT(0), BIT(1) and BIT(2) (which use the
UL type in the macro).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
ll_length_req_send and ll_length_default_set were defined to return
a uint32_t, but only returned a uint8_t HCI error code and
was the return value was always stored as such.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The general ADC documentation states, that it is possible to use the
adc_read_async function with third parameter (k_poll_signal *async) set to
NULL, in which case the callback is called when all channels have been
converted. This change fixes this issue as it now also checks if a callback
has been set.
Signed-off-by: Torbjørn Biering Tvermosegaard <tbt@foss.dk>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
This commit also removes unused includes in the CMakelists.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Add config to enable the sample for BeagleConnect Freedom over 802154
subg.
- Also add instructions to the docs.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Update the EK-RA8P1 board to support the ArduCam CU450 OV5640 shield:
- Update pinctrl definitions in ek_ra8p1-pinctrl.dtsi
- Update board DTS in ek_ra8p1_r7ka8p1kflcac_cm85.dts
- Add board-specific overlay for the shield
- Update documentation
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add a shield definition for the ArduCam CU450 OV5640 camera module
in DVP (parallel) mode.
- Add Kconfig entry for the shield
- Add devicetree overlay for DVP mode
- Add documentation and shield.yml
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add a devicetree binding and corresponding dt-bindings header for
the ArduCam FFC-40 pin GPIO connector used by camera shields.
- Add dts binding schema for arducam,ffc-40pin-connector
- Add dt-bindings header with GPIO pin definitions
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
This commit introduces shared QSPI partition configurations for Arduino
STM32H7 boards, using the factory partitioning scheme that is compatible
with the Arduino IoT Cloud services.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add a new sample to demonstrate usage of the newly introduced
Network MIDI 2.0 host stack.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new very simple shield that provides MIDI DIN-5 IN/OUT/THROUGH,
as well as 2 leds. Other features of the shields (capacitive sensors)
are currently not reified in Zephyr.
While there is no further device on the shield itself (everything goes
through the Arduino header directly), this allows for meaningful
device-tree naming when using the shield.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new network protocol for MIDI2.0 over the network, using UDP sockets.
This allows Zephyr to host a UMP endpoint on the network, which can be
invited by UMP clients to exchange MIDI2.0 data.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Update the USB-MIDI2.0 sample to use the newly introduced
UMP Stream Responder library. This allows the host to discover the
topology and function block names (if supported by the host OS).
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Since a new device-tree property has been introduced to describe if a
UMP group is limited to 31.25kb/s (like a physical MIDI DIN-5 port),
this can be used in the USB UMP group terminal block descriptors, as
specified in the USB-MIDI2.0 reference document [1], (in 5.4.2.1
Group Terminal Block Descriptor):
Maximum Output Bandwidth Capability in 4KB/second. 0x0000 – 0xFFFF.
Bandwidth is total for this Block, shared among all OUT Group Terminals.
0x0000 = Unknown or Not Fixed.
0x0001 = Rounded version of 31.25kb/s
[1] https://www.usb.org/sites/default/files/USB%20MIDI%20v2_0.pdf
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Add a new top-level, transport independent library to respond to UMP Stream
Discovery messages. This allows MIDI2.0 clients to discover UMP endpoints
hosted on Zephyr over the UMP protocol.
The endpoint specification can be gathered from the device tree, so that
the same information used to generate USB descriptors in usb-midi2.0
can be delivered over UMP Stream.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Improve the API documentation for Universal MIDI Packets definitions:
- Add link to the reference document, and make it referenceable in doxygen
- Use BIT_MASK macro instead of hexadecimal litterals to better convey the
length of various fields within UMP packets
- Add more cross-references where possible
- Use @remark when applicable
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Adds cast to int when ret is assigned error code returned by
functions that return int64_t. The cast has been added to indicate
that assignment with truncation is here intentional.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The NUCLEO-C071RB user manual UM3353 states that "The PC13 I/O used for
the user button must be set in INPUT, pull‑up". The board does not have
an external pull-up fitted.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use %zu format specifier for size_t type to ensure compatibility with both
32-bit and 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Change variables in test_cb_data_type from uint32_t to size_t to
match the return type of flash_get_page_count() and adjust
format specifiers accordingly. This resolves warnings when
compiling for 64-bit platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
This commit introduces a new function to verify the firmware version of
the SiWX917 network coprocessor. It checks the expected version (updated
manually after each bump of Wiseconnect SDK in hal_silabs) against the
actual version retrieved from the device.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Instead rely on them having been opened with O_CLOEXEC, or that
whichever component has opened it will close it with a
NATIVE/NSI_TASK(ON_EXIT) hook.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For a i3c pure bus, the bus free timing shall be set to tcas
which is 38.4ns according to table 49 of the MIPI I3C v1.2
specification.
For a i3c mixed bus, the bus free timing shall be set to the scl
low time. Based on the i2cs' lvrs, it can determine if any devices
only support fast mode and won't do fast mode plus to determine
which tLOW setting it should use for bus free.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The function asserted `!sz && !ctrls`, which is the inverse of the
intended precondition. This caused assertion failures on valid inputs.
Update the check to `sz && ctrls` so it fails only when size is zero
or the control pointer is NULL.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add support in the OV5640 driver to configure the bus-width and
data-shift properties from devicetree when operating in DVP
(parallel) mode.
This allows the number of parallel data lines and the bit shift
to be set directly via DTS, ensuring correct configuration across
different hardware designs.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Replace the custom I2C read/write functions in the OV5640 driver
with the common Video CCI API helpers.
- Introduce OV5640_REG8/REG16 macros for register addressing
- Convert struct ov5640_reg to struct video_reg16
- Replace ov5640_{read,write,modify}_reg() with CCI API helpers
- Replace ov5640_write_multi_regs() with video_write_cci_multiregs16()
This aligns the OV5640 driver with other video sensor drivers
that already rely on the CCI helpers.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Enable support for latest GINF method which requires 3 paramters
for each GPIO group and enables gpio support for intel_ptl_h
platform.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Enable support for ACPI_RESOURCE_TYPE_ADDRESS64 in acpi_device_mmio_get
to fetch 64bit address from resource of an ACPI device.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Retrieve the current leaf state by calling `smf_get_current_leaf_state`
and the state which is currently-executing by calling
`smf_get_current_executing_state`.
Signed-off-by: Siwei Yang <yswysc@gmail.com>
Migration guide is updated to report the changes that has been introduced
in the nordic,nrf-comp and nordic,nrf-lpcomp bindings.
`psel` and `extrefsel` properties type has been changed to integer.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Unify external analog inputs type to be consistent
in COMP, LPCOMP and SAADC nordic drivers.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Due to the large display of the STM32H7S78 DK, it is necessary
to have larger POOL_SIZE for display buffers.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
In case of DISPLAY is enabled, ensure that MEMC as well as
Shared-Multi-Heap is enabled in order to use for framebuffer.
Moreover, since PSRAM is 32MB large, HEAP size should be set
AUTO instead of SMALL which is the default since SRAM is rather
small.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add a first region in the MPU to disable all access to the whole
memory range. With that ensure that the MPU will block all
access to regions that aren't defined in further regions.
Ensure as well that the peripheral area is accessible.
This handles the errata 2.1.1 PLD might perform linefill to address
that would generate a MemManage Fault of the STM32H7Rxx / STM32H7Sxx
device errate ES0596 - Rev 6.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Implementation based on STM32G4 series.
This is a preparation to enable reading and writing the RDP bits.
Signed-off-by: Martin Jäger <martin@libre.solar>
Added wlan wakeup pin in IW610 overlay file. This WLAN wakeup
support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup
pin configuration when doing device related initialization.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Fix the MAX32690 flash1 node's address and erase size properties to match
the datasheet. Add a test for that platform as well to verify the
functionality of the FLC1 peripheral instance.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
0-init some non-static global variables to avoid
issues with uninitialized values. Also modify
the printing of the broadcast sources found slightly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Introduce documentation for using mender-mcu as an external module in
Zephyr.
Signed-off-by: Daniel Skinstad Drabitzius <daniel.drabitzius@northern.tech>
Add Kconfig support for the following OpenThread features:
- OPENTHREAD_MAC_BEACON_PAYLOAD_PARSING
- OPENTHREAD_PLATFORM_USEC_TIMER
- OPENTHREAD_MULTIPLE_INSTANCE_NUM
Modify core configuration to set the number of
short and extended source address table entries to the
maximum number of children, in line with upstream
OpenThread configuration.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Make use of rtio_read_regs_async() and rtio_flush_completion_queue()
helpers in lis2dux12 and lsm6dsv16x sensor drivers.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Fixes an issue caused by using a chosen node string as a node
rather than looking the node up first so it could be used
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The update will fail if the address is outside of this range.
This failure might trigger a bad state where the device is
non-trivial to recover.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Uses the full hwmv2 board target for the hardware platform output,
seemingly this was missed in the hwmv2 migration and it was using
the board name only. Adds a deprecated Kconfig to restore to the
previous behaviour
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
read_multi_var was always sending 5 as count of handles.
This was causing failure in GATT/CL/GAR/BI-36-C, GATT/CL/GAR/BI-40-C
and other tests expecting IUT to send
GATT_ReadMultipleVariableLengthRequest
Fixed this was using the cp->handles_count coming by autoPTS.
Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
Updated description on conditions and assumptions in which
the soc_reset_hook is executed.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Introduce hook for customize reset.S code even before stack is
initialized or RAM is accessed. Hook can be enabled using
CONFIG_SOC_EARLY_RESET_HOOK=y.
Hook implementation is by soc_early_reset_hook() function which should
be provided by custom code.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This rather anchient test suite calls printk from within ISRs.
printk() is not declared isr safe, and printk should be avoided from
ISRs due to their stack and cpu time requirements. The test suite
does not use the printk() output in any case, so the printk() output
is simply removed. The README.txt has been updated with the actual
output produced by todays test suite, sans the printk() output.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Make ticks tolerance configurable for chips which need a more
relaxed value for testcase which assesses count precision.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Disable RTC interrupts when cancelling alarm, and clear callback
data, to make sure no ISR/callback is serviced after alarm is
cancelled. Also, check programmed ticks in ISR to make sure
alarm triggered is not an outdated/cancelled event.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Fix alarm setting when timer has overflown beyond 32-bit boundary.
Timer is 48-bit, so it requires high word to be programmed along
the 32-bit word managed by the driver.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Fix compatible name on device tree, to allow RTC timer based
counter driver to be enabled. Disable rtc_timer node for all
devices to keep standard.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add a test case that disables asserts to ensure that the
BT shell with audio can be built without compiler
warnings/errors when asserts are disabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
MCUX defined RX fifo combine names and the
references need to be adjusted in the i2s driver.
Signed-off-by: Davi Herculano <davi.herculano@adam-audio.de>
Add a migration note entry for the CoAP client response callback signature
change and add an entry to the release notes for the new struct type.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Pass a pointer to the CoAP packet in the response data. This allows
callback function to inspect for CoAP options.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Make it easier to modify the response callback data by passing it as a
struct pointer rather than a long list of arguments.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
NACK message now log with LOG_ERR_RATELIMIT
instead of LOG_ERR to reduce log noise.
When scanning I2C device,
receiving a NACK is expected behavior and not necessarily an error.
Logging it at LOG_ERR causes unnecessary clutter in the logs.
Therefore, the log level is change to LOG_ERR_RATELIMIT for NACK cases.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
When `CONFIG_NRF_SYS_EVENT` is enabled, route constant latency requests
through the reference counted API.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the option to force constant latency mode outside of nRF54l, since
it is an option applicable to most Nordic SoCs.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Override any defaults for `UART_USE_RUNTIME_CONFIGURE` when using
`CONFIG_MODEM_CELLULAR`, as the baudrate update feature depends on it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
From the manpage for inet_ntop
This function converts the network address structure src in the af
address family into a character string. The resulting string is
copied to the buffer pointed to by dst, which must be a non-null
pointer. The caller specifies the number of bytes available in
this buffer in the argument size.
In an unintended misconfiguration the resolve max string ended up
being 20 and tracking thru some wierd code issues determined some
stack corruption which came back to the shell command. So, just
fix the size argument to be the sizeof which then leads to the next
problem that the size is being ignored by inet_ntop.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
This case was originally made sort of naively due to the fact that the
test was prioritizing testing spi nor first, but we wanted to test SOC
flash drivers, not the spi flash driver, so we just disabled
CONFIG_SPI_NOR. But this caused issues for platform which don't have a
storage partition or platform where the storage partition was actually
on a spi nor (because then there is no spi device leading to a linking
error with no reference to device object)
So fix by introducing a config to change the test logic to prioritize
the storage partition, which is really what we wanted to do in the first
place more directly I think.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix ESP32 and ESP32-S3 support:
* Add Espressif overlays for default and remote target.
* Add remote targets for Espressif boards.
* Fix remote runtime by increasing the stack size in case of ESP32.
* Make the test cycle config option.
* Make the test stacks config options.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
On i.MX 93 platform, no need to clear interrupt flags, otherwise it
will not trigger reset.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Joe Zhou <zhongcai.zhou@nxp.com>
Linkeserver should be the default runner because that's actually what
comes on the board out of box, which is already indicated in the
documentation of the board.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
As discussed on Discord, certain k_mem_slab* APIs are ISR-OK, but not
marked as such. After APIs review, the following functions should be
ISR-OK:
- k_mem_slab_free
- k_mem_slab_num_used_get
- k_mem_slab_max_used_get
- k_mem_slab_num_free_get
- k_mem_slab_runtime_stats_get
- k_mem_slab_runtime_stats_reset_max
Added the Doxygen marker where needed.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
This removes the special test case for intel_adsp to skip
the mapped code execution test. The test can now run on
the ACE3.0 hardware without issue.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The mapped code execution test uses the simple k_mem_phys_addr()
to do virtual to physical address translation. And this requires
the virtual address to be inside the kernel permanent mapping
(i.e. between __kernel_ram_start and __kernel_ram_end). With
demand paging, the translation is no longer static and it can be
mapped into any physical address. So a simple memory mapping
in the test would map an incorrect physical address which may
not even contain the said function. It has been working when
demand paging is not enabled is due to the custom sections is
immediately after the text section, so that the simple address
translation still works. But a custom linker script (i.e. board
config) may make that not true anymore.
So fix this by putting transplanted_function() into
snippets-text-sections.ld such that this would appear inside
.text section.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds snippets-text-sections.ld to ACE linker scripts.
For now, this is for the memory mapping test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds snippets-text-sections.ld to arm/cortex_a_r and arm64
linker scripts.
For now, this is for the memory mapping test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds snippets-text-sections.ld to x86 linker scripts.
For now, this is for the memory mapping test.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1. Fix an off-by-one error in `signo_fits()` (a utility function inside
signal.c
2. Adjust expectations for C libraries that do not provide a sigset_t
large enough to support `SIGRTMIN` or `SIGRAMAX`.
This fixes an issue in CI that appeared when run under ARC.
```shell
west build -p auto -b qemu_arc/qemu_arc_hs -t run tests/posix/signals
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Extend the LIS2DU12 accelerometer driver with SENSOR_TRIG_DELTA
support. The detection is based on the slope between successive
channel readings. Support for setting SENSOR_ATTR_SLOPE_TH and
SENSOR_ATTR_SLOPE_DUR is added as well. In line with other sensors,
SENSOR_ATTR_SLOPE_TH is configured in SI units (m/s^2) and
SENSOR_ATTR_SLOPE_DUR in samples relative to the ODR. The new trigger
can be mapped either to the same GPIO as the data-ready interrupt or
to a dedicated one.
Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
Add basic testing to validate the API of the NVMEM subsystem.
Add testing with an EEPROM backend.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit adds the NVMEM subsystem with a basic implementation for use
with EEPROM devices.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Adds property nvmem-cells for referencing a node that stores some
configuration information. A typical use case is the reading of MAC
address from an EEPROM device.
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Configure i3c1 nodes on stm32n6570_dk.
Note that pins conflict with i2c1 ones, so don't enable it here and
it will have to be enabled by application
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Updates the smp test to support nsim/nsim_hs5x/smp/12cores.
Furthermore, if someone attempts to build the smp test for more
than 12 CPUs, report an error message informing the user to
reduce the number of CPUs. This reduction can be in the form
of a custom overlay for the board in question.
Fixes#96339
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit adds an entry in MAINTAINERS.yml for the Instrumentation
Subsystem added in #91595.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit moves the `zaru.py` script to `scripts/instrumentation`, and
adjusts references to the script in other places.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
ElemRV-N has a gpio controller. Enable this node in the board-level
device-tree and add this interface to all aux. files.
Also sort device-tree nodes in the DTS file alphabetically.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Add basic support for the Aesc Silicon GPIO controller.
This IP core has internal tri-states and therefore a read,
write and direction registers. Additionally, it has advanced
monitoring capabilities for interrupt generation; low or
high leve and rising or falling edge.
Interrupt support will be added later when ElemRV supports
interrupt in Zephyr.
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Change the ISR code to return once all pended interrupts
are handled instead of continuing to iterate over
all channels. Common occurence is just for one interrupt
bit to be set so no need to check all bits in all channels
if only one bit is pending.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Handle notification interrupt before data interrupt of
a channel. Notification interrupts are more commonly
used (e.g. for ipc) and clearing the interrupt ASAP
helps reduce the possiblility that the sender finds
the interrupt already pending if it tries to send multiple
ipc messages in quick succession.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Handle all interrupts for a channel before going to next
channel. Previous code did an if/else check, so if both
a data rx interrupt and a notification interrupt were pending
for a channel, only one would be handled in the ISR. The
ISR would have to fire again (probably would be still pending)
for the other interrupt to be processed. This could even
lead to starvation/delay if another data rx interrupt got
pended again.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Change to pass the device node to IRQ_CONNECT and remove
the intermediate interrupt handler that has to call
DEVICE_DT_INST_GET() to get the device pointer.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The ipc backends, like icmsg.c, don't expect errors when
using mailbox send for notifications. In some places,
icmsg.c ignores the return value of the mailbox send,
in some places it propagates the error up, and in some
places it asserts.
icmsg only uses the mailbox send with NULL msg as a means
to interrupt the other processor, and all data is passed
via shared memory. So it is safe to ignore the case when
the interrupt is already pending, since the other
processor should handle the pending message when it gets
around the handling the interrupt. As long as the order
of clearing the interrupt is before the handling of the
data, there should be no case where not pending a new
interrupt when one is already pending would result in missing
any new message.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Add support for WeAct Studio ESP32-S3-B development board featuring:
- ESP32-S3R8 chip with 8MB integrated PSRAM
- 16MB external SPI flash
- RGB WS2812 LED on GPIO48
- User button on GPIO45
- Dual USB-C connectors
- Wi-Fi and Bluetooth LE support
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
There were some corner cases and stress test could fail. Reworking
tail bits handling to make the stress test pass.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
GRTC is used by the logger, so it must be initialized
as early as possible. On the other hand, clock requests
are allowed once the clock control API has been initialized.
This PR introduces a two-stage GRTC initialization to meet
these requirements.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
hal_silabs now includes the last version (3.5.2) of WiseConnect, the
downstream SDK for Silicon Labs SiWx91x series.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Align with native_simulator's upstream main
4641dad899979528e4083aa762651388a2a7ec7b
Which includes:
4641dad common: nsi_internal.h: Use NSI_INLINE macros
7a1156c nsi_tasks: move header to include folder
6b7d76a nct: fix restarting sem_wait after signal
166516d nce: fix restarting sem_wait after signal
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
There is only one flag, NET_BUF_EXTERNAL_DATA, used when net_buf was
allocated with external data. The flag is checked in net_buf_clone() and
net_buf_destroy(). net_buf with external buffer can be used for
receiving and transmitting. net_buf_reset() is convenient way
to reset net_buf with external data before it is re-enqueued again.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Some SoCs support EXT1 wake-up pins (RTC IOs) but do not provide
IOMUX features like internal pull-up/down resistors. Support for
these features is indicated by SOC_RTCIO_INPUT_OUTPUT_SUPPORTED.
This change updates the test configuration to account for this
and fixes EXT1 pin mapping for ESP32-H2.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
The swapped_app image, added via ExternalZephyrProject_Add,
wasn't receiving the swap method configuration from sysbuild.
If trying to build the test with a different configuration that
SWAP_USING_OFFSET (for example SWAP_USING_MOVE)
this resulted in a boot loop due to configuration mismatch
between swapped_image and mcuboot.
This fix ensures proper configuration propagation and prevents
similar mismatches in future scenarios.
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
zsock_recvfrom() takes as last argument a socklen_t pointer
( c546c1cad1 )
whose definition has changed.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
zsock_getsockopt() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
net_tcp_accept_cb_t takes a socklen_t as 3rd argument,
which type was changed in
c546c1cad1
and is not anymore equivalent to size_t.
So let's correct it.
As a freebie, let's define that function as static as it is.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
zsock_recvfrom() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
There was extra parameter when calling zassert_not_equal() which caused
compilation warning.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add information that the socklen_t was changed from size_t, which
can be either 32 or 64 bit long depending on system configuration,
to always be 32 bit long. This is now aligned to way Linux is defining
socklen_t.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Fix an incorrect interpretation of the chip select signal
for the SPIM instances. If cs-gpios is used then the chip
select pin is used as a GPIO, and should have CTRLSEL=0.
Only when NRF_FUN_SPIM_CSN is used should CTRLSEL
be configured to enable hardware control of the pin.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Extend the registration status definitions and explicitly tie them to
the values defined in 3GPP TS 27.007. Definitions were copied from
version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.
Signed-off-by: Jordan Yates <jordan@embeint.com>
refactor move_to_negative_direction, run_positive as well as
run_negative direction from drv84xx_api to stepper test-suite
refactor test_microstep_resolution to drv84xx_emul
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
add is_moving check to already existing stepper_api move_by
and move_to tests.
delete corresponding redundant test cases from drv84xx
bugfixes in step_dir_stepper_common.c
- start_stepping shall return 0 instead of return ret since
timing_source_start can return 1 depending on which timing
source in selected
- stop timing source before triggering steps_completed event
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
test_actual_position_set, test_test_move_by_zero_steps_no_movement
from drv84xx_api test-suite are already accounted for in stepper_api
test suite through test_actual_position & test_move_by_zero_steps
respectively.
test_move_to_identical_current_and_target_position scenario from
drv84xx_api is now covered in test_move_zero_steps in stepper_api
test_move_to_positive_direction_movement from drv84xx_api test-suite
is now test_move_to_positive_step_count in stepper test-suite
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.
drop test_run_zero_step_interval_correct_position
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Move to dtcm.bss to reduce flash usage.
When increasing SEGGER_SYSVIEW_RTT_BUFFER_SIZE,
it will waste a large amount of flash space.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
When connecting to WiFi from stored credentials, the key_passwd is never
freed.
Additionally if the connect fails, the allocated data was never freed.
Convert heap allocated memory to stack allocated buffers.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Added support for disk_access and I2C with bme280 application
for ptl-h platform.
-samples/sensor/bme280
-tests/drivers/disk
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Updated RTC to support MFD method on panther lake platform
and board config to include alarm and update tests.
-boards/intel/ptl/
-dts/x86/intel/
-tests/drivers/rtc/rtc_api/
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Adds a sample to show the tracing and profiling features when the
instrumentation subsystem is enabled (CONFIG_INSTRUMENTATION=y).
The sample consists in two threads in ping-pong mode, taking turns to
execute loops that spend some CPU cycles. This allows a couple of
context switches and so to demonstrate tracing of thread scheduling
events.
The sample also has an example on how to capture and show traces and
profile info via the CLI tool zaru and also how to export the traces
so they can be loaded in the Perfetto Trace Viewer tool.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
This commit enables users to pass -DQEMU_SOCKET=y for 'west' when
selecting to run the build on a QEMU VM. This allows the target's serial
port to be served to the host via a TCP/IP port for convenience, easing
communication with the target from the external world.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Adds a new '__no_instrumentation__' preprocessor definition for GCC,
mapping it to '__attribute__((__no_instrument_function__))'.
This new macro is used to disable code instrumentation (enabled when
'-finstrument-functions' flag is passed to the compiler) for specific
functions when placed before a function definition.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Adds a new compiler flag to enable function instrumentation injection
at compile time for compilers that support it.
Adds support for this flag to GCC when `CONFIG_INSTRUMENTATION` is
enabled, setting the `-finstrument-functions` flag during compilation.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Currently, CORTEX_M_DWT option does not refresh its value when
TIMING_FUNCTIONS, on which it depends, is selected via menuconfig.
This occurs because during the early west build steps the
aarch32-specific Kconfig file is parsed with TIMING_FUNCTIONS=n,
resulting in CORTEX_M_DWT being set to 'n' (not set) in .config.
Later, when the user runs west with -t menuconfig and sets
TIMING_FUNCTIONS=y using the menus or any other option that selects
TIMING_FUNCTIONS=y indirectly, CORTEX_M_DWT is already set to 'n' and
remains set as such. That is inconvenient, and, moreoever, since
CORTEX_M_DWT gets set if TIMING_FUNCTIONS is set in prj.conf, the
current behavior is not consistent, i.e. via the menuconfig setting
TIMING_FUNCTIONS=y doesn't imply selecting CORTEX_M_DWT automatically.
This commit addresses this issue by selecting CORTEX_M_DWT=y if
TIMING_FUNCTIONS becomes set to 'y', otherwise allowing it to be set via
the prompt. This is possible by making the CORTEX_M_DWT prompt
conditional. Hence, in menuconfig, if TIMING_FUNCTIONS gets set
CORTEX_M_DWT is set automatically. If TIMING_FUNCTIONS is not set, a
prompt is presented to allow selecting CORTEX_M_DWT manually.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Add an option that excludes generation of a given path of `.gcda` files
when running coverage testing. This can be useful when running testing
coverage on downstream repos, which would otherwise result in large
`.gcda` files for paths we don't care about filling up the disk.
One example of using this is to exclude coverage outputs from
mbedtls files with the following:
`CONFIG_COVERAGE_DUMP_PATH_EXCLUDE="*modules/crypto/mbedtls*"`
Signed-off-by: Jordan Yates <jordan@embeint.com>
It is very common to see a comment stating that the
"No Space Before Opening Brackets" style guide is not followed.
To avoid putting this burdon on reviewers, let the compliance
check catch this instead.
Checking for tab indentation was also very simple, so also added
this.
Running this check on all files finds many violations:
- Space before opening brackets: 141 violations
- Tab indentation: 420 violations
Fixing these will not be done as part of this PR. Adding the check
will prevent us from adding new violations.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
These two were introduced after the previous commit, disable the cache
for them as well, reduce some noise from the github caches page.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
With the UART transport test (sample.tracing.transport.uart),
it would fail on qemu_x86_64 complaining about missing
k_event tracing functions. So add them to fix the compilation
error.
Fixes#96818
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The ((0) ? (arg) : (arg)) compiler trick leads to a codechecker
violation:
"conditional operator with identical true and false expressions"
Replace it by ((0) ? (0) : (arg)) to work around this issue.
Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
Optimize power consumption for the Nucleo-WB09KE board by
implementing correct pull-up/pull-down configurations when the device
enters lower power states.
Disable the SMPS with floating output in suspend-to-ram (deepstop)
power state.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Add PM support to the STM32WB0x Bluetooth HCI driver.
Implement PM event register to wake up the device for its BLE events.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Provide PM support, specifically suspend-to-ram, for STM32WB0x.
Enable STM32_RADIO_TIMER Kconfig parameter when PM is set.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Use radio timer as the system timer when Bluetooth is used.
Modify CMakeLists.txt to compile radio timer driver when
STM32WB0_RADIO_TIMER is enabled.
Remove the common parts from hci_stm32wb0.c that are present
in the radio timer driver.
Set and retrieve the appropriate value for SYS_CLOCK_TICKS_PER_SEC and
SYS_CLOCK_HW_CYCLES_PER_SEC respectively.
Define radio_timer node and its properties.
Enable radio_timer node in nucleo_wb0x boards.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Fix the improper use of CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC for STM32WB0
drivers due to the misunderstanding of its definition.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit applies clang-format to file include/zephyr/sys/util.h
to align them with the latest Zephyr coding style guidelines.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Add two internal Z_INTERNAL_MAX and Z_INTERNAL_MIN macros and use those
for implementing the actual MIN and MAX. This allows a downstream
application to undefine and redefine MIN and MAX, for example to define
them to min and max, which is useful if it relies on MIN and MAX to be
the single call version.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add three argument variants of the single evaluation min and max, seems
like there's few of these in the code we may as well have them.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Rename these three macros to an unprefixed lower-case variant. This is
normally not done for Zephyr macros (see container_of) but in this case
it seems like a good idea to adopt the lowercase names to:
1. have the same convention as the equivalent Linux macros, helping devs
working cross project recognizing (mis)use patterns.
2. make it somewhat intuitive that the lowercase ones are meant to be
used in functions while the uppercase ones are to be used for static
evaluation.
Add few c++ guards to avoid colliding with std::min and std::max.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
These three are single evaluation versiono of MIN, MAX and CLAMP, they
are defined in toolchain headers as they use typeof [1] and statement
expressions [2], which are compiler extensions, but given that these are
used by other macros in util.h as well, it seems to be fair to assume
that these are supported by all compilers used with Zephyr today.
[1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
[2] https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Currently, EXTEN switch control (mapped to GPIO5) is always 0, due to a bug
in the shift value. This has been reported in Coverity CID 353647.
Following the AXP192-X Datasheet, the EXTEN switch control status is
given by bit 2 of the register 10h. If "GPIO5" corresponds to EXTEN
Switch control (AXP192_GPIO5_OUTPUT_MASK is 0x04U), then the shift
AXP192_GPIO5_OUTPUT_SHIFT should be 2, not 3.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Setting the peer hostname to NULL does not skip hostname verification.
After discussion in the issue it was agreed that it's better to remove
this comment than to implement skipping hostname verification.
Also fixed a typo in the remaining part of the comment.
Fixes: #96853
Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
Commit e4650bc349 modified check_compliance
to avoid false negatives when a commit has multiple signoff lines and the
author's signoff line isn't the first one. To avoid this, a signoff line
which matches exactly the author's name and email is searched instead of
matching any line with the proper syntax and checking the fields.
While this solved the original issue, this also introduced a new issue:
whereas the old script would distinguish a properly formed signoff line
with the wrong author from a malformed signoff line, the new method now
checks both the syntax and the author name/email at the same time. As
such, the script will report "signoff line does not follow the syntax"
for both situations, but the signoff line DOES follow the syntax in the
latter case: the error message is then only a misleading red herring.
Fix this issue - and improve the check - by verifying every signoff line
in a commit's message body. Invalid syntax on any line is reported as a
"does not follow syntax" failure, whereas inability to find the commit
author is reported as a separate "no signoff entry matches commit author"
failure as it should always have...
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When checking for emails/sign-off, if parsing of the commit information
using 'git show' fails, the 'auth_name', 'auth_email' and 'body' variables
are unbound but accessed right afterwards, which would cause an error.
Skip straight to next iteration of the loop when such an error occurs to
ensure access to the unbound variables is never performed.
This error was reported by the VS Code Pylance analyzer.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
After commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro") when compiling with clang we have actual
checks and a real assert check using _Static_assert.
Now, when compiling with clang (used by Xtensa internal toolchain)
we get the following error.
$ zephyr/drivers/dai/nxp/sai/sai.c:968:29: error: static_assert expression
is not an integral constant expression
We get this in asserts like this:
BUILD_ASSERT(SAI_DLINE_COUNT(inst) != -1, "...").
This expands to (reduced the macro to easier understand the context):
_Static_assert(((((((I2S_Type *)(uintptr_t)(1493499904U))) ==
((I2S_Type *)(0x59040000u)))
... and clang complains that this is not a constant expression.
So, in order to fix the compile time error remove the compile time
asserts and replace them with runtime checks.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes: commit 524b72ce40 ("toolchain: llvm: Provide working
BUILD_ASSERT macro")
The increased complexity of the LVGL code now overruns the 4 KiB stack
of the main thread. Increase it to 6 KiB to fix the error.
Fixes: #94473
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
Our build system DT API has a dt_comp_path() function used to look up
paths of nodes with a given compatible. This relies on the generated
edt.pickle.cmake file in the build directory to look inside the
concrete devicetree for the current application build.
The script gen_dts_cmake.py is responsible for generating
edt.pickle.cmake. It currently generates the data needed by
dt_comp_path() by looking inside each edtlib.Node object's "props"
attribute. This attribute in turn is fed by the "properties:" key in
the node's YAML binding. This leads to an edge case which is breaking
the dt_comp_path() API.
In most cases, we don't notice this edge case because base.yaml, which
is included by nearly all bindings, has a definition for "compatible"
in its "properties:" map. However, bindings are not required to
include base.yaml, and bindings do not have to explicitliy define a
"compatible" entry in their "properties:". An example of a binding
that does neither is fixed-partitions.yaml: it only has #address-cells
and #size-cells in its "properties:".
Nonetheless, "compatible:" is always a valid property name because
it's defined in the DT spec, and we should make the CMake API robustly
detect all nodes with a given compatible, regardless of whether that
node's binding explicitly defines it or not.
To make this happen, rely on the edtlib.Node.compats attribute instead
of edtlib.Node.props. The compats attribute is always defined even if
the node's YAML binding doesn't have an explicit entry for
"compatible".
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
only switch to 4 bit mode, if it is supported
by the host. for MMC it is already checked,
but not for the sd card.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add the #include <snippets-sections.ld> directive
to include a linker file automatically.
This file defines additional linker sections that
are dynamically added during the build process.
It is placed at the very end of the SECTIONS block,
ensuring that any sections it defines appear after
all standard sections.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
The domain clock configuration for lptim1 node in nucleo_g431kb.dts has a
conflict between the source and the peripheral. The source is specified
as STM32_SRC_LSI - low speed internal, but `LPTIM1_SEL(3)` will actually
configure the low speed external clock as the source, which the Nucleo
G431KB does not have. Update this to actually use the LSI clock. See
RM0440 Rev 9 page 322 - LPTIM1SEL[1:0] for more details.
Signed-off-by: Michael Estes <michael.estes@byteserv.io>
This commit updates the CI workflows to use the CI image v0.28.6, which
adds libfuse3 and additional Clang dependencies such as libclang-rt.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Do not use docker image, use action for setting up zephyr instead.
We need the SDK here to check the headers.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit updates the CI workflows to use the CI image v0.28.5, which
adds Node.js runtime and the TF-M Python dependencies.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The size of each spinlock register might vary depending on the SoC.
Make it configurable in the devicetree.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Using the mpidr of the core to lock the hwspinlock meant it acted as
a spinlock in the cluster itself, which is exactly the opposite of what we
tried to achieve.
Additionally, this tied the driver to the arm architecture, even though the
HW was not.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
HWSPINLOCK drivers should be initialized very early in the kernel life, so
they can be used by other drivers without breaking their init dependencies.
Use the default init priority (40), instead of default device init
priority (50).
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
HWSPINLOCK are used to protect accesses to shared resources between
clusters. However, we don't want to sleep or be preempted while holding
a HWSPINLOCK. This means we need to lock IRQs while holding the
HWSPINLOCK.
Moreover, in an SMP context, we need to protect accesses to a HWSPINLOCK
between cores, so it is not possible to lock or release the same
HWSPINLOCK multiple times.
Introduce a zephyr spinlock per HWSPINLOCK to counter those issues. User
facing APIs have been udpated to take into account those changes, and a new
hwspinlock_dt_spec struct has been added to align with other subsystem on
the management of complex device's data.
Take the opportunity to rename public APIs to match the naming scheme of
normal zephyr spinlocks:
hwspinlock_lock -> hw_spin_lock
hwspinlock_trylock -> hw_spin_trylock
hwspinlock_unlock -> hw_spin_unlock
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Add general hwlocks and hwlock-names to base.yaml to be utilized by any
clients that uses hwspinlocks.
Additionally add hwspinlock-controller.yaml for common properties shared by
all hwspinlock controller devices.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
HW spinlocks are not supposed to be used by user application. They are used
to protect shared resources between clusters. Consumer of such spinlocks
should be other drivers in kernel space.
Moreover, syscalls were actually not generated properly because of
a missing call to zephyr_syscall_header() in CMakeLists.txt.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Add a configuration option to override the default BOOT_MAX_ALIGN value in
mcuboot. It defaults to the chosen flash's write block size to make it
backwards compatible.
This can be used when image slots are on different flash devices.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1. Introduced GDMA support for efficient data transfer in the
NPCX FIU QSPI driver.
2. Refactor flash driver mutex handling to enhance concurrency safety,
preventing other threads from preempting erase/write operations during
UMA until mutex release.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
1. Introduces boolean properties to enable support for different
versions of the FIU/Nor flash driver.
2. Add dmas phandle for DMA configuration.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Update the CAP initiator audio start unittest.
The reason for this, is that the recent change to endpoints
means that we need to properly generate a BAP unicast group
and call bt_bap_stream_config, instead of trying to manage
the bap_iso values directly.
As part of updating this, the tests were also updated to
significantly reduce code duplication, but generating
a default start param that can easily be reused.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds assert for bt_bap_iso_bind_ep to ensure that endpoints
from different connection don't share a CIS (a bt_bap_iso).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a check that verifies that 2 endpoints from different
connection don't share a CIS, which would be invalid.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We can actually already when we bind the endpoint to the stream
perform the call to bt_bap_iso_bind_ep, if the stream has been
added to a group.
If the stream has not yet been added to a group, then when
the stream is added to a group, then bt_bap_iso_bind_ep will
be done there (existing behavior).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add condition to check whether the pin is set as output before
reading the output high or low for gpio driver of Renesas RZ
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
The i.MX 91 Quick Start Board (MCIMX91-QSB board) is a platform designed
to display the most commonly used features of the i.MX 91 applications
processor. The MCIMX91-QSB board is an entry-level development board
with a small and low-cost package. The board can be used by developers
to get familiar with the processor before investing a large amount of
resources in more specific designs.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Change imx9111 and imx9131 use separate dts as they has different pin
configure.
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
This commit provides a CMakePresets.json which includes the sample's
CMakePresets.json file.
`west build` is extended to set `APP_DIR` in environment when sysbuild
is used. This allows sysbuild's CMakePresets.json to include the
sample's presets file.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Use CONFIG_STM32_FLASH_PREFETCH config option to enable flash prefetch
in C0/F0/F1/F2/F3/F4/F7/G4/L0/L1/L4/U0/U3/WB/WBA/WBL for consistency
with other SoCs that use this configuration switch, default enabled
at SoC default config level.
Add SoC hidden config option HAS_STM32_FLASH_PREFETCH enabled for
SoCs that support the feature. STM32_FLASH_PREFETCH is default
enabled for all SoC that have HAS_STM32_FLASH_PREFETCH unless target
specific constraints (as for G0Bx/G0Cx SoCs).
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
For compatibility, do not use spare registers to store mask data.
RTC mask data can be generated through the calendar and time mask
registers at runtime.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
gcovr 8.0 introduces suspicious_hits detection, warn on such detection, but
do not stop coverage calculation at all.
Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
Move to the latest commit of the hal_adi, using the new msdk-export branch
with a clean commit history.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Assert the reset pin for the duration specified by the modem
(`reset_pulse_duration_ms`) when booting, instead of immediately
de-asserting the pin.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Prioritise asserting the reset pin when a script fails instead of the
power pin, as the reset pin is a "harder" reset mechanism.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Commit eff5d02872 added
`net_socket_service_desc` to common-rom ld snippet but not to common-rom
CMake linker generator equivalent.
Bring common-rom.cmake up-to-date to ensure `net_socket_service_desc`
works correctly with the linker generator.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Twister netif:eth was missing on stm32n6 based board and hence they
were not build against net samples.
Fix this.
Additionally, on dk, fix `pwm` to respect alphabetical order.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Compilers may not like that attributes are provides in actual and extern
definitions of symbols.
Removing them from extern definitions
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Note glibc fopen supports the "e" modifier as an extension to pass
O_CLOEXEC to the open syscall.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set for them.
(This default behaviour is usefull for stdin/out/err so that new process
is kept connected to them, but it is very rare for it to be usefull for
any other descriptor)
In general this leads to descriptors being kept open unnecessarily,
which either will block other process from using them (for example
if the child survives the parent but it does something else while keeping
a port open).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.
Let's ensure we do not leak it for this component as we do not need it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the check in dwc2_unset_dedicated_fifo() that wrongly included the
current endpoint when testing for higher FIFOs. This caused false
warnings and early returns.
Use ~BIT_MASK(ep_idx + 1) to only test FIFOs above the current EP.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
virtio_pci_init_virtqueues was allocating more virtqueues than
specified by num_queues param if data->common_cfg->num_queues
was greater than num_queues
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
REQUEST_QUEUE was passed as queue_num to virtio_init_virtqueues
where REQUEST_QUEUE+1 was required
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.
Also remove the LL_RCC that plays no part in the driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Usage of stm32xxxx_ll_tim.c has been removed so we can also remove the
selection of USE_STM32_LL_TIM from the Kconfig.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the calls to LL_RTC_Init, LL_RTC_DeInit and LL_RTC_ALMA_Init in
the RTC counter driver. This avoids calling functions from
stm32xxxx_ll_rtc.c.
They are replaced by a set of simpler functions from the header file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove all function calls for functions that are defined in the
stm32xxxx_ll_rtc.c and replaces them by simpler calls from the header file.
Also remove the use of LL_RTC_AlarmTypeDef since no functions from the
header file uses it.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
`file(COPY_FILE ...)` is from CMake 3.21.
Zephyr still supports CMake 3.20, so use zephyr_file_copy(...)
instead of `file(COPY_FILE ...)`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Zephyr crashes when a new websocket connection is refused by the
user supplied callback function. This is caused by multiple calls
of close_client_connection(). After the first call the file handle
and the client->service pointer are invalid.
This fix checks if the file handle is valid.
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
The ADC and COMP on the nrf54h20 both have all of their analog
inputs routed to pads in different power domains than themselves,
this means the device drivers for both of them need to request the
pads to be resumed when active to allow any reading of the pads.
To keep the drivers simple, we can rely on HW to keep the power
domain the COMP and ADC are in powered, which happens automatically
when the ADC or COMP is ENABLED. We can then place them on the
power domain of their pads in the devicetree. This ensures the pads
are powered and not retained while the devices are RESUMED.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The NRFX SAADC device driver needs to implement PM DEVICE for it
to work with power domains, which is required for some SoCs. Inline
PM device runtime "self get/put" pm has been implemented for the
normal sync read API.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Deletes special LittleFS configuration for the FRDM-MCXA156 board.
It's not required after MCXA156 flash write-program-size
was reduced from 128 to 16 bytes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The connection using EAP-PEAP-TLS with Cisco AP is failed for IW610, and
the console log shows 'Memory allocation failed (-0x3f80)'.
Increase the MBEDTLS_HEAP_SIZE for 10K can fix this issue.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Not motivated by any impacted functionality but rather following good
practices. Recursive inclusions may be confusing and hard to diagnose.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This version is based on the CPU LPSPI driver, directly implementing
the submit call following the non-blocking asynchronous pattern.
This has been re-introduced after struggling to keep up with data
streaming applications, which demands reduced and controlled latency,
which for the default implementation (using RTIO workqueue) is not
guaranteed, due to being serviced by a thread-pool vs directly in the
ISR context.
This version includes limited feature-set, yet stress-tested:
- Required both rx-fifo and tx-fifo to be equal.
- 8-byte words supported only.
- SPI Controller-only supported (target mode not included).
- SPI_HOLD_ON_CS only supported with CS GPIOs.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
DSA switch performs L2 switching on hardware on DSA user ports.
The promisc mode requirement doesn't apply to DSA user ports.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The setup action now supports caching the ccache objects, set a
ccache-cache-key for the jobs that can benefit from it, disable it from
the ones that don't really build anything.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Reason for this extension are CRC mismatches happening due to RX data
loss when using the interrupt driven API at higher speeds and/or high
CPU load. It is recommended to use the ASYNC API along with hardware
byte counting requiring a timer instance and one PPI channel to achieve
a robust communication at high baudrates on nRF platforms.
Signed-off-by: Anouar Raddaoui <a.raddaoui@smight.com>
An uninitialized variable was returned on success which could led by
init_nrfs.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The default log process thread stack size needs to be increased to
account for the recursion into resuming power domains, which
may happen within char_out for some backends like uart.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Some MCUs are supporting external resistor dividers for gain setting in
standalone mode.
Add OPAMP_FUNCTIONAL_MODE_STANDALONE to the opamp_functional_mode enum.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
In the enum opamp_functional_mode becomes prefix
OPAMP_FUNCTIONAL_MODE_ to avoid clash with STM32 HAL macros
The suffix _MODE were removed to make the names shorter
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
This commit adds a new property in the device-tree bindings for swapping
the serial data input and output pins of the SPI/I2S peripheral for
STM32 microcontrollers that support it.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
The default value has changed in previous commits, so set it explicitly
in the devicetree with the new st,csbound property.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Limit a transaction to a boundary of aligned addresses. Each PSRAM may
specify different configuration.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
This commit adds a new property in the device-tree bindings for swapping
the MISO and MOSI pins of the SPI/I2S peripheral for STM32 microcontrollers
that support it.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Avoid incorrect (clock_control_subsys_t *) incorrect cast and
remove the cast of pclken in calls to the clock_control_
framework.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
STM32G4xx series shares several DMA configurations with
the other platforms. These changes aim to enable platform
specific DMA configuration and align them to other platforms.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
The driver did send some extra 0 bytes when the receive hasn't been
finished yet. This patch makes sure to avoid that.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
At the moment, if you would pass a NULL buffer to the driver, the rx and
tx counts of that buffer would not advance. This patch fixes that.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
The driver has ignored the first RX buffer. Most likely it has been
modeled for accesses to a SPI flash or similar where the first read data
is not relevant.
This commit makes sure that the driver can work as a universal SPI
master instead.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
siwx91x require a specific API to communicate with the bootloader in order
to achieve firmware upgrade. This commit introduces the configuration
symbol to import the helper library.
[Jérôme: split commits, reword the commit log]
Co-authored-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
This supports nuvoton numaker_m55m1 board, including.
Besides, re-organize for new target and Ethos-U support, including:
1. Keep only one model originally for MPS3 target
2. Add guide to regenerate Vela-compiled model for targets supporting
Ethos-U
3. Support running non-Vela-compiled model for targets supporting no
Ethos-U
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
It is unsafe to pass raw buffer as thread stack. Instead, use canonical
K_THREAD_STACK_DEFINE or friends to define thread stack.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Reordered ITCM section to appear before .text in the ARM Cortex-M linker
script.
This allows functions placed in ITCM via *(.text.<function_name>) using
snippets-itcm-section.ld to avoid being absorbed into the default .text
section, enabling more flexible code placement.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
copy may be uninitialzed in the default case, which causes some
compiler warnings/errors when returned and used.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
support gpio wake up function.
change init stage from POST_KERNEL to PRE_KERNEL_1
because uart wrap init need to use the gpio functions.
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
strlen returns size_t, not int. Fix the format specifier to avoid warnings
when building with -Wformat.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add __printf_like attribute to ztest assertion functions
zassert, zassume, zexpect to validate format strings and arguments
at compile time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add secondary_app_partition aliases.
Those aliases can be used to configure the code partition for the
second copy of the FW in the Direct XIP update scenarios.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Add an early init hook to check the boot mode and reset into the RP2 USB
bootloader if requested. Includes a snippet to use with any RP2040/RP2350
board to enable the necessary DTS/Kconfig to use the functionality, and
easy DTS includes for boards to use explicitly.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Commit 5c5e17f introduced a subtle regression when userspace was
configured on architectures requiring guard pages.
Prior to 5c5e17f, the assumption was that guard pages would be included in
`CONFIG_DYNAMIC_THREAD_STACK_SIZE`, and that was something that the caller
of `k_thread_stack_alloc()` would need to be aware of, although it was not
documented at all, unfortunately.
It seems that 5c5e17f intended to remove the need for that assumption, but
the necessary conditions for doing so had not been met.
Update pool storage size to account for guard pages, which ensures that
users can access every byte of `CONFIG_DYNAMIC_THREAD_STACK_SIZE` rather
than needing to be aware that guard pages would be included in the
requested size.
The compromise is a more intuitive API at the cost of more storage space
for the pool of thread stacks when userspace is enabled.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Compilation fails if CONFIG_SDMMC_STM32_EMMC is set. This bugfix
adds #ifdef ... #endif pairs for unused static functions and
a call to stm32_sdmmc_card_detect_uninit().
Signed-off-by: Andreas Schweigstill <andreas@schweigstill.de>
Since the protocol doesn't have message IDs in the responses to these
update messages, there's no reliable way to know, if an update succeeded or
not. I use that fact to simplify the implementation by:
- Not providing success/failure callbacks.
- Not handling updating the variables in the client struct while
an update is in progess.
In addition to adding some tests, I tested this with the emqx server.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Move the selection of the dma channel and the sensor input clock into
a board specific overlay since this differ from a board to another.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The i2c bus configuration and dcmi pins alternate function settings are
already done within the board dts since this is fixed for each board
so remove then from the shield overlay.
The dmamux node enabling is also removed since currently the DCMI/DMA
cannot rely on dmamux.
In the shield main overlay file, ensure that the i2c bus is properly
enabled.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The pin alternate function settings are boards related so configure
the dcmi pinctrl within the board dts file in order to remove them
from the shield board specific overlay.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add connector, i2c and dcmi labels and pinctrl in order to allow
usage of a camera module shield with this the stm32h747i_disco board.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Function stm32_dma_config_channel_function is unused hence remove it
from headers and dma_stm32_v1. In case of dma_stm32_v1, the related
configuration is already part of the LL_DMA_Init call done in
another place in dma_stm32.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The dma_stm32_slot_to_channel function is only applicable on the
STM32Fx series since the LL_DMA_CHANNEL_x macros only exist for those
platforms among the one based on st,stm32-dma-v1.
While checking for !defined(CONFIG_DMAMUX_STM32) is ok to enable this
on STM32Fx, it prevents to disable dmamux on other platforms since
required symbols do not exist.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Channel ID should be numbered starting from 1.
Correct the dma properties of dcmi devices in L4 series
and use dma1 by default to make it same for all L4 series.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Introduced a API to get the current I2C configuration.
Facilitates runtime inspection of I2C settings.
Useful for debugging and dynamic configuration changes.
Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
Running full documentation build on GH hosted runners is not really
working for us anymore as we run out of disk space.
Switch (back) to our self-hosted runners.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add support for Omron D6F mass flow rate sensor series. The sensor series
outputs an analogue voltage which is read using an ADC.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add flow rate to `enum sensor_channel` in litres per minute.
The SI unit for flow rate is cubic metres per second. Due to a sensor value
resolution of 1/100000 this unit is not granular enough for low flow rate
sensors.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
After running 'kernel reboot' cmd on coex application,
zephyr os clean bss section, IMU13 IRQ event data set as 0,
then CPU3 receive IMU13 IRQ from CPU1, need access IMU13 IRQ event,
cause hang.
Put enable IMU13 IRQ operation after related task and event created
to fix this issue.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Use k_timepoint_t instead of k_timeout_t for absolute time to avoid
ambiguity and ensure the code works even when CONFIG_TIMEOUT_64BIT=n.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
Add Kconfig options for default period/pulse values and port to
remove platform/vendor specific preprocessor conditionals.
Signed-off-by: Alexander Lay <alexanderlay@tenstorrent.com>
Introduce a common pwm-test alias for pwm device nodes to remove
platform/vendor specific preprocessor conditionals.
Signed-off-by: Alexander Lay <alexanderlay@tenstorrent.com>
Adds a skip-calibration property to the voltage divider sensor,
which can be enabled, in case the underlying ADC driver
does not support calibration.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Do not read extra byte when we decide to drop a frame.
Instead go directly to MODEM_CMUX_RECEIVE_STATE_SOF, so the next
flag character will start a new frame.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
smf_set_state() excludes ancestor/descendant relations before calling
get_lca_of(). The function now walks from source->parent and returns
the first ancestor that contains dest. The 'ancestor == dest' case
was unreachable and is removed.
No functional change intended.
Ref: RFC #95952
Signed-off-by: Vlad Kulikov <vlad_kulikov_c@pm.me>
Add a default heap reservation for gettaddrinfo(), enough for a single
function call in a default configuration on 64-bit platform.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
update the function name in driver since pllsai1m was changed
to pllsaim in clock_stm32_ll_common.h.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Two platforms are failing posix tests. One is a known issue with a fix in
review (mps2/an385 userspace), and the other is an issue with
qemu_arc/qemu_arc_hs5x encountering an invalid instruction and crashing.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Rework the formula used to convert timer CC values to SOF offset to
eliminate a "division glitch" happening around SOF crossing, i.e. when
the framestart shifts from being captured shortly before SOF to being
captured shortly after SOF.
When audio samples are consumed faster than nominal, i.e. when there
is +1 samples every now and then, the reported SOF offset at High-Speed
was going 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, "glitch" 7, 6, 5, 4, 3, 2,
1, 0, -1, -2, ...
With the fix the SOF offset goes as expected from 0 to -1, i.e. there is
no jump from 0 to 7 around the SOF crossing and the reported SOF offset
goes linearly (until it is correclty bumped from negative values back to
positive values when +1 sample packet is transmitted on I2S).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Allow the samples to work both at Full-Speed and High-Speed exposing the
same capabilities at both speeds.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add Radio core and PPR core on nrf54h20 DK to platform_allow list.
Required overlays are already present.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
The spi_loopback test requires more RAM than is avilable
on nrf54h20dk/nrf54h20/cpuppr target.
Meanwhile, test fits in Execute In Place (XIP) variant
of the PPR target.
Switch spi_loopback test to nrf54h20 PPR XIP target.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Do not queue new buffer after bus reset if there is one already queued.
This fixes memory leak on each bus reset if there are no SETUP transfers
received between resets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Reverting changes from the `b0aa0c7571fa587d5a0df8edd114377aba24da51`,
as boards can be populated with variety of PSRAM and sizes. Leaving the
configuration up to user code and/or to provided snippets.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
This macro doesn't accept a delay parameter anymore (well, it does, but
it's deprecated and will trigger build warnings). Just remove it from the
places that were still passing it.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Commit a60f93d742 removed the delay parameter
from various SPI macros, but aimed to retain a clean migration path by
throwing a deprecation warning when the parameter is still passed. However,
the commit failed to have this feature included in the SPI_DT_IODEV_DEFINE
macro. This commit should fix the issue.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Use the timing params from spi_config that are specific to the slave
instead of using the same timing for the controller for all slaves.
Remove these properties from the LPSPI DT binding.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Get bit ordering from DT property in SPI_CONFIG_DT.
More precisely, set LSB first if set in DT.
- Get CS polarity from DT property in SPI_CONFIG_DT.
- Add inter-word delay parameter to spi_config struct. If value is 0, the
value will be half of the period.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The CS delay parameter did not make a distinction between the setup and
hold time of the CS, and also did not specify very fine control which
can be done usually by a native controller CS. So use the new nanosecond
DT properties to get the delay values and make distinction.
Add deprecation warning if consumer supplies the delay parameter and
make it still work the old way in that case for backward compatibility
following API lifecycle process.
Update driver API version to 1.1.0 due to this change
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add spi parameters for spi peripherals to spi-device.yaml.
These properties and their names are mostly inspired by linux
spi-peripheral-props.yaml.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add support for the RTC, WATCHDOG, and DMA peripherals.
These are required for the DMA and RTC, WATCHDOG test drivers.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- add .overlay with appropriate configurations for
nucleo_h753zi
- update testcase.yaml file for CI testing
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- add .conf and .overlay with appropriate configurations for
nucleo_h753zi
- update testcase.yaml file for CI testing
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- enable i2c2 node in dts
- add .conf and .overlay with appropriate configurations for
nucleo_h753zi.
- update testcase.yaml file for CI testing
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add the CONFIG_BOARD_NUCLEO_H753ZI symbol to enable running
tests on the NUCLEO_H753ZI board.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- add .conf and .overlay files with appropriate configurations
for nucleo_h753zi.
- enable sample to run in CI on nucleo_h753zi.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Certain SPIM instances in nRF52/53/54L/54H Series provide hardware
control of the CSN (chip select) line. Although the standard SPI
drivers do not use this feature, it should be possible to configure
this line through pinctrl in case some special driver needs this.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Default disable flash prefetch on G0Bx/G0C1 to prevent issues
described by errata ES0548 2.2.10. Project can still enable
the config if applicable.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
To avoid conflicts between the C library's `time.h` and signal.h use an
"override" header (when necessary) for C libraries that do not themselves
provide POSIX definitions in `time.h` or `signal.h`.
V2
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a header for satisfying POSIX conformance requirements of signal.h
that is named posix_signal.h rather than signal.h.
The primary reason for doing so, is that the de-facto owner of signal.h is
the C library.
This new header only defines required POSIX symbols that form a strict
superset over the ISO C signal.h symbols.
V2
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a header for satisfying POSIX conformance requirements of time.h
that is named posix_time.h rather than time.h.
The primary reason for doing so, is that the de-facto owner of time.h is
the C library.
This new header only defines required POSIX symbols that form a strict
superset over the ISO C time.h symbols.
V2
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Assuming that the `posix` tag will trigger `posix` tests to be run
when this testsuite is changed.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
DT_PROP_OR instead of DT_INST_PROP_OR was used and property from
device tree was never used.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Replaced all pointer to rvalues used for the second parameter in calls of
timespec_compare() within function timespec_to_timeout(). This might be
legal syntax in C, but leads to compile errors when timeutil.h is included
and compiled in a C++ compilation unit.
Signed-off-by: Philipp Finke <philipp.finke@sick.de>
This commit adds support using pm_s2ram for 54H when the
MPU is disabled. This is the case for the out of tree
sample `sdk-nrf/samples/nrf54h/empty_app_core`.
Without this commit the linker will fail to link
`z_arm_mpu_init` and `z_arm_configure_static_mpu_regions`.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The conditions needed to declare `uart_ambiq_pm_action()` in
`uart_pl011_ambiq.h` and the conditions needed to use it in `uart_pl011.c`
differed, which would result in a warning promoted to error during
weekly CI runs.
Ensure that the conditions match to remove the warning / error.
```cpp
if defined(CONFIG_SOC_SERIES_APOLLO3X) || \
defined(CONFIG_SOC_SERIES_APOLLO5X)
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
- Since ti-hdc20xx is a sensor, it should use SENSOR_DEVICE_* macro for
definition.
- Allows it to work with sensor_shell properly.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Remove address-of operator ('&') when assigning `adc_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` and `DEVICE_DT_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/adc`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
When a connectable advertising set is stopped, the
preallocated connection object is free by calling
bt_conn_unref which triggers a call to the recycled
callback.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There are some poorly compliant mdns responders on the network
that will respond with zero counts on the answers and the additional
records (in addition to the qdcount). So, this removes the checks
in the unpack method since this is a "valid" DNS packet but the
logic is already partially handled in the dns_read code already.
An example packet can be seen in this decode
0000 33 33 00 00 00 fb 9a f8 c3 0c 07 0b 86 dd 60 07 33............`.
0010 c4 e4 00 14 11 ff fe 80 00 00 00 00 00 00 98 f8 ................
0020 c3 ff fe 0c 07 0b ff 02 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 fb 14 e9 14 e9 00 14 f1 64 00 00 .............d..
0040 84 00 00 00 00 00 00 00 00 00 ..........
User Datagram Protocol, Src Port: 5353, Dst Port: 5353
Source Port: 5353
Destination Port: 5353
Length: 20
Checksum: 0xf164 [unverified]
[Checksum Status: Unverified]
[Stream index: 2]
[Stream Packet Number: 1]
[Timestamps]
UDP payload (12 bytes)
Multicast Domain Name System (response)
Transaction ID: 0x0000
Flags: 0x8400 Standard query response, No error
1... .... .... .... = Response: Message is a response
.000 0... .... .... = Opcode: Standard query (0)
.... .1.. .... .... = Authoritative: Server is an authority
for domain
.... ..0. .... .... = Truncated: Message is not truncated
.... ...0 .... .... = Recursion desired: Don't do query recursively
.... .... 0... .... = Recursion available: Server can't do
recursive queries
.... .... .0.. .... = Z: reserved (0)
.... .... ..0. .... = Answer authenticated: Answer/authority
portion was not authenticated by the server
.... .... ...0 .... = Non-authenticated data: Unacceptable
.... .... .... 0000 = Reply code: No error (0)
Questions: 0
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
For these particular tests, many platforms require higher
CONFIG_MAX_THREAD_BYTES than the default 2, so guard
against failures by setting it high.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This commit adds cache handling for Hifi4 core on RT700.
Enable CACHE_MANAGEMENT and HAS_DCACHE.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Enable pcal6408 gpio expander on FRDM-IMX93 board. This expander has
its reset pin controlled by another expander, and both expanders is
driven by the same pca_series driver. To guarentee correct init order,
pcal6408 is set to deferred init in a board init function.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Add XENMEM_acquire_resource wrapper to map device model related buffers.
This is required for communication with the ioreq server.
- memory
- xendom_acquire_resource:
HYPERVISOR_memory_op(XENMEM_acquire_resource)
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Replace `gnttab_get_page()`/`gnttab_put_pabes(addr)` with
`gnttab_get_pages(npages)`/`gnttab_put_pages(addr, npages)`
for supporting multi-page operation.
Note: This is a breaking change, update callers accordingly.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
- Fixes issue where zephyr,flash in ocram node overlaps with physical
SRAM sram1 used for zephyr,sram.
- Moves default zephyr,flash from external flash to M4 ITCM to improve
performance.
- Updates overlays that moved zephyr,flash to ocram now use default
Signed-off-by: Derek Snell <derek.snell@nxp.com>
- Fixes issue where zephyr,flash in ocram node overlaps with physical
SRAM sram1 used for zephyr,sram.
- Updates overlays that moved zephyr,flash to ocram now use default
Signed-off-by: Derek Snell <derek.snell@nxp.com>
This commit adds a build test for the new `worldsemi,ws2812-uart`
driver. A devicetree node for the driver is added to the app.overlay,
instantiated on a `vnd,serial` test UART.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Add the `uart-controller-pin-inversion.yaml` include to the `vnd,serial`
test binding. This enables testing for other drivers that require pin
inversion to function correctly. For example, the
`worldsemi,ws2812-uart` LED strip driver relies on `tx-invert`.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
This commit introduces a new driver for WS2812 and compatible LED
strips that uses a UART peripheral.
The driver generates the precise, high-speed signal required by the
WS2812 protocol by encoding each data bit into a multi-bit "symbol"
and using a frame-aware packing strategy for transmission:
- Signal Inversion: The UART's TX line must be inverted (tx-invert)
to create the protocol's required idle-low signal. A UART start
bit then generates the initial high pulse of a WS2812 bit.
- Frame-Aware Packing: The driver reuses the UART's hardware-
generated start and stop bits as the first and last bits of the
on-wire symbol. The inner bits of the symbol are packed into the
UART data payload.
This packing scheme imposes a configuration constraint: the total
number of bits in a UART frame (1 start + N data + 1 stop) must be
an integer multiple of the symbol's length (bits-per-symbol).
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Add a new devicetree binding, worldsemi,ws2812-uart, for controlling
WS2812-compatible LED strips using a UART peripheral.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
ASAN reports error with native_sim after "gpio info <TAB>":
runtime error: index 1 out of bounds for type 'gpio_ctrl [1]'
So, although the dev pointer was not used, don't even read it
from out-of-bounds of gpio_list.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Minor updates to both the k_thread_deadline_set() and
k_thread_absolute_deadline_set() API documentation.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This is a follow up to commit 4fe2c5bd5f.
The UDC_DWC2_USBHS_VBUS_READY_TIMEOUT Kconfig option should be available
also for nRF92 Series SoCs (as it was previously when it depended on
NRFS_HAS_VBUS_DETECTOR_SERVICE), otherwise some builds will fail for
such targets.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Otherwise we'd always return false in spite of the flag being set in
the encoded data, which may lead to the user not reading the underlying
data in an event-paced readout scheme.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Rework how the STM32 UDC driver determines the PHY used by a given instance
and the speed at which the instance is able to and allowed to operate.
The PHY determination now uses the 'phys' property instead of looking at
whether nodes with a specific compatible were enabled. Similarly, the speed
determination takes into account the 'maximum-speed' property, along with
the selected PHY's and the instance's capabilities.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rework how the driver performs PWR configuration and initializes HS PHYs.
Originally, the initialization logic was split in half without any real
logic. There were also attempts to share some logic but this resulted in
code that was difficult to understand.
Initialize PWR and PHY in well separated steps, and use explicit series
and PHY type checks in each part to ensure the logic is easy to understand.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rework the STM32 USB UDC driver to use HAL PCD macros for speed selection,
as should have always been done since that is the library used by the shim
driver. Also dummy definitions to ensure cross-series compatibility
without many #if blocks in the driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The driver supports high-speed capable controllers. Select
the appropriate Kconfig options to ensure that the stack does
not optimize away high-speed support.
Signed-off-by: Martin Gysel <me@bearsh.org>
Add cpuclk driver for mt8188 platform. Note that the cpuclk driver is
not yet ported, it works only with mt8188.
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
Update hal_xtensa revision to add HAL integration for mt8186/88
and mt8196 DSP processors.
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
Add configs for mt8195 and mt818X platforms to build them outside of SOF
environment and run by twister
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
Fix timer clock source initialization for MT8188, MT8186 platform.
Add 26Mhz define that is specific for MT818X.
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
On MT8188 platform timer interrupts must also be enabled/disabled in
MTK_ADSP_IRQ_EN register in addition to xtensa_irq_enable(),
xtensa_irq_disable()
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
Add 'ax' flags for .sof_entry ELF section so it merges properly with
.z_xtensa_vectors ELF section
Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
Fixes#91045
Adding NO_SPLIT in the TOOLCHAIN_LD_FLAGS list caused every flags in the
list to be checked together by the linker. This caused issues where
incompatible flags was passed together, and the result was that none was
propagated to the linker.
By using separate variables, we can achieve the initial goal of NO_SPLIT to
only group a sub-set of flags.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
The stm32_i2c_master_mode_end function can be
replaced with a simple irq disable and giving to
the device sync semaphore
Signed-off-by: Erik Andersson <erian747@gmail.com>
stm32_i2c_msg_read and stm32_i2c_msg_write
for interrupt mode is replaced by a common
function: stm32_i2c_irq_xfer
Signed-off-by: Erik Andersson <erian747@gmail.com>
- Rework transaction flow to better match reference manual
and errata sheet for STM32 I2Cv2 peripheral
- Handle message transactions larger than 255 bytes in isr
- Combine stm32_i2c_msg_write and stm32_i2c_msg_read into
one common function stm32_i2c_irq_xfer when using interrupts
Signed-off-by: Erik Andersson <erian747@gmail.com>
To prepare for further patches and separation
of interrupt/DMA modes from polled, this commit
introduces two helpers for starting and stopping
DMA transfers
Finsishing DMA transfers are also moved from
interrupt handlers to thread after beeing wokenen
by semaphore
Signed-off-by: Erik Andersson <erian747@gmail.com>
During testing with teensy 4.0 it was discoverd that toggling
at high frequencies led to missed steps. As per the datasheets
of step-dir drivers an active edge needs to be maintained for
a certain timerperiod, for a step to be executed.
Instead of toggling pin twice instantaneously, the current fix
halves the step period and the step-pin is toggled on the timeout
of the respective timing source.
rework stepper stepper stop
set step pin to low if the driver does not support dual edge
and increment/decrement the actual position by one
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
- Adds frdm_mcxn236.conf board configuration
for ZMS sample and ZMS test.
- Its Flash write-size is 128, which requires special configuration.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Full CMUX frames are way too much to fill the debug log
so disable those by default.
Sometimes it is enough to see the CMD and response types, without
hexdump.
Added also debug messages for opening and closing events.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Refactor a bit the RX FIFO handling to prevent RX transfers performed
in Single IO mode from getting stuck when they are suspended due to
the empty TX FIFO and cannot be resumed because there is no further
interrupt in which the TX FIFO could be filled properly with dummy
bytes above its transfer start level.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Boot ROM will by default set on/off delays to 0ms before jumping to
firmware. This patch adds an option to to configure the on/off delays to
non-zero values. A flash power cycle guarantees to put the external
flash into a known state before executing code from it. This is required
if using 4-byte address mode in the external flash, as the boot ROM will
always use 3-byte address mode when reading from external flash, causing
a potential deadlock situation requiring a power-cycle (known errata).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The ZMS backend for Settings uses the `flash_area` API, which means it
requires CONFIG_FLASH_MAP to be enabled, so update Kconfig accordingly.
Note that ZMS itself does not depend on this.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Add gpio_dt_spec based helpers for easier access to:
* gpio_emul_input_set
* gpio_emul_output_get
* gpio_emul_flags_get
Signed-off-by: Maximilian Werner <maximilian.werner96@gmail.com>
It is essential for the overwrite mode to allow confirming the secondary
slot to provide the permanent update.
This types of updates is the only mode in which the application may be
upgraded.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Fix the incorrect usage of Kconfig symbols and revert back the default
behavior to allow for non-active slot confirmation.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Fix the issue reported by Coverity CID 487708. The LL_ASSERT was
performed on lll->ptc, which is a 4-bit bitfield and therefore always
succeeds. Instead, the computation (lll->nse - nse) should be checked
to ensure it falls within the 4-bit value range before assigning it
to lll->ptc.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Do not select CONFIG_SYS_MEM_BLOCKS when enabling the Atmel SAM0 USB device
controller driver as the implementation does not use the system memory
blocks allocator.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Update board.cmake for corstone300_fvp to select the correct
Fast Model binary based on Ethos-U configuration.
Use the Ethos-U65 binary if ETHOS_U65 (128/256/512) is set.
Otherwise default to Ethos-U55.
Signed-off-by: Johan Alfvén <johan.alfven@arm.com>
Following introduction of LV_Z_MEMORY_POOL_ZEPHYR_REGION and
LV_Z_VDB_ZEPHYR_REGION, remove the usage of the option
LV_Z_VDB_CUSTOM_SECTION and the related linker scripts for
STM32 boards & shields.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Allow selection of a custom section for memory-poll and / or VDB
based on zephyr memory-regions.
This takes advantages that zephyr,memory-region automatically have
sections being created, hence allowing to easily indicate into which
memory-region to store data.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Initialize the UART configuration from the default line coding
when the CDC ACM device is started. This ensures that the UART
configuration matches the default line coding until the host sets
the line coding for the first time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Clean up headers includes section:
- Remove conditional inclusions
- zephyr/, then susbystem/, standardlib, locals
- Sort alphabetically within these categories
- Remove the ones already available through _priv.h
Noticeable exception, lldp.h requires prior net_pkt.h inclusion
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Since phy init is not in this function anymore, it can be moved back
to driver initialization function.
While I'm at, harmonize v1/v2 flavors of the function.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To be able to split code, some functions were removed their static
attribute, which opens the possibility of name conflict.
Rename them by adding eth_stm32_ prefix.
Additionally, review their sorting in the header file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Split V1 and V2 code from the common file of STM32 ethernet
driver.
Whenever it is possible, make use of v1 or v2 version of functions
that are call from the common file in order to maximize factorization.
Review definitions to put them where they are used.
Review header inclusions to minimize them.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In an effort to make stm32 eth driver files easier to read and maintain,
split the ptp code in a dedicated file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 678e226045.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This reverts commit 29750ac05d.
This commit was part of PR 94142 which has been merged
while a discussion was still on going on the right direction
between splitting V1 and V2 or keeping a common file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Commit bc8d66d538 introduced a
result argument to some RTIO callback handlers. Update for the IIS3DWB
sensor.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
flushing rx pending already happens in
uart_litex_fifo_read, which should be called
by the callback, so don't do it again, also
it can lead to the drop of chars, as flushing
removes the current entry in the fifo.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1. the three boards share the same board schematic
- frdm_mcxa266, frdm_mcxa346, frdm_mcxa366
2. board dts,kconfig and cmake file could share
3. add MCXA366 soc and frdm_mcxa366 board
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
1. nxp_mcxa266_a346_a366_common.dtsi created for soc dts
2. frdm_mcxa266_a346_a366_common.dtsi.dtsi created for board dts
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Use default_unicast_group everywhere in the CAP shell, and mark
all creation of it as default_unicast_group.is_cap = true.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the function bap_ac_create_unicast_group to the CAP
shell, as that was the only user of it, and rename it to
cap_ac_create_unicast_group, and make it use the CAP API.
Also rename bap_unicast_ac_param to cap_unicast_ac_param
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a common unicast_group struct for both the BAP and
CAP shell, similar to the broadcast_source.
The purpose of this is to be able to use the appropriate type
for both the CAP and BAP shells, instead of using the BAP
unicast group for the CAP shell.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Process all in one callback, in order to reduce latency.
The following changes have been done:
- Process FIFO read-out and/or Data-ready in GPIO callback.
- FIFO Full is handled on completion if needed.
- Omit fifo-count fetching, to optimize cycles. The watermark
count is the number of samples we're going for.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
By introducing three states: Off -> On -> Busy -> (Offf)
This allows us to more clearly guard on-going events and detect
overlapping triggers.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Since the driver knows how many samples it wants (because of the
watermark threshold), stick to that per event in order to facilitate
batches of N number of samples.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to allow the error-handling scheme to take action, instead
of crashing when asserts are enabled. Now possible since we have RTIO
error handling for streaming mode.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Similar pattern applied to other in-tree sensor drivers, where
preparing a set of SQEs for writing/reading on registers is a recurrent
syntax.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The IIS3DWB is a system-in-package featuring a 3-axis digital vibration
sensor with low noise over an ultrawide and flat frequency range.
The wide bandwidth, low noise, very stable and repeatable sensitivity,
together with the capability of operating over an extended temperature
range (up to +105 C), make the device particularly suitable for vibration
monitoring in industrial applications.
Datasheet: https://www.st.com/en/mems-and-sensors/iis3dwb.html
This driver is currently only supporting the polling-mode read_and_decode
APIs (both blocking and non-blocking).
This driver is based on stmemsc HAL i/f v2.9.1.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Update sensor_decoder_api.decode Doxygen to reflect changes in the
parameters, including the change from the channel parameter to
channel spec.
Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
Change name of the struct sensor_chan_spec paramater from "channel" to
"chan_spec" to reflect its type.
Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
- Add the pdl-based version of the i2c driver for infineon devices
like the one found on the kit_psc3m5_evk board.
- In the pull request review it was decided that the
I2C_INFINEON_CAT1_ASYNC option was not needed. The driver would
always be interrupt driven. This meant that the existing driver
had to be updated as well.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Add a teardown function flash_stm32_teardown to ensure write protection
is disabled after test execution, avoiding side effects on subsequent
tests.
This prevents issues where write protection remains enabled
if a test fails before cleanup.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add initial power management support for i.MX943 M-core (M33/M7)
This lays the foundation for multi-core PM handling on i.MX943
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Generic:
- Enabled more OpenThread functionalities for Border Router application
NXP RCP:
- Set number of max RCP restoration count to 10
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fix an incorrect type cast when trying to obtain an
otPlatDnsUpstreamQuery pointer from user data passed to dns resolver
module.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This tests is failing in CI and at random locally.
While we understand why and how to fix it, let's disable it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the temperature sensor with a dht0 alias if available in
the Bluetooth Health Thermometer sample. This alias is already
used by the sensor/dht_polling sample app for temperature
measurement, and is supported by several boards in the tree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Improve how segment information looks like for MCUboot and SimpleBoot.
* silently igonore padding segments (if VMA is 0x0)
* do not duplicate mapped segments lines (IROM and DROM)
* fix IROM segments taht was incorrectly labeled as IRAM
Signed-off-by: Marek Matej <marek.matej@espressif.com>
The new nrf-802154 now has the updated API signatures. The migration
code is no longer needed.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Update hal_silabs to include simplicity_sdk v2025.6.2.
Modify Bluetooth controller configuration to match HAL changes.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
When running just the test mqtt_sn_client::test_mqtt_sn_wait_suback on
native_sim, the current timestamp is still 0. That caused the test to fail,
because 0 is used as an indicator, that the message has never been sent,
thus sending it every time process_work is executed.
Instead of adding additional variables and complexity, the code now simply
treats now==0 special and waits 1ms until doing anything.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
- The paho client does that, too.
- This allows running single tests, because they don't rely on previous
ones having incremented the msg_id a certain number of times.
- The variable already existed in the client struct, but wasn't used. I
guess it was intended that way but never implemented.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Making the assumption, that mqtt_sn_connect does not process any incoming
data allows for this to be a very simple, additional API function instead
of adding more complexity to the connect function. This also means that the
user has to re-add predefined topics upon reconnects which don't reuse the
old session though.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Make the STM32 I2C transfer timeout configurable via Kconfig.
- Add CONFIG_I2C_STM32_TRANSFER_TIMEOUT_MSEC Kconfig symbol.
- Use this Kconfig value in both STM32 I2C drivers.
Tested on STM32WBA55CG.
Fixes: #95819
Signed-off-by: Pablo Bacho <pablobacho@gmail.com>
This updates the Intel Audio DSP smoke test to use the new
IPC API based on IPC message service. The old API is still
being tested for now until all users of the old API has
moved to the new one.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This reworks the Intel audio DSP host IPC driver as a backend of
the IPC service. This is the first step to rework IPC in SOF
(Sound Open Firmware) into using a more generic IPC API instead
of a SoC specific one.
For now, it keeps the old interface to maintain usability
as it is going to be a multiple process to rework IPC
over there.
Also, the structure of the new IPC backend resembles
the SoC specific driver to make it easier to compare
between them at this first iteration. Future optimizations
will probably be needed once we start modifying the SOF
side to utilize the IPC interface.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds ACE boards to the allowed platforms so they can
be tested.
Note that this only adds boards that I have tested to run
correctly with the tests.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The 4th CPU test tries to gauge tight loop performance. However,
it has been observed occasionally that the calculated would go
over just a bit. The threshold was 3, and the observed ratio
has been bouncing between 2.9 and 3.1. So up the threshold
a little bit to account for that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
On ACE, the CPU halting requires the cooperation of the PM
subsys to set the CPU to SOFT_OFF. The mechanism has not
been implemented in the smoke test. So skip the halting test
on ACE for now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The IPC is only needed for old hardware earlier than CAVS 2.5.
They are no longer supported in the tree as their board configs
have been removed. So there is no need to do IPC anymore.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The SoC specific IPC driver is for host IPC, and not IDC (which
is between CPUs). So there is no need to use the IDC devicetree
binding to enable the kconfig.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This IPM driver is not being used by SOF and is there simply for
a test which does not provide much additional value compared to
the existing host IPC tests. That IPM specific test has been
removed so there is no need to keep this driver in the tree.
This is in preparation to rewrite the host IPC driver to utilize
the IPC API. There is no need to maintain another driver that is
not being used in SOF.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This removes the IPM test from the intel_adsp smoke test.
The IPM driver is not being used by SOF and is there simply
for this test. The host IPC functionality is also being tested
via test_host_ipc. The additional usage of mailbox in the test
does not provide much value since the mailbox is shared memory
between the DSP and the host. We would have bigger problems if
the shared memory does not work properly.
Removing the test is in preparation to removing the CAVS host
IPM driver. That is also a preparation to rewrite the host IPC
driver to the IPC API, and there is no need to maintain
another host IPC driver that is not used by SOF.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Various drivers have their own static versions of reg_read()/reg_write().
When building for riscv the macros conflict with the driver function
causing compiler failures. Prefix them with riscv_ to avoid conflict
and move them into the unit test which is the only place they are
used.
Signed-off-by: Lee Trager <lee@trager.us>
Adds a testcase to the send on connect test for sending data over a
user-defined fixed L2CAP channel.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds support for the user defining their own channels within the
fixed L2CAP channel range. To make this possible, the
`bt_l2cap_fixed_chan` struct and `BT_L2CAP_CHANNEL_DEFINE` macro
needed to converted to public API. In the process of doing so, the
`_destroy` parameter was removed from the `BT_L2CAP_CHANNEL_DEFINE`
macro as it was never used (fixed channels will not be destroyed over
the lifetime of the connection). `BT_L2CAP_CHANNEL_DEFINE` is renamed
`BT_L2CAP_FIXED_CHANNEL_DEFINE` to avoid confusion
The `bt_l2cap_chan_send` function is updated to be able to send data
on fixed l2cap channels.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Rename the bt_bap_is_x_ep functions to better match the
modules where they are implemented.
Additionally modify the check to use IS_ARRAY_ELEMENT
in the broadcast sink and source for a stricter check.
IS_ARRAY_ELEMENT cannot easily be used in the unicast
client and server, as the endpoints are part of another
structure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We check for all other roles when checking whether
an endpoint can send or receive, except for the unicast server.
It is technically implied, but if the ep is not a valid pointer,
then we may access invalid memory.
Add check for bt_bap_ep_is_unicast_server (which uses the new
bt_ascs_has_ep function).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a test of the CONFIG_NATIVE_SIM_REBOOT functionality together
with the hw_info get_reset_cause() logic.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Support reporting the reset cause for native_sim. The default is to
report POR (Power-On Reset). If CONFIG_NATIVE_SIM_REBOOT was enabled and
the system is rebooted using sys_reboot(), the reset cause is set to
SOFTWARE.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Align with native_simulator's upstream main
4eab13716376e63236d77013f996a897d24dd780
Which includes:
4eab137 Host trampolines: Add getenv/setenv
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use statically registered event handler.
Otherwise we might get stuck waiting for event that has already
happened.
Network events are not keeping the state.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This commit adds support for IAR C-STAT Static Analysis
in the Zephyr's SCA Framework.
By specifying -DZEPHYR_SCA_VARIANT=iar_c_stat in west, a SQLite
database file will be generated under build/sca/iar_c_stat.
Signed-off-by: Felipe Torrezan <felipe.torrezan@iar.com>
Add stress test which validates that allocator is thread safe
and has no memory leaks.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add micro heap implementation which is using one or more 32 bit masks
to allocate quickly blocks. It is significantly better than using
sys_heap. Difference is especially big on RAM3 heap because heap
control data is in RAM3 space so operations there were extremely
slowly (15 us to allocate a buffer).
Simplified implementation of the heap requires DMM API change as
release functions need to know the length of the allocated buffer as
simple heap requires that (buffer address is enough for the standard
heap).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Default memcpy used in zephyr is not optimized and performs simple
byte by byte copying. Using double word or word access can significantly
reduce copying time especially for RAM3 (slow peripheral RAM).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Clang's -Wused-but-marked-unused warns when variables marked as
__unused are actually used. Logging macros can trigger this warning
depending on CONFIG_LOG_* settings, leading to noisy builds.
This change suppresses those warnings, allowing the warning flag to
be used alongside logging functionality.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the CAP commander status to being feature complete with
BSIM test after implementing the last missing procedures
(Handover).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement the broadcast to unicast handover procedure,
as per the Bluetooth CAP specificiation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extend the gen_isr_table test to support the Hazard3 cores on the
RP2350A. This allows some testing when building and running using flash,
but it seems like Twister builds with different flags. It's unclear if
this is intended or not.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Now that there's support for the Hazard3 cores these comments are
incorrect. Remove them.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
All the samples and tests are applicable to both the Cortex-M33 and
Hazard3 cores, so most of these additions are thin shims.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Update Kconfig.rpi_pico2, add a new .dts and associated files to support
building an image targeting the RP2350A on the Raspberry Pi Pico 2 which
excutes on the Hazard3 core(s).
Tested using
```
west build -p -b rpi_pico2/rp2350a/hazard3 .\samples\hello_world
```
and programming onto the board using the generate .uf2 file, which gives
the following example output:
```
*** Booting Zephyr OS build v3.7.0-5943-g2db5e4dec7bd ***
Hello World! rpi_pico2/rp2350a/hazard3
```
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Add a DTS fragment to support defining a RP2350 series SoC with two
Hazard3 cores in use.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
The RP2350 SoC series contain two Hazard3 cores, which use the RISC-V
instruction set. Define a new CPU cluster (`hazard3`), which is intended
to be used with the two Hazard3 cores 'plugged in' to the two 'sockets'
in the RP2350 series SoCs.
Update the linker script to support linking against the correct
(ISA-specific) linker script, and to generate a correct IMAGE_DEF for
the target ISA.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
This header file isn't required, and prevents the driver building for
the RISC-V based Hazard3 cores.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
The RP2350 uses the Xh3irq interrupt controller, which supports nested
and prioritised interrupts. This adds initial support, configuring the
controller in 'direct' (non-vectored) mode.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
There's no benefit to starting a subset of them, and this ensure that
everything is ready, regarless of RP2040 vs RP235xx, and whether the
Cortex-M33 or Hazard3 cores are in use in the latter case.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
These .dtsi files are common regardless of which permutation of cores
are in the two CPU 'sockets'.
Take the opportunity to make the includes paths to rp2350a.dtsi relative
to the current file to emphasise their relationship.
This is foundation work ahead of adding support for the Hazard3 cores.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
This comment was incorrect after changes in c9a7ba2f06 removed one of
the definitions. Correct the comment to avoid confusion in subsequent
changes.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Correct the buffer size to be adapted to the target memory device
not enforcing a 512kB test on SRAMs/SDRAMs when a PSRAM is also tested.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
In case one defines an RGB led that is bigger than the led_rgb struct,
ws2812_gpio_update_rgb would overflow the buffer it writes to while
iterating. This could lead to crashes, as the code would also support
GRBW (as supposed in one comment).
As a 'proper' fix would require another buffer and therefore more
memory, I added a BUILD_ASSERT to ensure it does not compile.
Signed-off-by: Stefan Kraus <dev@stefankraus.org>
Due to the alias of ptr on pixels, one iterates over the same area
one reads from to set values. Therefore, if the strip is not 'RGB' but
GBR, one would overwrite the pixels 'r' value with the 'g' value in the
first loop, leading to a wrong read afterwards.
By writing to a temporary variable, we have a clean, unmodified copy
of the original values.
Additionally, this removes the dependency on 'LED_STRIP_RGB_SCRATCH',
as the scratch part (that masked most error cases) is not necessary
anymore.
Signed-off-by: Stefan Kraus <dev@stefankraus.org>
Add test cases verifying that IPv4-to-IPv6 mapped socket sets the
address structure correctly when receiving data from IPv4 peer, and that
sending back data to the IPv4-to-IPv6 mapped address works correctly.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Commit 48897a9090 fixed the address
mapping for dual-stack sockets when sendmsg() was used, however the same
similar issue appears (cannot check for AF_INET family for mapped
addresses as those are AF_INET6) for regular sendto() calls.
Therefore, for the sendto() case, where dst_addr is specified, check if
the address is mapped with net_ipv6_addr_is_v4_mapped() function as
well.
This also fixes another bug in sendmsg() case, where msghdr->msg_name
could've been dereferenced even if it was NULL (for example in case
of a connected socket).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The s2ram power state is a "suspend-to-ram" state which is not
supported by the radio core, so delete it from the overlay.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Since multiple platforms than nrf are allowed to run this sample,
re-add generic openthread name for sample.
Initially, generic naming has been performed in #83195,
and then, a revert occurred in #87269
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Upated supported features list to allow twister build for
echo_server/client with OpenThread sample
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fix Kconfig warnings by dropping NET_L2_IEEE802154_SHELL from the
OpenThread sample. This option depends on CONFIG_NET_L2_IEEE802154,
which is not selected in the sample, causing unmet dependency warnings.
Removing it lets the sample build cleanly without extra config noise.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Move the TRNG peripheral enable from the clock/SoC init path to the
Espressif entropy driver init.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This patch enables AVRCP-related configuration options in the shell
test project. These options are required to test AVRCP functionality
in Bluetooth Classic shell environment.
Signed-off-by: Make Shi <make.shi@nxp.com>
Smbus implementation for stm32 lacks of smbus_block_read(), so add the
functionality.
Fix some indentations.
Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
Return `enum wifi_conn_status` after failed connection attempt. Parse
`+CWJAP:` messages to get failure reason.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
In several functions, the UART registers are accessed multiple times
through the `get_uart(dev)` inline function. This results in repeated
dereferencing of the device's base address.
This commit caches the UART register struct pointer in a local variable
`uart` at the beginning of each relevant function.
For registers where repeated access is not needed, the value is read once
into a temporary variable. Modifications, if any, are applied to
the temporary copy, and the result is written back once.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Many boards and SoCs do not belong in any area, group them to correctly
tag PRs and to allow for future sub-grouping.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Consolidate all linters and SCA tooling into one area and separate from
the coding/style guideline documentation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Kconfig option UDC_DWC2_USBHS_VBUS_READY_TIMEOUT depends on services
exclusively available for nRF54H20, but the option can also be used for
nRF54LM20A, where there are no service dependencies, and VREG can be
accessed by the driver directly. Let depend the option on the SOC
series, as the controller can be used by the different CPUs on the SOC.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
jc849 has never made any form of contributions to the Zephyr project so
drop from MAINTAINERS.yml file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Mani-Sadhasivam hasn't reviewed any PRs or engaged in any Zephyr
activity since September 2023.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
upstream/main depends on how you checked out the repo, it can be
anything and user might have a different remote. Use <commit range>
instead to make it more general.
Fixeszephyrproject-rtos/zephyr#96121
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move macros derived from the VIRTIO specification to a shared include.
This change allows the VIRTIO standard definitions to be referenced
from outside the driver implementation.
The following definitions have also been added:
- VIRTIO_F_VERSION_1
- VIRTIO_F_ACCESS_PLATFORM
- VIRTIO_RING_F_INDIRECT_DESC
- VIRTIO_RING_F_EVENT_IDX
- VIRTQ_AVAIL_F_NO_INTERRUPT
- VIRTQ_USED_F_NO_NOTIFY
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in ST's dedicated folder
hal_stm32 (modules/hal/stm32).
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Clarify the BOOT0/BOOT1 configuration needed to program the flash
memory or to load the image straight in RAM (serial boot variant 'sb').
Explicit what the 2 USB connectors are used for in 'sb' variant
configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clarify the BOOT0/BOOT1 configuration needed to program the flash
memory or to load the image straight in RAM (serial boot variant 'sb').
Fix the build directive when 'sb' variant is to be used.
Explicit what the 2 USB connectors are used for in the 'sb' variant
configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
If CONFIG_NANOPB_ENABLE_MALLOC is enabled, any successfully decoded message
should be released.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
If CONFIG_NANOPB_ENABLE_MALLOC is enabled, any successfully decoded message
should be released.
Update the sample, to lead by example.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This fixes system crashes in `i2s_buf_write`, because this function
internally calls `i2s_config_get`, which resulted in a NULL pointer on
stm32 i2s devices.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Send "count" byte. The SMBus block write protocol requires this byte.
Use I2C_MSG_WRITE named flag instead of 0.
Signed-off-by: Andrew Lewycky <alewycky@tenstorrent.com>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Before re-entering Power Mode 3, we should disable the GET
sensor and reinitialize the power rails.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Add support for configuring I3C open-drain speed modes to handle
different timing requirements during bus initialization and operation.
Implementation:
- Fetch current controller configuration
- Invoke configure api inside bus_init to configure
I3C open-drain high period for proper bus
initialization and device compatibility.
The slow speed mode is essential for the first broadcast address
transmission to ensure visibility to all devices on the I3C bus,
particularly those in I2C mode that need to disable their spike
filters when switching to I3C mode. This requirement is specified
in "Table 49 I3C Basic Open Drain Timing Parameters" of the MIPI
ALLIANCE Specification for I3C Basic Version 1.2.
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
This commit improves the I3C handling of open-drain
timing configurations with the following changes:
- Add OD minimum high_ns and low_ns DT properties
- Implement dw_i3c_init_scl_timing for runtime timing updates
- Initialize scl_od_min configuration from device tree
- Maintain backward compatibility with existing configurations
Requirement (MIPI Specification for I3C Basic v1.2 (16-Dec-2024),
Section 4.3.11.2 & Table 49):
- The MIPI I3C specification mandates different open-drain speeds during
bus initialization as defined in
"I3C Basic Open Drain Timing Parameters".
- The first broadcast address (7'h7E+W) must be transmitted at a slower
open-drain speed to ensure visibility to all devices on the I3C bus,
including legacy I2C devices. This slow speed (minimum 200ns Thigh)
allows I2C devices to properly detect the I3C mode transition and
disable their spike filters before switching to I3C mode. After the
initial broadcast, normal I3C open-drain speeds can be used for
regular operation.
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
This commit adds the I3C handling of open-drain
timing configurations with the following changes:
- Add scl_od_min structure to i3c_config_controller for
high/low period settings
- Define Open-drain mixed bus SCL timing constants
Requirement (MIPI Specification for I3C Basic v1.2 (16-Dec-2024),
Section 4.3.11.2 & Table 49):
- The MIPI I3C specification mandates different open-drain speeds during
bus initialization as defined in
"I3C Basic Open Drain Timing Parameters".
- The first broadcast address (7'h7E+W) must be transmitted at a slower
open-drain speed to ensure visibility to all devices on the I3C bus,
including legacy I2C devices. This slow speed (minimum 200ns Thigh)
allows I2C devices to properly detect the I3C mode transition and
disable their spike filters before switching to I3C mode. After the
initial broadcast, normal I3C open-drain speeds can be used for
regular operation.
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
If twister exits by sys.exit function or by raising
the SystemExit exception, catch that exceptions and
return proper exit code.
Signed-off-by: Łukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Don't enable `ZTEST_NO_YIELD` when `COVERAGE_DUMP` is enabled, since
this option spins forever at the end of `main`, while `COVERAGE_DUMP`
occurs after `main` returns into `bg_thread_main`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Since the timespec_normalize() function is not branchless, and since it
can also generate a fair bit of code, make the function non-inline and
place it in timeutil.c instead.
This should save some code space on most systems.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Previously, warnings could be promoted to errors in timeutil.h. Those
warnings were of the form below.
warning: comparison is always true due to limited range of data type
warning: comparison is always false due to limited range of data type
Specifically, in the speed-optimized version of timespec_normalize() and
in the macro SYS_TICKS_TO_NSECS().
The speed-optimized version of timespec_normalize(), which used the
__builtin_add_overflow() function, was mainly intended to be branchless.
However, many targets generate branching instructions regardless.
The speed optimized version is less valuable in that case, so remove it.
Additionally, SYS_TICKS_TO_NSECS() does not generate the above warnings
when k_ticks_to_ns_floor64() is used instead of k_ticks_to_ns_floor32(),
so use the former.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Script does not handle already assigned PRs correctly, revert until we
have a proper fix.
This reverts commit 972ebb64dc.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Set -Wshadow when compiling unit tests, this way we can test macro
combinations and ensure they don't generate shadowed variables, which
would generate a warning by default in normal Zephyr builds.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Rename few local variables that were shadowing object ones with the same
name. Allows building with -Wshadow.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The subsystem has been out for a year.
It has been taken into use by various parties and has gone through
additional downstream testing.
It is considered stable and mature enough to not be experimental
anymore.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Instead of returning storage-related error codes, return ones which
make it clear that it's not about the storage itself.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
In cases where we are not able to assign a PR due to lack of matches in
the maintainer file, add the release team to the reviewers so someone
can triage it. Also add a comment to make it clear that the release team
was added for triage purposes only.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add test scenario for the flash_mspi_nor driver used in a configuration
with disable multithreading.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add possibility to use the driver in configurations with disabled
multithreading. It may be useful in bootloaders, for example.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add possibility to use the driver in configurations with disabled
multithreading. It may be useful in bootloaders, for example.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix the build error that missing ctrl parameter in
zephyr_hostapd_cli_cmd_resp by getting iface->ctrl_conn.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Fix the build error that wpa_s isn't defined in supplicant_candidate_scan
when CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING is enabled.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Moved the Open AMP code from lib/ to subsys/ipc/ to better
organize IPC-related components.
Updated build and config files to reflect the new location.
Adjusted path in MAINTAINERS.yml.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Re-enable the cache usage for the PSRAM now that the PSRAM size
has been adjusted in order to prevent stability issues when using
it with cache enabled.
This reverts the change introduced in
commit 97608e4cc0 ("boards: stm32n6570_dk: Disable cache on PSRAM")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
System might become unstable when the last 32 bytes of a XSPI attached
are accessed in memory-mapped mode with cache enabled.
In order to prevent this, remove the last 32-bytes of the PSRAM on the
stm32n6570_dk as well as NOR on the nucleo n657x0_q.
Partitions should also be defined in a way to avoid accessing to the
last 32-bytes of the device.
Issue is described in the STM32N6xxxx errata sheet ES0620 Rev 1:
2.4.5 Deadlock or data corruption when DQS is enabled and the wrap
request includes the last address of the memory
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Enable TPM2 counter support on FRDM_IMX91 board.
Compile commands:
west build -p always -b frdm_imx91/mimx9131 \
tests/drivers/counter/counter_basic_api/
Signed-off-by: Hongbo Wang <hongbo.wang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Enable the MCK output to a pin to allow for DAC and ADC clocking.
Provides a MCK source to peripherals that can utilize an external
clocking source for internal DSP processes, especially at higher
MCK/LRCK ratios.
Signed-off-by: Sean O'Connor <sean@standalone.tech>
nRF53 series SoCs have a dedicated configurable audio PLL and the ability
to enable MCK bypass via a register value CONFIG.CLKCONFIG. This can
enable higher MCK/LRCK ratios that some I2S peripherals require the host
to generate. Allow an application developer to choose if they want to
initially look for a bypass ratio and, if found, enable bypass in the
NRFX driver. If not, the standard MCK calculation is conducted as normal.
Signed-off-by: Sean O'Connor <sean@standalone.tech>
Add overlay for da14695 and da14699 soc and rtc alias
for da1469x_dk_pro and da14695_dk_usb boards
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
When logging through shell is enabled, it is inconvenient to use
the shell when there are logs coming in. Having a mechanism for
easy disabling/re-enabling the shell logs is a nice quality of life
feature.
To toggle the logs, `CTRL+T` combination can be used. This is
available only when meta key feature is enabled.
Signed-off-by: Heghedus Razvan <heghedus.razvan@protonmail.com>
fixed fallback to default build directory (build) in case that no other
build directory could be determined.
Signed-off-by: Thorsten Klein <Thorsten.Klein@bshg.com>
It is easier to debug things when both the relative and absolute
TCP seq and ack numbers are printed in debug prints.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use the socket eof flag to determine whether the receive
callback should be installed. If the receive cb is not installed,
then the socket cannot receive any data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If there is received data in the TCP or UDP socket, discard it in order to
avoid leaking net_bufs because we are only sending data out and should
not receive anything.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The logging net backend will send syslog messages to syslog server and
it is not meant to receive anything. If we bind to a local socket, it will
create UDP server socket that can receive data. Unfortunately there is no
one reading the data so we will eventually run out of memory in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The product photo is from https://learn.adafruit.com/assets/115230
Tested with the commmand mentioned in the index.rst file.
Compilation testing in CI of the overlay file is done via the
light_polling sample.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
When none of the configs is enabled, it will reports the following build
warning:
CMake Warning at zephyr/CMakeLists.txt:1096 (message):
No SOURCES given to Zephyr library: drivers__firmware__scmi__nxp
Excluding target from build.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Properly export a working `&arduino_i2c` node on the APARD32690 board, for
use with various Uno shields.t
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
This adds some kconfigs to allow customizing the SMP IPI
broadcast test.
* Can running for more iterations.
* The wait period can be changed.
* Retry waiting for the other processors to complete
processing the IPI.
* This is mainly to avoid having a single long wait.
The whole wait period is broken down so that we can
bail out early if that iteration is deemed a success.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This overlay was mistakenly submitted using a Nordic-specific license.
Switch to the standard Apache 2.0.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
- Deactivate cache to avoid the TX buffer being placed in a
non-cacheable memory region for NUCLEO_F746ZG.
- Add missing configuration in the overlay for STM32F3-DISCO.
- Change USART1 to USART2 to avoid conflicts on NUCLEO_F103RB.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
changes test configuration for nucleo_h753zi and nucleo_g071rb
- nucleo_g071rb
Delete undefined USB node to resolve CI failure.
Update CTS and RTS pin signals to avoid another conflict.
- nucleo_h753zi
Add CTS and RTS pins.
- stm32u083c_dk
Finally, remove stm32u083c_dk due to pin conflicts
(see UM3292 table 14).
- update sample.yaml to exclude nucleo_h743zi, which will no
longer be available for testing. Also remove stm32u083c_dk
from CI testing.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Remove samples/boards/st/power_mgmt/standby_shutdown.
Sample standby_shutdown in boards/st/power_mgmt includes 2 examples.
One demonstrates wakeup from shutdown using a wakeup pin which is already
implemented in samples/boards/st/power_mgmt/wkup_pins. The other
demonstrates wakeup from SoC STANDBY mode using a wakeup pin. However
it enters SoC STANDBY mode through pm_state_force() whereas
STANDBY mode is not a PM standby or idle state, it is rather a shutdown
with possibly only a unique small SRAM retention, not allowing retention
of the system as expected from Zephyr standby or idle state flavors.
Therefore this second scenario is not applicable and can be removed.
Update doc redirection to link removed sample documentation to ST board
power management related samples documentation.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add the mapping for the GRTC_CLKOUT_FAST pinctrl mapping to the
periphconf generation. This allows clocking out the 16MHz clock with a
user selectable divider.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
- Keep RISC-V interrupt state if placed in IRAM when
cache enable/disable is called.
- Update hal_espressif to include TX notify callback for
the following SoCS: ESP32-C2, ESP32-C6 and ESP32-H2.
- Removed Wi-Fi/BLE binary blobs that are not required.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Use k_timepoint_t instead of k_timeout_t for absolute time to avoid
ambiguity and ensure the code works even when CONFIG_TIMEOUT_64BIT=n.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
This PR includes OpenThread's NAT64 header file when
NAT64_TRANSLATOR is enabled. This is done to avoid compile
warnings when OT NAT64 API is used.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fix issue that cause color inversion with monochrome display by replace
PIXEL_FORMAT_MONO10 by PIXEL_FORMAT01 to have the expected behavior.
Signed-off-by: Quentin LACOMBE <quentlace2g@gmail.com>
- mimxrt1189cvm8c part have been designed on public EVK board
switch to use mimxrt1189cvm8c part
- Update some doc web information in index.rst
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add test for lock/unlock constraint lists using the new arbitrary DT
phandles macros and pm_policy_state_constraints_get/put APIs.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Update board to use default power domain for the "peripheral"
domain, which when resumed prevents SoC from entering suspend and
standby states as these power down peripherals.
Note by co-author: Cherry-picked this commit and edited it to work
without the generic domain refactoring on the branch it came from.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Co-authored-by: Declan Snyder <declan.snyder@nxp.com>
Refactor low power state handling to not tie to zephyr,disabling-states
and define it's own separate "low power states" property in DT instead.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Some pieces of the system may have custom types of constraints that they
define based on different effects and reasons than just the standard
"zephyr,disabling-states". To avoid every single one of these component
reinventing the wheel, make some common APIs to handle these type of
custom constraint lists.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
I am surprised this notifier didn't already report the substate id, it
seems important since different substate obviously are defined for a
reason, they can be having a different effect on the system.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- add NXP_BOARD_SPECIFIC_MPU_SETTINGS kconfig to provide a switch
for developer if they want to use private mpu settings
CONFIG_NXP_BOARD_SPECIFIC_MPU_SETTINGS==1 | NXP default setting
CONFIG_NXP_BOARD_SPECIFIC_MPU_SETTINGS==0 | User specific
- Use DT function to get memory base address and region size for cm7
- CM33 use dts to set mpu settings
- Add REGION_CUSTOMED_MEMORY_SIZE macro provide a common mapping ways
to map actual memory_size_kb to "region_size"
- The settings of the unified memory on cm33/cm7 cores:
ocram1/flexspi2 -> REGION_RAM_NOCACHE_ATTR
ocram2/dtcm -> REGION_RAM_NOCACHE_ATTR
flexspi/itcm -> REGION_FLASH_ATTR
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
The ATE structure section is now divided into subsections describing
multiple ATE formats, including the one added for CONFIG_ZMS_ID_64BIT.
The sections about features and recommendations are updated as well.
Mentions of 32-bit key/ID are revised to account for 64-bit ID support.
Mentions of <= 8 bytes data size also had to be reworked, because this
property is tied to the chosen ATE format.
Some unrelated, minor changes are also sprinkled throughout.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
* Update the "corrupt ATE" tests to work with the new ATE format.
* Add a basic test to verify support to 64 bit ZMS IDs.
* Add a `testcase.yaml` entry to cover the above points and also run
lookup cache tests to evaluate the 64 bit hash function.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
* Explicitly skip tests that depend on CONFIG_ZMS_LOOKUP_CACHE.
* In `testcase.yaml`, use `extra_configs` instead of `extra_args` for
setting Kconfigs.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Allow the ZMS API to optionally accept 64 bit IDs. A typedef `zms_id_t`
is added, so that the maximum ID width can be controlled using Kconfig.
The current ATE structure is already large enough that it is possible to
reserve 64 bits for IDs without increasing its total size (128 bits).
This makes the feature a natural, low footprint alternative to Settings,
for cases where the supported key namespace must be larger than 32 bit
but not arbitrarily large.
The ATE format does have to be altered to accommodate larger IDs, but
the default "32 bit" format is left as is. Now, the `struct zms_ate`
describes one of two supported formats, selected by an `#if` condition.
In the future, it may be possible to support multiple ATE formats at
runtime, in which case the structure can be turned into a union.
In the new, "64 bit" ATEs, the `offset` and `metadata` fields are moved
into a union, because they are found to be mutually exclusive. With the
old format, the same fields are in different locations, but one of them
always gets filled with a dummy value, depending on the given ATE type.
To cover both cases, a `memset` is used, which should be optimized away
by the compiler when appropriate.
The only limitation is that the new ATE format has no room for data CRC,
but an alternative integrity check can be implemented by the caller.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Invert property was not implemented and is now redundant with the flag
pwm-cell which is more flexible in case you want some IO to be inverted
and some not
Signed-off-by: Franck Duriez <franck.lucien.duriez@gmail.com>
# Conflicts:
# doc/releases/migration-guide-4.3.rst
In case of nRF TWIS i2c shim, SoC header include is needed
for memory region property presence checker macro.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Ethernet TX should not handle bridge forwarding. The bridge layer
had already handled forwarding.
Current code is causing duplicated TX if sending is via bridge
interface, or causing needless TX on other bridge ports if sending
is via one bridge port.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
There were several problems of pkt management during forwarding.
1. No need to do net_pkt_ref/net_pkt_unref around net_if_queue_tx.
2. Finally when completed forwarding, there was a net_pkt_unref for
pkt using cloning. However it also applied to pkt not using
cloning. This was causing pkt was released before sending.
3. Whether pkt cloning used or not, should not be decided by bridge
interfaces count. It's should be decided by interface count to
forward.
An example was sending pkt via bridge interface. If there were
two interfaces attached to bridge, cloning was needed but current
code won't.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
To avoid conflicts between the C library's `time.h` and signal.h use an
"override" header (when necessary) for C libraries that do not themselves
provide POSIX definitions in `time.h` or `signal.h`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a header for satisfying POSIX conformance requirements of signal.h
that is named posix_signal.h rather than signal.h.
The primary reason for doing so, is that the de-facto owner of signal.h is
the C library.
This new header only defines required POSIX symbols that form a strict
superset over the ISO C signal.h symbols.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a header for satisfying POSIX conformance requirements of time.h
that is named posix_time.h rather than time.h.
The primary reason for doing so, is that the de-facto owner of time.h is
the C library.
This new header only defines required POSIX symbols that form a strict
superset over the ISO C time.h symbols.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add overlay property node and configs to support on MCK_RA8T2
- tests/subsys/fs/ext2
- tests/fs/fat_fs_api
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
This commit adds testing support for CAN ISO-TP on MCK_RA8T2
- tests/subsys/canbus/isotp/conformance
- tests/subsys/canbus/isotp/implementation
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
on Renesas RA mck_ra8t2 board
Add support for test app on Renesas RA mck_ra8t2:
- tests/drivers/can/api
- tests/drivers/can/timing
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
on mck_ra8t2 board
Add support for test app on Renesas mck_ra8t2:
- tests/drivers/counter/counter_basic_api
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for test apps on Renesas mck_ra8t2:
- tests/drivers/pwm/pwm_api
- tests/drivers/pwm/pwm_loopback
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
If stream->ep is NULL, which is really shouldn't be,
then we should not attempt to dereference it.
Add simple NULL check to ensure behavior, and make
Sonarcloud happy.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extend test to check simple sequential use of BT specific API and
standard onoff API. Test case added as it was initially failing on
nrf54l15. Additionally, increased startup time for nRF54LX were
HFCLK start is combined with tuning and it takes longer.
Added nrf54l15dk//cpuapp to the test.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
804e502484 fix got reverted as it introduced a bug where callback
with HFCLK started indication was not called because state is not
correctly indicated. BT-dedicated API does not set state and does
not expect to get the callback when HFCLK is started. 804e502484
was intended to fix the bug that was visible on nrf54lx. It was not
visible on nrf52 because of a errata workaround which was calling
HFCLK started callback only when state was set to STARTING and that
was not the case when BT-dedicated API was used. Applying this
`workaround` approach to all cases.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit adds multicore support to copy CM33 CPU1 image
from flash to RAM where it will boot from.
Also added NXP_IMXRT_BOOT_HEADER=y for CPU0 so it can be booted
from FlexSPI Flash.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
This commit moves common DTS entries into common file
dts/arm/nxp/nxp_rt7xx_common.dtsi.
This way there is not duplication between cpu0 and cpu1.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Sets the default of this Kconfig for the SoC itself as a default,
rather than each board setting it, which minimises the change
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Requesting/releasing TWIM device may be ISR safe, but
it cannot be reliably known whether managing its power
domain is. Is is then assumed that if power domains are used,
device is no longer ISR safe. This macro let's us check if
we will be requesting/releasing power domains and determines
PM device ISR safety value.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Requesting/releasing SPIM device may be ISR safe, but
it cannot be reliably known whether managing its power
domain is. Is is then assumed that if power domains are used,
device is no longer ISR safe. This macro let's us check if
we will be requesting/releasing power domains and determines
PM device ISR safety value.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Requesting/releasing QDEC device may be ISR safe, but
it cannot be reliably known whether managing its power
domain is. Is is then assumed that if power domains are used,
device is no longer ISR safe. This macro let's us check if
we will be requesting/releasing power domains and determines
PM device ISR safety value.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Fixes the on-chip flash write-block-size for
MCXA platforms to 16 Bytes.
It was set to 128 Bytes, but the MCXA Flash ROM-API
supports 16-byte writes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
11431a80 changed the node name of the FlexSPI node, breaking the LMA
calculation. This fixes the LMA to store the CM7 image at the correct
address in flash.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
1. the MCXA family use MRCC to reset peripheral
2. MRCC register, 0: hold in reset, 1: release from reset
3. usage as blow
syscon: syscon@xxx {
...
reset: reset {
compatible = "nxp,mrcc-reset";
#reset-cells = <1>;
};
};
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Change 4c86a5cc8d moved a select
from Kconfig.asc to Kconfig.bap (amongst some other changes
from select to depends), but inverted the PAC_{SRC,SNK} from
ASCS_ASE_{SRC,SNK} condition.
Signed-off-by: Mike J. Chen <mjchen@google.com>
(NUM_IRQS-1) IRQ is taken on this soc, so set CONFIG_TEST_IRQ_NUM to a
different available IRQ to avoid test failure.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
DT properties like 'tolerance-microvolt', 'min-microvolt',
'max-microvolt' are using microvolt unit, so update the
test case to use microvolt. In addition, using uv is more
accurate than mv. For some regulators, using mv will lose
precision and cause the test case to fail.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This platform is enabled incorrectly and it is not trivial to fix, but
need to hotfix CI because issue is related to linkage and causing a
build error
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Rename this board folder to a more generic name since some other similar
boards will be added.
Add MCX-N5XX-EVK to MCXN EVK board folder. It is an almost identical
board to MCXN 9XX EVK with some slightly different things populated and
of course having the MCXN547 SOC instead of MCXN947.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This was previously only selected when the 2.4GHz driver was
enabled, but SubG can be enabled without the 2.4GHz driver.
Build tested using:
```
west build -b beagleconnect_freedom -d \
build/bcf/ot_coap samples/net/openthread/coap
west flash -d build/bcf/ot_coap
```
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Add support for configuring and enabling DLL2. A few things have been
simplified (common PMUC, just store frequency, etc.).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Button 0 and LED 0 share a GPIO pin on bg27 boards. Remove the
`led0` alias in a board overlay to make the button sample work
out of the box.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Reformat devicetree files:
* Sort nodes by unit address or name
* Sort properties by category and name
Add missing properties to existing nodes.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Set #address-cells and #size-cells on usart0. Since usarts can
be used for both UART and SPI, this property shouldn't be set
in SoC-level DTS, since it makes it harder to switch compatible.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Fixed the include directive for mchp_pinctrl_pinmux_sam.h
by replacing quotes with angle brackets.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
- Update the path of pinctrl.h in sama7g54_ek.dts
- Select CONFIG_MICROCHIP_SAM for sama7g5 family devices
- Add SAM group Kconfig symbol for proper family grouping
- Rename PIC32C Kconfig symbol to MICROCHIP_PIC32C
and update references
- Update west.yml for hal-microchip re-organization
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
The brief on the existing test_rtio_await_ function mentioned testing
that an await operation would immediately complete ("be skipped") if
the SQE were signalled prior to being submitted. The function didn't
actually test this, though.
Add a new test function for testing this specific case.
Remove the misleading part of the brief around the existing test.
Rename test_rtio_await_ to be more concise on the test it performs.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
The intention behind using an RTIO_OP_AWAIT tied to an rtio_iodev is
to get a guarantee that an entire transaction can be handled without
interruptions or parallel work taking place on the rtio_iodev.
This guarantee can only be met when SQEs are bundled together using
RTIO_SQE_TRANSACTION as they will otherwise be considered individual
pieces of work, hence allowing some unrelated piece of work to get
scheduled in-between the rest.
When just using RTIO_SQE_CHAINED, the rtio_iodev would still block
during the entire RTIO_OP_AWAIT, but the following SQE in the chain can
be preempted by an unrelated SQE.
Modify this specific test case to use RTIO_SQE_TRANSACTION as this will
match the intention.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Add support for runtime and devicetree configuration of themocouple
type, ADC resolution, filter coefficient and cold junction temperature
resolution. Extend device specific sensor channels to include cold
junction temperature, delta tempereature, hot junction temperature and
raw ADC values while still maintaining backwards compability with the
existing SENSOR_CHAN_AMBIENT_TEMP channel.
Signed-off-by: Thomas Schmid <tom@lfence.de>
Add new sample lpdac_opamp_lpadc for frdm_mcxa156.
In this example:
1. The LPDAC outputs a 300mv voltage to the
non-inverting terminal of the OPAMP.
2. The OPAMP operates in the non-inverting amplifier
mode, the inverting terminal of the OPAMP is grounded.
3. The channel 0 of the LPADC is connected to the output
of the OPAMP, and the channel 1 of the LPADC is connected
to the output of the DAC (the non-inverting input terminal
of the OPAMP).
4. The ideal sampling range of OPAMP output channel is
specified by 'ideal-sample-range', and 'nxp,opamps' are
used to specify LPADC samples which OPAMP's output and
which ADC channel is connected to the OPAMP output.
5. The OPAMP non-inverting input is 300mV, and the OPAMP
gain is initialized to 1. Therefore, the first round OPAMP
output (~300mV) will not reach the minimum value of the
'ideal-sampling-range'. Therefore, the ADC driver will
increase the OPAMP gain through 'opamp_set_gain'. The second
round OPAMP output (~900mV) is still below the minimum value,
so the gain will continue to increase. The third round OPAMP
output (~1500mV) is already in the ideal range, so the gain
will not be adjusted later.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Introduce new binding properties for the LPADC DT
and update the driver to consume them.
Users can use these properties to obtain the opamp
device bound to the ADC and dynamically adjust the
opamp gain so that the opamp output is within the
ADC ideal sample range.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Added opamp driver and example support to release
notes for release 4.3.
2. Add documentation for the opamp peripheral.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit includes the following changes:
1. Add top level CMakeLists.txt entry and Kconfig.
2. Add bindings for opamp-controller.
2. Add bindings for nxp,opamp and nxp,opamp_fast.
3. Implemented NXP opamp and opamp_fast device driver.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Support arduino_gpio example for NXP frdm_mcxw23 and mcxw23_evk boards.
Test using tests/drivers/gpio/gpio_basic_api.
Signed-off-by: Allen Zhang <chunfeng.zhang@nxp.com>
Add optional fast-memory-region property to the Ethos-U driver. When
present in the devicetree, the driver passes the region base and size
to ethosu_init(), allowing platforms to use dedicated SRAM for improved
NPU performance.
If the property is not specified, the driver falls back to using NULL/0,
keeping existing behavior unchanged.
Signed-off-by: Johan Alfvén <johan.alfven@arm.com>
Fix inter-operability, when BT_PHY_UPDATE=n the feature bits
contained 2M and Coded PHY when Advertising Extensions where
enabled, and Central devices did not progress with any data
packet transfers when PHY_REQ was rejected as unknown PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1. the clock-source is wrongly typed as clk-source,
which happen to pass the build and function check.
2. and should use DT_INST_ENUM_IDX for index enumrate
as string.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Now that the MBOX_STM32_HSEM driver is enabled by default if
present within the device-tree, it is no more necessary to
manually enable it within samples board specific conf files.
Remove as well the CONFIG_LOG_BACKEND_UART since overall
CONFIG_LOG is anyway not enabled in the samples/drivers/mbox
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Default to building the driver if its node is enabled in
the device-tree, avoiding the need to manually set
CONFIG_MBOX_STM32_HSEM.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Updated project configuration for Border Router to include DHCP6_PD
client, DNS upstream resolver and SRP server features
Removed flags set to 'n' and updated Thread version to 1.4
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
- Initialize platform requirements and start OpenThread DHCP6_PD
feature.
- Added initialization logic for DNS upstream resolver.
OTBR message data structure has been updated to store a user data
structure, if needed.
- Added SRP server initialization call.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
These macros provide a way to get the `mount-point` value from
an fstab entry:
- FSTAB_ENTRY_DT_MOUNT_POINT
- FSTAB_ENTRY_DT_INST_MOUNT_POINT
Signed-off-by: James Roy <rruuaanng@outlook.com>
Fix some orphaned NXP files, fix some files being assigned to wrong NXP
area, and remove "NXP Drivers" label which is just confusing people, and
unify all the main NXP areas under one "platform: NXP" label
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add test scenario for a Kconfig option that was recently added to
the mspi_dw driver. Testing it requires performing some transfers
on the MSPI bus with some device, hence flash chip test used.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Provide a Kconfig option that allows offloading handling of the SSI
FIFOs, which the driver normally executes in the interrupt handler,
to the system workqueue.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The NRFS GDPWR device driver requires NRFS which requires
multithreading. Add dependency to Kconfig for the device driver
to exclude it when building for single threaded apps like
mcuboot.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Added additional cleanups between tests, which fixed the issue
of a failing testcase on nRF54L15.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
- Fixed pin configuration for nRF54L15 (QDECs can use only port 1)
- Changed the way the test handles testing multiple instances
to make it possible to output quadrature signal to one QDEC
instance at a time.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
Add comprehensive enhancements to the probe-rs runner:
- New parameters: --reset, --protocol, --speed, --verify, etc
- RTT logging support via 'attach' command
- Smart binary format detection with FileType support
- Enhanced debug/debugserver with improved GDB integration
- Conditional reset after flashing instead of always resetting
Maintains upstream compatibility while significantly expanding
probe-rs capabilities for embedded development workflows.
Signed-off-by: Jared Wolff <hello@jaredwolff.com>
The commit replaces negative thread state checks with a new,
more descriptivepositive check.
The expression `!z_is_thread_prevented_from_running()`
is updated to `z_is_thread_ready()` where appropriate, making
the code's intent clearer.
Removes a redundant `IS_ENABLED(CONFIG_SMP)`, they are included #ifdef.
Finally, this patch add the missing `#endif` directive.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
This patch moves `is_aborting()` and `is_halting()`
from `kernel/sched.c` to `kernel/include/kthread.h`
and renames them to `z_is_thread_aborting()` and `z_is_thread_halting()`,
for consistency with other internal kernel APIs.
It replaces the previous inline function definitions in `sched.c`
with calls to the new header functions. Additionally, direct bitwise
checks like `(thread->base.thread_state & _THREAD_DEAD) != 0U`
are updated to use the new `z_is_thread_dead()` helper function.
This enhances code readability and maintainability.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Use the RTO interrupt for RX timeouts when using the async API.
The workqueue based approach is sensitive to load and has a higher latency
than using hardware timeouts.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
Add sample application to demonstrate new ADC stream APIs.
Two tests are also added:
- ad4052-stream
- max32-stream
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Fix for gpio-map-mask and gpio-map-pass-thru to enable use of
MAX32_GPIO_VSEL_VDDIOH and other defines with arduino_header connector.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Added support for RTIO stream.
Also added sampling_period property to the DTS. This is for setting the
sampling period when streaming is used.
Hardware or kernel timer can be
used for this.
To use hardware timer you need to add it to the DTS. Example:
{
chosen {
zephyr,adc-clock = &counter0;
};
};
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Fix for compatible property.
Addition of hardware timer to be used with APARD32690 board.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Introduce a streaming APIs for ADC devices.
Two new APIs are added to the adc_driver_api: submit and get_decoder.
Added decoder following APIs: get_frame_count, get_size_info, decode,
has_trigger.
Supported triggers are:
- ADC_TRIG_DATA_READY
- ADC_TRIG_FIFO_WATERMARK
- ADC_TRIG_FIFO_FULL
Supported operations to be done on trigger:
- include - whatever data is associated with the trigger
- nop - do nothing with data associated with the trigger
- drop - clear data associated with the trigger
Some changes to the linker scripts were needed to add decoder APIs.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Define the two keys and LED available in the board. Also enable
CONFIG_GPIO=y (considered minimal in Zephyr).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add nodes for the GPIO controller (controlling pins PA00-44). Naming is
a bit confusing. In some places you'll find HPSYS_GPIO, other GPIO1,
pins are named PA00-PA44... I've chosen "GPIOA". Because the Zephyr GPIO
API assumes a maximum of 32 pins per controller, we have to split the
controller into 32-bit wide blocks. In reality, the controller
internally works like that (see the `reg` addresses), however, the whole
block is clocked by a single RCC _switch_.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
SiFli SF32LB SoCs have a single GPIO controller block which manages all
pins (> 32). However, Zephyr API expects ports to have up to 32 pins. So
in order to make things compatible, we introduce a Zephyrism in
devicetree: a parent node with common properties (e.g. IRQ, RCC clock,
etc.) and children nodes for each 32 pin block. See upcoming devicetree
definition for more details.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
So we can reference later to any of the PAD_XX_YY registers from e.g.
GPIO nodes, where we need to write pad configs like pull-ups.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add myself as collaborator to help with reviews and occasional
contributions for the Bouffalo Labs SoC peripherals, configurations,
and HAL.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Like other samples, this moves to net_ipaddr_parse, which can handle IPv4
and IPv6. Additionally, it parses the port as well which removes the need
to have separate Kconfigs for addresses and ports, thus simplifying the
code.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
GCC gave the following warning:
mqtt_sn_transport_udp.c: In function ‘tp_udp_init’:
mqtt_sn_transport_udp.c:117:9: warning: ‘memcpy’ forming offset [12, 105]
is out of the bounds [0, 12] of object ‘mreqn’ with type ‘struct ip_mreqn’
[-Warray-bounds=]
117 | memcpy(&mreqn.imr_multiaddr, &udp->bcaddr.data[2], si...
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mqtt_sn_transport_udp.c:48:25: note: ‘mreqn’ declared here
48 | struct ip_mreqn mreqn;
| ^~~~~
And it turns out that it's right. The original code looks like it tries to
copy the IP address to imr_multiaddr in a way that works for both v4 and
v6. It ignores, that bcaddr.data may be way larger than even a v6 addr,
because it's a buffer that's big enough to hold many other structs as well.
Not only that, IP_ADD_MEMBERSHIP is for IPv4 only and imr_multiaddr can
only hold an IPv4 address anyway.
This modifies the code to have separate code paths for v4 and v6 and call
the correct APIs. This also gets rid of the memcpy, since it can be a
simple struct assignment now.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Properly adjust the init priorities on the max32690evkit to account for
initialization levels of the MAX32 HPB memc driver.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Mark pm_device_driver_init() as a boot function to support using it
for early init on devices with demand paging.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
add forgotten if around Kconfig options.
This applied the default of 32 to all
CONFIG_SDHC_BUFFER_ALIGNMENT.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
net_if.h and net_pkt.h are 2 headers required by lldp.h
as it needs to know net_if and net_pkt structs.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Document the refactoring of the PM_S2RAM and PM_S2RAM_CUSTOM_MARKING
in the release notes and migration guide for release 4.3
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The config PM_S2RAM_CUSTOM_MARKING is not an optional config for a
user to select, it is required by some soc implementations of S2RAM,
in which case it must be selected by the soc.
Refactor the configuration to be HAS_PM_S2RAM_CUSTOM_MARKING, and
make the currently only soc which needs it select it. Then update
samples which previously had to select this option for this soc.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Currently it is possible to have an enabled (status="okay")
"suspend-to-ram" "zephyr,power-state" in the devicetree,
CONFIG_PM=y, but CONFIG_PM_S2RAM=n
This means the presence and state of the "suspend-to-ram" power
state in the devicetree does not match the PM_S2RAM option,
despite PM_S2RAM being dependent on the devicetree state.
This commit makes the devicetree the "source of truth" for
whether one or more s2ram power states shall be included and
supported, by enabling PM_S2RAM if any s2ram power state with
status "okay" is present in the devicetree. To disable the
s2ram power state, like with any other state, disable it by
setting its state to "disabled".
The help of the now promptless PM_S2RAM config has been
updated to reflect the new meaning. It previously held
cortex-m specific implementation details, these have been
removed as these details are already present in the file
pointed to as well (arch/arm/core/cortex_m/pm_s2ram.c
line 22)
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
ti_dmtimer.h contains mask definitions only used internally by the
driver. Make it a private header.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Both UART5 and UART0 are default states of some of the header pins.
- As such, it's best to enable them by default.
- We also do not have to care too much about code size for a53s due to
the large (for zephyr) RAM.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Add "external_flash" fixture to the no_explicit_erase testcase
in order to run twister only on boards with such HW setup.
Other runnable test cases has it already.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Move the accept-loop into a socket-service. No dedicated thread is needed
just for the accept loop. This better demonstrates the power of the
socket-service in removing the need for dedicated threads. Make some tiny
improvments and necessary changes to the udp-side of the service.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
write enable already happens in the write/erase loop
before every write and erase. It is done in the loop,
because it is self cleaning after erase and write.
That is also the reason we don't need to disable it,
as it is automatically disabled after each write and erase.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Enhance the armfvp emulator cmake handling to allow additional options
for setting ARMFVP_BIN_PATH, relaxing the previous requirement to set in
an environment variable. This makes it possible to run twister with
multiple armfvp platforms located in different paths.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Add an explicit check to ensure that the acquisition_time
parameter is encoded with the ADC_ACQ_TIME macro and uses
the TICKS unit, as required by the API.
If the unit is not correct, log an error and return -EINVAL.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
On certain platforms I2C is not enabled by default, causing build error.
Change pca_series driver to select I2C.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
The reset function is originally designed to have no return value. If
the GPIO toggle fails, there's no indication for failure until I2C
transaction fails. Account for this by adding return value to the reset
function.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
add support for pca9538, pcal9539.
Add support for pcal6408 and pcal6416, which is originally supported
by pcal64xxa driver. These device has the same register layout as
pcal9538 and pcal9539 respectively, which means they can be seamlessly
supported by pca_series driver.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
The only information for 4s-4d-4d, 8s-8s-8s and 8d-8d-8d in the basic flash
parameter table is in DWORD20 with one byte for each of the aforementioned
modes. This one byte is split into two fields that contain that mode's
maximum operation speed with and without data strobe. Unsupported fields
have the value of 0xF. For the mode to be supported, at least one of the
two fields must not be 0xF, so we check the byte against 0xFF.
Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Always install current python dependencies required for CI as part of
setting up the workflow, since the ones pulled in the docker image may
be out of date.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A bit confused as to how this worked before, maybe the docker image had
pykwalify pre-installed or something, but we do need python dependencies
properly installed to run CI - here this commit is specifically fixing
an issue with jsonschema not being found.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
100 ms is insufficient time enter command mode after `CMUX` on at least
one modem (Telit LE910Cx), and waiting 5 seconds before retrying seems
excessive.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This potentially fixes an issues whereby when sysbuild projects
import dts configuration from images and images are reconfigured,
that sysbuild will needlessly rerun even if the output has not
changed by using a temporary output file and then only updating
the actual file if the contents have changed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add pinctrl dts node for PIC32CM JH family devices and
update binding file for Microchip Pinctrl Port G1 IP
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
Update west.yml file to link hal-microchip which has the
pinmux header files for PIC32CM-JH series
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
Add missing const on `struct rtio_iodev *iodev`
sensor_reconfigure_read_iodev(), sensor_stream(),
and sensor_read(), all pass iodev to functions
which accepts struct rtio_iodev as const.
These functions should also be marked const.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
- Increase codec config metadata size to support long metadata
audio configuration
- Remove invalid check for requested and new BIS sync request
- Delete broadcast sink when sync terminated to prepare for
next sync attempt
- Change supported channel count from 2 to 1 to align with
project configuration and set audio channel to front center
These changes ensure the cap_acceptor sample works correctly
with Google Pixel devices by handling metadata properly and
managing broadcast sink lifecycle appropriately.
Signed-off-by: Chang An <chang.an_1@nxp.com>
Convert `gethostname()` from a static inline wrapper to a normal function
with regular linkage.
This change was prompted mainly as housekeeping for #95811, but a
secondary reason was to make this a linkable symbol so that the API works
at a binary level as well (which could be provided by the toolchain as
well).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Bump the revision used for `hal_ti` to one that uses ANSI / ISO C types
when defining `SlNetSock_Timeval_t` instead of relying on non-standard
ways of pulling in POSIX types.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Include `<zephyr/toolchain.h>` to get access to `ARG_UNUSED()` and include
`<zephyr/sys/util.h>` to get access to `MAX()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The commit should deal with fixing board's flash memory capacity
as well as updating mcuboot partitioning scheme so that there are no
depedencies with the I-cache controller's peculiarities (that is an image
should be aligned to specific boundaries that is 256kB, 512kB etc).
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
The commit should deal with fixing board's flash memory capacity
as well as updating mcuboot partitioning scheme so that there are no
depedencies with the I-cache controller's peculiarities (that is an image
should be aligned to specific boundaries that is 256kB, 512kB etc).
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with updating the re-configuration of the
I-cache controller when buidling for mcuboot. Previously, the whole
controller was updated, given that a slot entry adheres to controller's
peculiarities (that is an image should be aligned to specific image sizes
i.e. 256kB, 512kB, etc). However, that approach should adversely affect
flash memoy layout. The proposed scheme now imposes that images be aligned
to minimum cache-able area, that is 64KB.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
In HFP PTS, cases run fail with the log 'unsupported unsolicited
format: +BSIR=0' and 'FAIL: Expected to receive +BSIR: 0'.
Fixed issue by changing +BSIR=0 to +BSIR: 0.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
Converting a "pre-west" Zephyr setup is not something we officially
support anymore so drop associated documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
west 0.6.0 and 0.7.0 were released in 2019 and 2020 ; keeping
troubleshooting information for these versions is not needed anymore
(there isn't even a currently maintained LTS that would remotely be
concerned by this).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Not sure why didn't this cause the test to fail, but just for
completeness, align this test suite with dns_unpack_query() change
as well.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
dns_unpack_query() no longer prepends the unpacked query with extra dot,
therefore LLMNR responder needs to be aligned with this change when
parsing result and preparing response.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
dns_unpack_query() no longer prepends the unpacked query with extra dot,
therefore mDNS responder needs to be aligned with this change when
parsing result and preparing response.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Explicitly cast data->atime to uint32_t to
prevent signed promotion and sign extension
when multiplying with data->again.
Signed-off-by: Manoj Purushothama <hpmanoj@umich.edu>
Downstream toolchains may already define these macros, add guard to
prevent macro redefined errors.
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
- Add a new counter driver implementation based on the PDL for
Infineon CAT1B devices. This enables support for hardware
counters on the PSC3M5 platform.
- Add IFX_TCPWM_Counter_DeInit and IFX_TCPWM_Counter_Init
macros to include/zephyr/drivers/timer/ifx_tcpwm.h
and sort all of the macros in that file
Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
When handling packets for inputing into packet-sockets, unconditionally
forward them, so that they may be handled by the rest of the network
stack after.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
Converted `arch-schema.yml`, `board-schema.yml`, and `soc-schema.yml`
from PyYAML format to JSON Schema format, including baking in some of
the validation rules that were deferred to ad hoc Python right into the
schemas (e.g. mutual exclusivity of certain fields).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Including soc.h is causing issues - drop as it's not needed
Fixes e.g. the below:
west build -p -b em_starterkit@2.2.0/emsk_em7d \
tests/drivers/build_all/w1 -T drivers.w1.build
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Allows verify_buf_const() to be compliant with the configuration parameter
CONFIG_I2S_TEST_ALLOWED_DATA_OFFSET to work the same way as verify_buf()
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
This mimics IPC transport behavior where BR/EDR Inquiry events as
well as LE Extended Advertising Report (carring legacy PDU) are
considered discardable.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Users can specify a Zephyr SDK installation directory using the
`ZEPHYR_SDK_INSTALL_DIR` environment variable. This variable must be
taken into account when listing all installed SDKs, such as with the
`west sdk list` command.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
The heuristics for guessing "best" image file for a given board will now
prefer webp over png over jpg as there is a good chance that when we
need to fall back to _any_ image for the lack of a better match, a webp
image, if one exists, will be the best image to use.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When a board or shield is named boardfoo_is_awesome, we now explicitly
look for images with a name that starts with one of the segments of the
board/shield name ; i.e.: boardfoo_is_awesome.imgext, then
boardfoo_is.imgext, then boardfoo.imgext.
Fixes: zephyrproject-rtos/zephyr#96144
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The transmit functions will return an error code, instead of a boolean
value. To prepare for this, the API calls are temporarily implemented in
two variants, for old and new API declarations.
The presence of new API will be detected by the use of
NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE macro, which will be
unconditionally defined by a newer nrf-802154 driver.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
- It's not fully enabled.
- Chrome ISH cannot reach such deep low-power state for current scenarios.
- Chrome ISH's panic info mechanism needs SRAM content kept with ISH
reset, but D0i3 has whole SRAM banks power-off.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
- Add the ISH latest code enhancements for SEDI drivers.
- Adjust PM code directory structure.
- Refactor PM code.
- Build AON code in a dedicated lib libish_aontask.a for easy use in
ish_aon.ld file.
- Seperate one zephyr cmake build file to many for different modules.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
- Add SOC interrupt properties and interrupt-names ("reset_prep", "pcidev",
"pmu2ioapic") to intel_ish5 DTS files so PM IRQs are discoverable via DT.
- Move SEDI PM initialization and IRQ setup into ISH SOC PM init:
- Remove the direct call to sedi_pm_init() from soc_early_init_hook in
soc.c.
Previously SEDI code has those IRQ numbers hard coded and calls Zephyr APIs
to connect IRQs, which should be avoided.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
- Remove per-object AON macros and replace with explicit KEEP entries
referencing libish_aontask.a for .text/.rodata/.data/.bss.
- Introduce __ish_aon_start / __ish_aon_end linker symbols.
- Rename GROUP from AON to ISH_AON for clarity.
It's not good to specify source file names in linker script.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
- cleanup header files included.
- Rename LOG_MODULE_REGISTER from pm_service to ish_pm and use
CONFIG_PM_LOG_LEVEL.
- Guard verbose debug traces so they only print for suspend-to-RAM/long
idle states, reducing runtime noise.
- Promote an unsupported power state message from LOG_DBG to LOG_ERR.
No functional change to power handling; changes are limited to logging
and verbosity control.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Support using FUSE v3, instead of FUSE v2.
FUSE v3 has been out for a couple of years now, so most distributions
have it.
But note the FUSE library (and its v3 branch) is currently unmaintained,
and older distributions do not ship it.
Some Linux distros have transitioned their packages away from fuse2.
Which results in less atention in these distros to fuse2, and therefore
a higher likelyhood that there would be distribution issues with the
corresponding packages.
There is also some likelihood the fuse2 packages may be eventually
droped by some of these.
So let's support either version, with a kconfig adapting to either API
and their quirks.
Note that both the fuse2 and fuse3 library code have quite a few
sideeffects on the process that uses it.
By now we continue defaulting to fuse2 as it is the most common.
But users can select to use the v3 if they have an issue w v2 or want
to start trying out using v3.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Avoid a possible race between the FUSE thread and the Zephyr threads
during init.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
FUSE_INCLUDE_DIRS should be passed to the native_simulator build.
If there is several fuse libraries installed, we need to ensure the
bottom side of the driver is built with the correct include paths.
(These includes are irrelevant for the Zephyr side build)
Support having a list of include paths instead of single one.
Support having a list of libraries to link to instead of a single one.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
A few straightforward cleanups to existing documentation to improve
coverage and properly hide internal macros.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the timeline so that the release timeline announcement goes out two
weeks prior to rc1. This way developers have more time to ensure that their
features will make it to the next release. Also add a reminder of the
release timeline one week prior to rc1.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Because the PWM module mixes byte and word register together, the driver
adds an assertion check by writing a pattern to the 2-byte register
`PRSC`, reading it back, and performing a comparison. However,
the `PRSC` register cannot be written when the bit 7 (the PWR bit) in
register `PMWCTLn` is set to 1. This commit moves the assertion check to
a proper place to ensure the write is valid.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Testing with external PSRAM memory requires that an extra overlay file
be defined. Twister requires that platform name along with qualifier be
declared.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Select ARM DWT feature to suppress build warning related to null pointer
detection mechanism.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal adding missing board settings for da14695_dk_usb
so that the latter gets synchronized with da1469x_dk_pro.
By default, peripheral blocks, not actively referenced, should be disabled
and be enabled by application overlay files.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Add UICR.SECURESTORAGE configuration based on device tree partitions.
Validates partition layout and populates size fields in 1KB units.
Handles missing partitions gracefully.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Update the default memory map to include a `secure_storage_partition`,
which is divided into at most four subpartitions. These will be used to
configure UICR.SECURESTORAGE, if enabled.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
If two pwm_set_pulse_dt calls are put consecutive to each other,
the period has already been configured and they refer to the same module
but different submodule (PWM A & B), the second call fails.
LDOK with ReloadImmediate should result in immediate change of the
buffered registers, but it doesn't seem like that's the case.
To fix this, we busywait on LDOK clearance before setting new pulse values.
Fixeszephyrproject-rtos/zephyr#95653
Signed-off-by: Alejandro Perea <alejandro.perea@classified-cycling.cc>
Fix deleting a key that doesn't exist from writing a new entry to the
filesystem when `CONFIG_ZMS_NO_DOUBLE_WRITE` and
`CONFIG_ZMS_LOOKUP_CACHE` are enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Handle the `bt_le_create_conn_cancel` call in the deferred worker
failing due to insufficient command buffers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
STM32N6 and STM32H7RS have an external NOR flash mounted.
Enabling CONFIG_STM32_MEMMAP is a workaround that helps us avoid dealing
with even and odd addresses during write/read operations
(see the test_read_unaligned_address testcase).
With MEMMAP enabled, we can use memcpy() instead of indirect operations
on the SPI bus for write operations, for example, which is agnostic to
flash even and odd addresses.
Additionally, setting CONFIG_TEST_DRIVER_FLASH_SIZE for STM32H7RS is
needed in the test_get_size testcase.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
In Direct XIP with revert, it should be possible to block confirmation
of the non-active slot, so only a bootable binaries are marked as valid.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Removed CMSIS references from wiseconnect CMakeLists
as they are no longer required with UART device runtime
PM. Keeping them adds unnecessary compilation overhead.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
This commit enables the pm device runtime driver support
for the uart_ns16550 driver (only for devices that have an
associated power domain enabled).
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
1. Added siwx91x power domain node in siwg917.dtsi
2. Updated UART device nodes to reference the newly added power domain.
3. Implemented power domain driver to manage power domain transitions
for the SoC.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Fix some "All if ... else if constructs shall be terminated
with an else clause" (c:M23_112) issues reported by SonarQube.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
The API documentation for the disconnected() callback warns that
the listener can't assume that the corresponding connection object
has been freed and may me available to the application.
The recommendations given to still start a new connection
or connectable advertiser are outdated or misleading:
- "start connectable advertising": the options that "will attempt
to resume the advertiser under some conditions" are deprecated
since Zephyr 4.0 (BT_LE_ADV_OPT_CONNECTABLE and related)
- "using k_work_submit()": assuming everything will be fine
when the work is actually processed is not reliable
- "increase CONFIG_BT_MAX_CONN": setting BT_MAX_CONN to N+1
when planning N simultaneous connections is a work-around
that users may have gotten used to (despite its footprint),
but there is no longer any reason to advise it
Stop documenting creating new connections or restarting advertising
from the disconnected() callback and instead recommend relying
on recycled() for these use cases.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
The API documentation for the recycled() callback predates [1],
and still warns users to "treat this callback as an ISR",
although it now runs on the system workqueue thread,
as does disconnected().
"Making Bluetooth API calls" to "re-start connectable advertising or
scanning" should no longer be "strongly discouraged".
On the contrary, we can emphasize that this is the right event
to listen for to initiate operations that will try to re-allocate
a freed connection object.
Mention that BT_MAX_CONN configures the size of the connection pool.
Refs:
- [1] efb5d83: Bluetooth: Host: Defer `conn.recycled()` to the syswq
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
An assertion in bt_conn_unref() accesses the connection's state
after decrementing its reference count.
This is not consistent since, if we removed the last reference,
the Bluetooth Host stack may reuse the connection object
before the assertion is checked.
Instead, retrieve the connection property tested by the assertion
before decrementing the counter, as we do for other properties.
Simplify the code path by returning early when we did not remove
the last reference.
Remind that automatic advertiser resumption is deprecated.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
In bt_conn_unref(), a local variable is used as atomic target:
atomic_val_t old = atomic_dec(&conn->ref);
/* Prevent from accessing connection object */
bool deallocated = (atomic_get(&old) == 1);
Using atomic_get() to access a non-shared local variable
cannot prevent any data race on that variable,
and only causes confusion.
Moreover, this call to atomic_get() is incorrect: the API expects
an atomic_t* argument (target), not an atomic_val_t* (value).
This compiles and /works/ only because Zephyr defines both to be
the same integer type, and thus: atomic_get(&old) == old.
The equivalent C11 code, where _Atomic(T) and T are different types,
wouldn't compile.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Compiler property no_track_macro_expansion is controlled by
CONFIG_COMPILER_TRACK_MACRO_EXPANSION.
When that Kconfig is set to Y, clang fails with the following error
message:
unknown argument: '-ftrack-macro-expansion=0'
This commit modifies clang/compiler_flags.cmake so that there is a
proper clang compiler option for this flag.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The only reason to keep these would be to enable conditional compilation
of some parts of the code. However, we can't see enough benefit in doing
this, particularly since the flash driver itself will conditionally
handle certain paths depending on erase caps, so the options are
deprecated to reduce complexity.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This fully decouples blob_io_flash from specific flash device details,
by not reading the write block size from a hard-coded device tree node,
instead pulling this from the actual flash device used.
The block write routine has been updated to be more generic and fix a
few bugs:
* The write buffer is now sized based on a KConfig option instead of
basing it off the device tree - this makes the module usable with
any flash device, not just the internal memory. The configured value
is checked during initialization, to ensure that the configured size
will fit the write block size required by the device passed to the
init function.
* The erase value used to fill the buffer when using a device with
explicit erase is now pulled from the flash parameters instead of
being hard-coded to `0xff`.
* An additional write block sized piece of buffer is allocated - the
previous buffer sizing with rounding up only worked if
`BLOB_RX_CHUNK_SIZE % WRITE_BLOCK_SIZE` was 0 or 1 (which
coincidentally worked in all testing because the chunk size defaults
to 161, and for internal flash w/write block size of 4,
`161 % 4 == 1`).
* The choice of whether to just write the chunk as-is or to
write-block align it is now based on the erase cap pulled from the
flash parameters, instead of checking the type of memory in the SOC.
This means the module dos _not_ currently support the case where
memory has to be written write-block aligned, but the memory does
_not_ use explicit erase. It uses a trick of filling the write
buffer with the erase value to avoid overwriting existing chunks,
which will not work in this case. This trick is required to support
random ordered chunks while still writing write-block aligned.
* The code has been cleaned up a bit in general.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Only erase a page when starting the first block on that page.
This fixes a bug where, if the block size is smaller than the page size,
the entire page would be erased upon start of each block when writing,
meaning only the final block on each page would be retained. This works
because blocks are always received in order.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This adds a Kconfig dependency on FLASH_PAGE_LAYOUT when using flash
with explicit erase, removing all code dependencies on flash
configuration from the erasure logic. This module already requires
FLASH_PAGE_LAYOUT to be set when using it with flash with explicit
erase, as a silent requirement. The current code does not work without
this option enabled except for the case where a BLOB has a size which is
a multiple of the page size (since, without it, trying to erase flash
space for the final block, which is of variable size, will fail). Also
cleans up the code a bit.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Choose mt35xu01gbba for zephyr,flash-controller. This is needed for
building mcuboot or other application accessing flash.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Add target for imx95-evk that runs code from the mt35xu01gbba external
flash connected through flexspi
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Extract the user pipe setup and claim/release logic so that it can be
re-used by other software modules, if the AT shell is not used. Ideally
the chat instance would live within the `modem_at_user_pipe.c` and be
handed out by `modem_at_user_pipe_claim`, but the current chat API
doesn't make this possible.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In case FIN packed also acknowledged most recently sent data, not all
ack-related TCP context variables were updated, resulting in invalid SEQ
number values sent in consecutive packets.
Fix this by refactoring the FIN handling in TCP_ESTABLISHED state.
Instead of having a separate block strictly for FIN packet processing,
let the packet be processed by common code responsible for regular
data/ack processing. This should be less error-prone for any future
modifications or not-yet-discovered issues. Only after the common
processing of data/ack is done, we check whether FIN flag was present in
the packet, and mark the connection for closing.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case for a scenario where the final data sent by one peer is
acknowledged in the FIN,ACK response from the other peer. Verify that
the acknowledgment is handled correctly, and a consecutive sequence
number sent by the TCP stack in such case is set correctly.
This complements the other existing test for FIN packet handling, which
verified that data received in a FIN packet is handled correctly. With
those tests in place it should be safer to update any logic related to
FIN packet handling.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When CONFIG_NET_IPV4 && CONFIG_NET_IPV4_MAPPING_TO_IPV6 are enabled,
allow IPV4 traffic to platform sockets by setting IPV6_ONLY to 0.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
just disable irq and not plush pending events,
so we don't loose them, when they are enabled
again.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
TCP context cannot operate w/o a TX packet for buffering transmitted
data. So far this net_pkt was allocated at runtime from the common
packet pool, but this created some not-obvious memory requirement on TCP
and could lead to TX packet starvation in case many TCP connections are
open in parallel. Therefore, allocate this packet structure statically,
as a part of the TCP context instead.
This increases the memory requirement of the TCP context by ~64 bytes,
however if that's a concern for the application, the maximum number of
TX packets can be lowered instead. In return, we get a clear separation
between the number of TCP connections opened, and the amount of packets
that can be transmitted.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add helper function to initialize externally allocated TX packet. It's
especially important to configure net_buf slab for the packet so that
net buffers are allocated from a correct pool for the packet.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Using net_pkt for TCP out-of-order recv queue was an overshot, as the
mechanism mostly used net_buf operations directly anyway. It can be
easily replaced with a direct net_buf pointer, so that it's not longer
needed to hog one net_pkt per TCP context anymore.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Changed 'remove' to 'omit' to clarify package instructions for
AArch64 systems. This improves clarity for users following the
Zephyr SDK setup guide.
Signed-off-by: Sheeba Babu <sheebakarickom@gmail.com>
on arc, the test fails with an MPU error instead of a stack
overflow because the priv stack is merged into the defined
stack.
Fixes#68682
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fixes
samples/drivers/pwm/capture/src/main.c:50:47: warning: implicit
conversion from 'floa' to 'double' when passing argument to function
[-Wdouble-promotion]
50 | (float)tim_clk_cycles / (float)period,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
samples/drivers/pwm/capture/src/main.c:51:46: warning: implicit
conversion from 'floa' to 'double' when passing argument to function
[-Wdouble-promotion]
51 | (float)(width * 100) / (float)period);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The dma has to be enabled on the platform in order for ASYNC API to
work. This can be indicated by whether or not any LPUART node has the
`dmas` property set.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
r_sdhi_wait_for_event requires input timeout as us but the current
implemetation using timeout_ms instead
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Switch to using the new NXP_ENABLE_WAKEUP_SIGNAL and
NXP_DISABLE_WAKEUP_SIGNAL macros to avoid adding
platform specific calls in the Zephyr drivers.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
The SDK code to handle managing Wakeup IRQ's for low power mode
varies between SoC's.
Add a MACRO that can be called by the Zephyr drivers so we
can manage these variations without adding SoC specific code
to the drivers.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
To preserve the previous logic, the watchdog must be disabled by default
using the dedicated Kconfig option.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Using WDT_DISABLE_AT_BOOT instead of WDOG_ENABLE_AT_BOOT prevents the
definition of z_arm_watchdog_init, which is important because the COP
watchdog configuration register can only be configured once.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Ensuring flash region has been erased before writing to avoid
inconsistences and force expected erased value (0xFF) into
flash when erasing a region when Hardware Flash Encryption is
enabled
This is handled on this implementation because MCUboot's state
machine relies on erased valued data (0xFF) readed from a
previously erased region that was not written yet, however when
hardware flash encryption is enabled, the flash read always
decrypts whats being read from flash, thus a region that was
erased would not be read as what MCUboot expected (0xFF).
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Convert address for dma when update tcd registers.
- This commit fixes a bug that dma reports source/destination bus errors
when dma try to access the unconveted addresses. The unconverted
addresses will be reserved address from dma view.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Unlike most other remote cores on most other TI K3 devices, the M4
on AM62 was only reserved 14MB of shared memory DDR vs the normal 15MB.
Update the same for all AM62 boards to prevent writing into unreserved
memory.
Signed-off-by: Andrew Davis <afd@ti.com>
The introduced CONFIG_TASK_WDT_DUMMY Kconfig symbol allows to easily
disable the Task Watchdog by providing a dummy implementation.
The Task Watchdog can fire when a board is halted on a breakpoint during
a debugging session, so this new feature can turn useful in this case.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
Choose another sai1_fs_a pin available to avoid the need to
disable the Zephyr-chosen console and i2c3 node.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Remove the calls to LL_TIM_ENCODER_StructInit and LL_TIM_ENCODER_Init
in the QDEC driver. This avoids calling functions from stm32xxxx_ll_tim.c.
They are replaced by a set of simpler functions from the header file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Align the definition of the complementary channels to the normal channels.
That way, it is consistent for all arrays, we use channel-1 as index, and
no other operation is necessary.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This change reduces the level of pointer indirection, which minimizes
repeated dereferencing and helps reduce the overall code size, in the same
way as commit 48e326a552 for UART.
This also fixes the type complimentary -> complementary.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the calls to LL_TIM_xx_StructInit and LL_TIM_xx_Init in the PWM
driver. This avoids calling functions from stm32xxxx_ll_tim.c.
They are replaced by a set of simpler functions from the header file.
OC Init in particular is much simpler now. The init structure needed to be
filled out with the complementary channel (if it existed), even though its
configuration didn't change.
The new init is much more direct and only touches what needs to be
modified.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the calls to LL_TIM_StructInit and LL_TIM_Init in the counter
driver. This avoids calling functions from stm32xxxx_ll_tim.c.
They are replaced by a set of simpler functions from the header file.
Also replaces some macros that used constants coming from the HAL. Use
an equivalent coming purely from the LL.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Apparently, the code was copied from where the broadcast IP is parsed and
not adjusted correctly. Both the log message and the source of the IP
address were wrong.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The opposite of what was stated previously is true.
NET_SAMPLE_MQTT_SN_GATEWAY_IP is only used when
NET_SAMPLE_MQTT_SN_STATIC_GATEWAY is y.
Since this is already expressed using Kconfig dependencies, this change
simply removes the sentence in question.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The lfrccal takes the two properties tempMeasIntervalSeconds and
tempDeltaCalibrationTriggerCelsius which are in steps of 0.25.
The bicrgen.py script incorrectly treated these values as steps
of 1, so the actual values written to (and read from) bicr where
scaled incorrectly.
This commit fixes the scaling for those two props.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Implement a new compliance check to ensure that all modified files
have correct licensing information (SPDX-License-Identifier as well as
copyright info).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add REUSE.toml to describe what license and copyright info applies to
files that may not contain licensing info in their headers.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Due to a change in my work situation, I will no longer
have the time to fulfill my obligations as a maintainer.
The Renesas R-Car area will still have a maintainer and
a collaborator, which is enough given the workload involved.
Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
Extend the pin_get_config() test to verify that when
a pin is configured as input,gpio_pin_get_config() returns
the GPIO_INPUT flag and does not set the GPIO_OUTPUT flag.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
By default, timer2 node is reserved for the OS tick generation and thus,
it should not be referenced by application.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
PM and PM_DEVICE should be enabled, by default. The latter, require that
timer2 node be employed and reserved for the OS tick generation.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Testing with external PSRAM memory requires that an extra overlay file
be defined.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Add valid pin configurations boilerplate for SF32LB52x. All valid
configurations will be added in a follow-up commit.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add bindings for the SF32LB52X SoCs PINMUX peripheral. Note that
SF32LB56X SoCs contain a compatible IP (not others, where HPSYS_CFG is
not required), so if SF32LB56X support is added, binding could be
adjusted to reflect 52x/56x support.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Initial driver for SF32LB SoCs. This driver is incomplete, but allows
to configure the system for a minimal boot.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This is defined as a subnode because RCC is a MFD device (clock and
reset controller), however, Zephyr does not allow >1 device per DT node!
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add bindings for the SiFli SF32LB PMUC. PMUC is a sort of "syscon" type
register block used to control multiple power-management related stuff.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Refer to Ch 2 "Clock and Reset" from reference manual. Some may require
specific bindings in the future if they can be configured (e.g. RC48).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
SiFli SF32LB AON module controls certain low-power or clocks, e.g.
enablement of HXT48 on different LP modes, etc.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
SiFli SoCs have a multi-purpose register set named HPSYS_CFG, which we
can treat as a "syscon".
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This brings CMSIS HAL glue code, which is required if we want to enable
any HAL module without everything blowing up. cmsis_core_m_defaults.h
cannot be used once we enable HAL. CMSIS is that nice.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add glue code to build SiFli HAL. The bare minimum is included, some
more things may be required as we fully test the integration in the
future.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add SiFli HAL module. This module contains register-level description
for SF32LB SoCs IP, and a high-level HAL.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
SF32LB52x is a SoC from SiFli Technologies(Nanjing) Co., Ltd, based on
Arm Star-MC1 core (Cortex-M33 compatible).
For more details, see:
https://wiki.sifli.com/en/hardware/SF32LB520-3-5-7-HW-Application.htmlhttps://wiki.sifli.com/en/hardware/SF32LB52B-E-G-J-HW-Application.html
0-3-5-7 are powered using a Lithium battery and support USB charging.
B-E-G-J are powered at 3.3V and do not support charging.
Other termination codes indicate what type of memory and size is
embedded in the package (QSPI NOR or PSRAM).
Other families exist within the SF32LB family, like SF32LB56x,
SF32LB58x, etc.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
SRAM is segmented as:
- RAM0: 128K (DTCM)
- RAM1: 128K
- RAM2: 256K
where:
- RAM0 can be accessed by all peripherals except PTC1/2.
- RAM1/RAM2 have its own port, so e.g. master 1 can access RAM1 while
master 2 can access RAM2.
Depending on the application, one may decide to just use the whole RAM
as a single block, split RAM0 (DTCM) and RAM1/2, etc. For now, provide 2
schemes:
- Use all SRAM as a single block
- Use RAM0 (DTCM) + RAM1/2
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Just define basic ARM hardware: CPU, MPU and NVIC settings. SF32LB SoCs
are technically Arm-Star MC1 based, an Arm Cortex-M33 compatible CPU
developed by Arm China.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The k_event event is only used if CONFIG_PM_DEVICE_RUNTIME_ASYNC is
selected, but EVENTS is selected, and the k_event included in the
struct pm_device if CONFIG_PM_DEVICE_RUNTIME is selected.
Correct to only include event and EVENTS if
CONFIG_PM_DEVICE_RUNTIME_ASYNC is selected. This saves us 1
struct event per PM DEVICE.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
A follow up to commit 78c1def4db that
probably missed this file.
Fixes CI issues observed in weekly run:
- kincony_kc868_a32/esp32/procpu:libraries.devicetree.api_ext
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add missing `.key` designator.
This also fixes a compile error:
> error: either all initializer clauses should be designated or none of
them should be
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add all the `West project: trusted-firmware-m` collaborators to
`tf-m-tests` and `psa-arch-tests`. They are repositories highly related
to TF-M.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This commit should deal with updating the maintainers list for Smartbond
family of devices.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Gitlint-core has loose requirements and not conflicting
with scancode-toolkit v32.4.1 (click==8.1.3 vs click>=8.2.0).
Signed-off-by: Nicolae Dicu <nicolae.dicu@nordicsemi.no>
Currently, the DMA on several Renesas boards is failing due to
the security attribution of DMA.
As a solution: Enable secure security attribution
for DMA module for:
- RA6: ra6e1, ra6e2, ra6m4, ra6m5
- RA4: ra4c1, ra4e1, ra4e2, ra4l1, ra4m2, ra4m3
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Use `collections.defaultdict` to simplify code, and use the `bytes`
type internally rather than hex strings.
Signed-off-by: Jordan Yates <jordan@embeint.com>
NPCX7, NPCX9, and NPCK3 platforms have their (NUM_IRQS-1) IRQ taken,
so set CONFIG_TEST_IRQ_NUM to a different available IRQ.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This aims to implement a packet forwarding mechanism between
DNS resolver and applications that install a callback, letting
DNS resolver know that received UDP packet is also required by an
application.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
The NRF_802154_ENCRYPTION was split into two additional Kconfigs that
control separate functionalities:
* NRF_802154_IE_WRITER - to enable Information Element writer
* NRF_802154_SECURITY_WRITER - to enable frame counter writer
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Explicitly set the default alt clock for canfd. Without
explicitly setting it the clock subsystem will return
the frequency of the gating clock(APB1).
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Fix peripheral availability per h5 line.
Some peripherals are not available on the entry level
lines of the stm32h5 series:
- fdcan2 only on SoCs >= H523, but not on h562
- sai only on >= H562
- ethernet only on >= H563
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Since we're not yet at a consensus on where 'write-block-size' should be
set, make the adjustable alignment expected only in the revert case
to restore functionality on the 'normal' case.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Enable the LPM013M126A display node under USART1 in the slstk3701a DTS.
Add pre_dt_board.cmake to suppress SPI bus bridge warnings, and update the
pinctrl configuration to properly configure the display control pins.
Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
SDRAM1 / SDRAM2 / PSRAM sections were being referenced in order to make
them accessible for the framebuffer. This is now addressed via the
mechanism provided by Zephyr hence this is no more necessary.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Use the LINKER_DT_NODE_REGION_NAME macro in order to get the
memory-region into which to put the framebuffer for the LTDC.
This is made possible since all memory areas have the
zephyr,memory-region compatible, allowing to have each region
referenced within the linker script generated by Zephyr.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add the compatible zephyr,memory-region for all mmio-sram region
which do not have yet that compatible as well as add the label to
those regions. This allow to have a linker memory report which list
all areas and also have all regions accessible via the linker script.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
remove CONFIG_LIBSBC_ENCODER and CONFIG_LIBSBC_DECODER from sbc.h, then
include the required heders files path defaultly to fix building errors.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Now that we support multiple VIFs, need to add argument for the
interface for any command.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Move the VIF initialization to top to do it for both VIFs, this fixes a
crash when scanning on the 2nd VIF.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In case STA + AP mode is enabled, then adjust the defaults to accomodate
the second interface.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Update WPA supplicant functions to pass the control channel (socket) as a
parameter instead of relying on a global socket. This change aligns with
the PR 80 modifications in hostap repo and ensures that each Virtual
Interface (VIF) uses its dedicated control channel for communication.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Description:
The nRF7002 firmware supports two virtual interfaces (VIFs) that can
operate in different modes (e.g., AP and STA). However, the existing
Zephyr driver only utilizes a single VIF, preventing full
multi-interface support.
This commit extends the nRF7002 driver to support multiple VIFs by
making the following modifications:
* The driver already contains an array of vif_ctx_zep, but only the
first item was being used. Now, a second Ethernet device is registered
using vif_ctx_zep[1], enabling multi-VIF operation.
* Introduced vif_ctx_cnt to keep track of active interfaces and manage
their state effectively.
* Ensured that FMAC (Firmware MAC) is initialized only once, avoiding
redundant initializations when multiple VIFs are present.
* The UMAC control commands previously did not associate responses with
the issuing VIF. A queue is now introduced to track the originating VIF
for each command and correctly route the response event to the
corresponding interface.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The Kconfig option `CONFIG_POSIX_READER_WRITER_LOCKS` is being deprecated
and renamed to `CONFIG_POSIX_RW_LOCKS` in order to match the name of the
POSIX Option Group.
`_POSIX_READER_WRITER_LOCKS` is the name of the feature test macro.
There are a few instances where the name of the Option Group does not
correspond exactly to the name of the Option (Feature Test Macro), and
this is one of them.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
CONFIG_SERIAL_SUPPORT_INTERRUPT is a Kconfig option that is supposed to
be selected by serial drivers that support interrupts. This commit
removes a bogus "depends on !SERIAL_SUPPORT_INTERRUPT" which does not
make sense and causes some tests to fail.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There are several doc-related build targets that do not require sphinx,
e.g. one might want to simply generate the Doxygen docs (Doxygen remaining
a hard dependency), so do not require sphinx to be present and, instead,
conditionally add the associated targets when sphinx is present.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Enable CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE by default for all
nordic SoCs if CONFIG_PM_DEVICE_RUNTIME is used. This will ensure
consistent behavior across all nordic SoCs and remove the need
for pasting the devicetree propert zephyr,pm-device-runtime-auto
everywhere.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Many SoCs which use PM_DEVICE_RUNTIME need every device in the system
to have PM_DEVICE_RUNTIME enabled to function. Currently, this is only
possible by adding zephyr,pm-device-runtime-auto; to every node in
every devicetree which could potentially implement device power
management. This is very error prone since its easy to miss a node,
especially if users apply overlays, where users need to know and
remember to apply or reapply this property.
This commit adds a Kconfig, disabled by default, which automatically
treats every device as if it had the zephyr,pm-device-runtime-auto
property added to every node.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
We are moving away from category based driver names. Updating the
"files:" patterns to include the newer drivers as well.
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Since this board is by default having hyperram as SRAM, need to set
NOCACHE_MEMORY when using dma to make sure the memory for the tcd pools
is not cached.
The previous approach to set zephyr,sram to dtcm just
caused an error because zephyr,dtcm was also set to dtcm, and the
default logic of the driver is put the tcdpools in dtcm, so what
happened was these buffer got linked over the rest of the app causing
massive failing of the image to work at all.
So instead of doing that we need to just keep running from hyperram but
set CONFIG_NOCACHE_MEMORY to have a place to put the tcd pools that wont
be cached.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add missing one-shot conversion logic in sample_fetch when driver is
configured for shutdown mode. Previously, the driver would attempt to
read temperature without triggering conversion, resulting in stale data.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
PWM leds for this board are not functional out-of-the-box as pwm0 needs
to be configured/enabled first. Disable the pwmleds node to reflect
this.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add support for enabling and configuring the self-test mode of the
LIS2DH accelerometer through a dedicated sensor attribute.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
List of allowed platforms for this sample was
changed in PR #85997. This enabled more
platforms including those that are not needed.
This commit excludes nrf5340/cpuapp_ns and
nrf5340/cpunet platforms since they are not
supported by this sample.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
Adjust the bit field check sequence for "en4b" to support some flash
devices that offer multiple mechanisms for entering 4-byte address
mode.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
The pwmleds node for `xmc45_relax_kit` and `xmc47_relax_kit` should be
disabled initially due to the PWM controller the pwmleds node use not
being enabled by default.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a note that the backlog parameter of the listen() function is now
respected and the backlog support has been implemented for the TCP
server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
TCP somehow ended up with two internal headers with duplicate set of
internal function declarations. As tcp.h looks like a subset of the
tcp_internal.h header, combine the two headers into a single
tcp_internal.h and remove tcp.h. There were some differences in doxygen
API descriptions, so I've used the description that better described the
actual function purpose.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Implement TCP connection backlog for TCP server. The backlog parameter
is already specified by the listen() socket API, however it was never
implemented in Zephyr. It can be useful to limit the number of incoming
connections on the server side, and thus limit the connection flood and
resource shortage.
The backlog is implemented as a atomic counter inside the TCP context.
The counter is initialized on the listen() call (and thus no connection
can be accepted before listen() is called), and then decremented
whenever new connection is initiated. When the application accepts
the incoming connection, it should call the net_tcp_conn_accepted()
API (done automatically for sockets) to inform the TCP layer that the
backlog can be incremented. The backlog value is also incremented back
if the connection is released before the connection was passed to the
application.
For tracking the parent (listening) socket, the 'accepted_conn' pointer
on the client context has been reused. Note, that the pointer used to be
cleared before the accept_cb() call before, to prevent consecutive calls
to the callback, however this was not really needed - the TCP state is
changed anyway, and the accept_cb() is only used in TCP_SYN_RECEIVED
state. The pointer is no cleared when the application accepts the
connection (or the client or the associated parent context is closed).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When encoding cached LwM2M 1.1 resources into SenML CBOR, the encoder
currently aborts with -ENOMEM if the number of records (minus
some CBOR delimiter elements) exceeds CONFIG_LWM2M_RW_SENML_CBOR_RECORDS.
This discards all serialized data and prevents any payload from
being sent, leaving the client stuck and caches filling up.
This patch changes the behavior: if some records were already
serialized before the buffer shortage, the CBOR output is finalized
(end marker added) and the partial payload is returned. This allows
the client to send useful data, and the upper layers can react by
reducing batch size.
Impact:
- Preserves forward progress instead of canceling the message
- Avoids cache lock-up
- No changes to the API or success path behavior
Signed-off-by: Marcel Wappler <marcel.wappler@decentlab.com>
Introduce a shell for specific cpu core about PM control,
this aligns with existing design flow where the policy decides
the state based on next event timing, locks and latency constraints,
and the system naturally enters low power through the idle thread.
New shell commands under `cpu`:
- cpu states : List supported CPU power states (from devicetree)
- cpu available : For each state/substate, show if available
- cpu lock : Lock specific low power mode
- cpu unlock : Unlock specific low power mode
- cpu idle ms : Sleep the current thread to let idle run PM
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add two helper functions to convert power management states between
enum and string:
- pm_state_to_string()
- pm_state_from_string()
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add necessary configuration for sar_adc1 on imx93 core cm33
There are some issues with USERSPACE, so add an overlay to
disable CONFIG_TEST_USERSPACE, will drop it once it works.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
In the DCMI video driver, set the caps.min_vbuf_count field to
indicate that two buffers are needed. Fix use of un-initialized
memory breaking the samples in some situations.
Signed-off-by: Josuah Demangeon <me@josuah.net>
- Add pinmux for all header pins that support GPIO functionality.
- Ball name is included in case one header supports the same
functionality on multiple balls.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Replace the UARTs with the ones defined in k3-am62-main.dtsi.
- Also ends up adding main prefix to the uarts.
- Adjust the board dts to use the new names.
- Since the same file is also used by m4 cores, do not add interrupt
properties, since they are different between m4 and a53
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Add BGM220 Explorer Kit. The board has a BGM220P module, button and
LED as well as mikroBUS and Qwiic expansion connectors.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add support for BGM220P modules. Enable oscillators in SoC DTS
since the necessary crystals are present in the modules.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add missing EUART0 peripheral to devicetree for xg22.
Fix NUM_IRQS, there are 64 external interrupts on xg22.
Remove `select` of UART_INTERRUPT_DRIVEN at SoC level, this doesn't
belong here, since it prevents disabling the UART. This should be a
board or application level decision.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The emulated uart was named `euart0`, which collides with the name
of a physical uart on some Silicon Labs devices. Since the test
is not limited to run in simulation, rename the emulated uart
node to something less likely to collide with physical uart names.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Propagate #79996 where RGB_565 and BGR_565 interchange got fixed.
It is not necessary to enable the BGR_565 format for the ST7789V display
as RGB_565, the default, is correct.
Signed-off-by: Josuah Demangeon <me@josuah.net>
In the ESP32 video driver, set the caps.min_vbuf_count field to
indicate that a two buffers are enough. Fix use of un-initialized
memory breaking the samples in some situations.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Increase the ESP32 S3 Eye board buffer size to fit the selected frame size
configured. This fixes a buffer allocation error preventing the sample
to run. Only use a single buffer which is enough to run it.
Signed-off-by: Josuah Demangeon <me@josuah.net>
implemented as an SCA for now but might benefit from being baked into
the build system so that it's always available.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Inject packets from AIL to Thread network and vice versa taking into
account packet forwarding security safeguards and multicast forwarding.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Added helper function to get scope of an IPv6 address. Also added raw
variant which uses plain uint8_t buffer.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Invoke twister via west instead of invoking it directly. This tests the
twister integration in west across host platforms.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
stm32f4xx to Version 1.28.3
stm32f7xx to Version 1.17.4
stm32mp2xx to Version 1.2.0
stm32u0xx to Version 1.3.0
stm32u3xx to Version 1.2.0
stm32u5xx to Version 1.8.0
stm32wbxx to Version 1.23.0
Signed-off-by: Francois Ramu <francois.ramu@st.com>
On MMU-based systems, the address space of the IP needs to be mapped
before it can be used, otherwise the system will fault. Furthermore,
since the HAL driver uses the base address of the IP to perform various
operations (e.g. clock ungating), the map between the physical and
virtual addresses needs to be 1:1.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
As per the i.MX93 TRM, section "30.2 System Clocks", the root clock
of TPM3 is not TPM3_CLK_ROOT, but, rather, BUS_WAKEUP_CLK_ROOT. Therefore,
if clock_control_get_rate() is using the IMX_CCM_TPM3_CLK clock ID, the
root clock will have to be set to kCLOCK_Root_BusWakeup instead of
kCLOCK_Root_Tpm3.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add stm32f769i_disco conf file in order to increase the amount of
HEAP to ensure k_malloc allocation goes well.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add the description of the DSI connector available on
the stm32f769i_disco board and zephyr_mipi_dsi/zephyr_lcd_controller
alias to be used by display shields.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Describe the DSI block available from STM32F767 and onward
and allow to output data generated by the LTDC to a DSI
panel.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Now that PLLSAI can be configured via the device-tree, remove the
SOC specific PLLSAI configuration from the LTDC driver.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add the pllsai configuration for boards that enables the LTDC
and are relying on the LTDC driver to perform the PLLSAI
configuration. This will allow to remove the PLLSAI code from
the LTDC driver.
Impacted boards are:
boards/st/stm32f429i_disc1/stm32f429i_disc1.dts
boards/st/stm32f746g_disco/stm32f746g_disco.dts
boards/st/stm32f7508_dk/stm32f7508_dk.dts
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Replace bitwise AND (&) by logical AND (&&) within
preprocessor if statements in clock_stm32_ll_common.c
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add code handling the pllsai. It is similar to the pllsai1
pllsai2 which can be found on some other socs, except, depending
on the socs the fact that pllsai source can be or not common with
other plls and moreover it can also have additional DIV_DIVQ
and DIV_DIVR additional dividers.
Choice is made to add PLLSAI instead of add further support to
PLLSAI1, in order to stick to the proper naming of the PLLs.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
RX26T MCU uses a clock source marcos with different value
compared to the previous, this commit add new one
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
- Update serial driver for RX26T support. This MCU using grp interrupt
feature (not supported yet), so need to add some marcos to enable
support.
- Change the struct st_sci0 to use a common sci iodefine struct as
st_sci
Signed-off-by: Hau Ho <hau.ho.xc@bp.renesas.com>
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
Change the transfer implementation to use interrupts
instead of a busy wait loop.
Added a Kconfig to specify a timeout period to wait
for a transfer to complete.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Migration guide is update to report the changes that has been introduced
in the AXP192/AXP2101 Kconfig symbols, i.e. removal of MFD_AXP192_AXP2101
in favor of MFD_AXP192 and MFD_AXP2101.
Release notes are also updated to notify about the new support for the
power button available on the AXP2101 device.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit enables the support for the power button provided by axp2101.
The button generates press/release events for the INPUT_KEY_POWER key.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add initial support for interrupt generated from the axp2101. For
the time being only support for power button is added but others can
be added in the future if necessary.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The previous axp192 driver was implementing some basic support for
axp2101, but in fact most of the source code was guarded to be
compiled in only when axp192 was used and only the chip-id was read
in case of axp2101.
Next commits are going to introduce some support for the power button
found on the axp2101 device, so it would look cleaner to split the
2 drivers.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Some error cases, and the asynchronous dma case, were not calling
pm_policy_device_power_lock_put() at the right time.
Signed-off-by: Mike J. Chen <mjchen@google.com>
For every TX, the driver used to get both callbacks when
each block was trasnfered and when the entire DMA was complete.
The callback for each block isn't needed so remove it
and reduce intermediate interrupts (the more blocks in
the DMA link, the more needless intermediate interrupts we
now no longer get).
Signed-off-by: Mike J. Chen <mjchen@google.com>
Handle endpoints in halted state properly by marking endpoints as halted
when appropriate, and inhibiting transfers involving halted endpoints.
Co-authored-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Signed-off-by: Mathieu CHOPLAIN <mathieu.choplain-ext@st.com>
Since the UART API explicitly states that the poll_out function needs
to block until the character is sent, change the mechanism and add
a busy-wait loop to ensure transmission completion before proceeding.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Since the symbol CONFIG_UART_ASYNC_API is shared between EUSART and USART
drivers, it creates a scenario where EUSART can have
CONFIG_UART_SILABS_USART_ASYNC=y but with no DMA device declared for it
in the DTS (because we only want async API for the USART driver).
We handled this case by disabling async transfer when the DMA
device is null, but when we activate CONFIG_PM, we have a hard fault due
to null pointer dereference in the ISR.
This bug was only discovered today when trying to enable CONFIG_PM over the
uart_async_api test, which led to a hard fault in the ISR. This occurs
because we only enable interrupts when the PM is enabled in the "poll_out"
function to put the PM lock back.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Add conditional compilation guards around timeout operations in
kernel/events.c to ensure compatibility with timer-less configurations.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Fix dts property description of de-deassert-time for stm32-uart driver.
Old text was copy'n'pasted from de-assert-time.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Trivial fix to the Kconfig descriptions in the cmake snippet tests so
that they match the actual snippet names.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Because generation and programming of UICR + PERIPHCONF artifacts
depend on the 'uicr' image which in turn must be included by Sysbuild,
many if not most nrf54h20 applications will need to be built using
Sysbuild to function as intended.
To make this known to the user, print a CMake warning whenever
CONFIG_NRF_PERIPHCONF_SECTION=y but Sysbuild is not being used.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add build system support for populating the PERIPHCONF
(global domain peripheral configuration), based on nodes and properties
found in the devicetree. This should make it so all samples and tests
that were broken by the move to IronSide SE now function correctly
without workarounds or manual steps.
When enabled, a new python script called gen_periphconf_entries.py is
run when building. The script iterates over nodes and properties in the
devicetree and generates a C file called periphconf_entries_generated.c
in the build directory, which is added as a source file. The C file
uses the macros from uicr.h to configure the global domain according
to the devicetree.
The PERIPHCONF entry generation is enabled by default when building
for nrf54h20dk/nrf54h20/cpuapp and nrf54h20dk/nrf54h20/cpurad.
It will also be used on nrf9280 soon, therefore it is placed
in the common uicr directory.
This new feature does the same job as nrf-regtool did when building
for nrf54h20 before, and is compatible by the bindings that were used
by nrf-regtool.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
As the linkaddr->addr is no longer a pointer, the original
assert check is not working as it should. So use the length
of the linkaddr to verify that it is > 0.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The max length of the dummy network interface is 6 bytes so
fix that and make sure we check the return address properly
when setting the link address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
DBS06 has been consistently contributing and reviewing fuel gauge
changes. Given how much additional support they have added we should add
them as a maintainer.
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Several static functions in ptables.c always return 0, make them void
to improve readability.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Enable Bluetooth on xg21 radio boards. Update hal_silabs to
include binary blob for Bluetooth on xg21.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Reformat devicetree files:
* Sort nodes by unit address or name
* Sort properties by category and name
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This change introduces a set of C preprocessor macros to determine the
maximum value from a list of 1 to 10 arguments.
The main macro `MAX_FROM_LIST(...)` dispatches to specialized `MAX_N`
macros (where N is from 1 to 10) based on the number of arguments
provided. This is achieved using a common variadic macro technique
involving a helper macro `GET_MAX_MACRO` to count the arguments and
select the appropriate implementation.
The `MAX_N` macros are defined recursively using the ternary operator
`?:` to perform comparisons.
This provides a compile-time mechanism to find the maximum value within
a small set of numbers.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
A few documentation comments in os_mgmt.h were not using the proper
"javadoc-style" comments.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
New OpenThread functionalities have been enabled. Updated specific nxp-
rcp-host-wifi configuration file.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit brings new platform files:
-`border_agent`
-`udp`
-`mdns_socket`
-'trel'
This commit also makes use of existing Openthread task to
process border router messages.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit adds a work item designated for Border Router message
parsing. A generic message structure has been proposed.
If CONFIG_NET_IPV4 is enabled, border router services will start only
after an IPV4 address has been assigned on the backbone interface.
If border router is initialized before DHCPV4 client has been assigned
an address, initial mDNS IPV4 packets will be dropped, because a source
address cannot be retrieved from that specific backbone interface.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This allows to use different I3C clocks from bus clock.
E.g. I3C can run from HSI instead of bus clocks.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Old code looks like there is relation between .pclken and
IRQ handler. This change should make it more readable.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
When next_ping == now, the code scheduled the workqueue for the current
time. On native_sim, this meant that the system workqueue thread was stuck
in an infinite loop because it kept processing the MQTT work over and over
again and the current timestamp could not advance anymore.
I didn't investigate why the yield inside the workqueue didn't help or why
native_sim can't advance time when one of the threads is stuck, but
changing the condition to >= inside mqtt_sn solves this issue.
I discovered this while running zephyr.exe through strace for up to 60
minutes. I guess that the performance overhead makes it more likely for the
workqueue handler to be run while next_ping == now, but I didn't verify
that, because it takes a long time to trigger the bug.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
This commit updates the function to only set output-related flags
(GPIO_OUTPUT_INIT_HIGH, GPIO_OUTPUT_INIT_LOW) when the pin
is actually configured as output. For input pins, only GPIO_INPUT and
other relevant flags are set.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Code coverage is currently executed and uploaded to codecov twice a day.
Now that "twister on push" also uploads stuff (test results) to codecov,
it is preferrable to have each push commit known to codecov to have both
tests and coverage results, since otherwise the "compare" feature that
allows to see the delta between two commits might not work as expected.
We do an average of ~4 merge batches per day so overhead is pretty
minimal.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In !XIP case, provide RAM_RO and RAM_RW regions with their
respective MPU configurations.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Co-authored-by: Sudan Landge <sudan.landge@arm.com>
__rom_region_size linker symbol is available for other archs, but was
missing for Cortex-M. Add it now.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
MCU_GAP_FILLING is advised on ARMv8 based platforms to prevent from
against attacks that attempt to execute malicious code from SRAM.
It is enabled by default when USERSPACE is disabled, enable it
also when enabled.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
An earlier fix (0871c7e) meant to remove warnings due to index and
index-tex defining overlapping table of contents actually broke the PDF
build. Fix it by making sure index-tex is set as root_doc when building
for LaTeX/PDF.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Use DT_FREQ_M() and DT_FREQ_K() for DTS frequency property
for better readability.
- Include freq.h in dts to use DT_FREQ_M/K()
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Beside main core, check output from remote core console.
Checking second console will work only for nordic boards
(as the pattern to get second uart interface is known).
For other boards (with different interface naming),
the test will check only provided console,
which is the same behavior as harness:console.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
The efr32xg22 series does not support the same async operations as other
efr32 series chips. This change allows the eusart driver to function.
Signed-off-by: Devin Jaenicke <devinjaenicke@glassboard.com>
With CONFIG_LOG=n and MSPI controller on, unused variable warning
is elimiated.
Now able to be used without CONFIG_PM_DEVICE.
Fixed a bug where dev_id may be null with pm device runtime auto.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Some headsets reply conf_rsp with flush timeout (0xFFFF) even conf_req
don't configure the flush timeout, stack should accept it.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
add one Kconfig `BT_L2CAP_RX_FLUSH_TO` to configure the minimum L2CAP RX
flush timeout accepted during processing peer's l2cap flush timeout
configuration.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
ensure LL_I2C_TransmitData8() is always called when
TXIS is set, even if read_processed() returns an error.
This prevents the peripheral from clock-stretching
indefinitely and blocking the I2C bus when the master
reads from the slave.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
The SIUL2 external interrupt driver is a native implementation usable
across all NXP SoCs with SIUL2 IP. Remove the "S32" prefix to allow
clean reuse by other families.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The SIUL2 GPIO driver is a native implementation usable across all
NXP SoCs with SIUL2 IP. Remove the "S32" prefix to allow clean
reuse by other families.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The SIUL2 pin control driver is a native implementation usable across
all NXP SoCs with SIUL2 IP. Remove the "S32" prefix to allow clean
reuse by other families.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
when role is server and try to get chan by psm in application, it
works fail because chan do not store psm.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
- Add CEU pin configuration to ek_ra8d1-pinctrl.dtsi
- Enable CEU node and Arducam 20-pin connector in ek_ra8d1.dts
- Configure PWM3 as external XCLK via pwm-clock node
- Update board YAML to declare video support
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add support for the Renesas RA Capture Engine Unit (CEU),
including driver source files, Kconfig options, and DTS bindings.
- Add initial implementation of the RA CEU driver
- Add dedicated Kconfig and CMake integration
- Provide Devicetree bindings for the RA CEU
- Update module Kconfig to include the new driver
This enables image capture functionality using the CEU peripheral
on Renesas RA series MCUs.
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Change the value returned from disk_flash_access_write to return
the return code instead of a hardcoded zero.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
The reset source is SOC specific, MCUX SDK SRC driver is
also SOC specific, it doesn't mask the SOC differences.
So the driver can use SOC macros directly, and handle SOC
differences in the hwinfo driver, not necessary to wrap
MCUX SDK driver.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Originally the driver is selected if `HAS_MCUX_SRC_V2` is
selected in SOC level kConfig.
Change to use dts to mark the driver is avaiable for some SOC.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Get the KPP_keyPressScanning status value
to determine the stability of key data.
Update read_keys_old data update timing.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
RT1160 and RT1170 have different sizes for OCRAM1 and OCRAM2 this PR moves
the static ocram1 and ocram2 labels to the soc specific dtsi and defines
their sizes according to the RM. For RT1160, it combines the OCRAM1,
OCRAM2, and OCRAM M7 (FlexRAM ECC) into 1 node for a better user
experience. 256KB total as opposed to 64KB.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
This fixes CI issues ("error: statement with no effect") in the
project's weekly CI run, e.g.:
west twister -p xmc47_relax_kit/xmc4700 -s drivers.spi.loopback.internal
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added support for sys_poweroff on ADL and ATOM socs based on
acpi_poweroff.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Updates the k_ipi_work documentation to make the k_ipi_work
structure visible but its contents opaque.k
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
In addition to #94710 fixes, SPI RTIO currently fails existing spi
loopback testcase: test_spi_null_tx_rx_buf_set.
This plus the referenced PR enable RTIO-enabled drivers to pass the
testsuite.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Enable the pin configuration as single-ended pull-up output, allowing for
a currentless, signal-only output.
Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
- Since PocketBeagle 2 RevA1 has 4 cores, we need to adjust the variable
CONFIG_MAX_THREAD_BYTES to allow this test to build.
- Does not affect Rev A0 (2 cores).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Since PocketBeagle 2 RevA1 has 4 cores, we need to adjust the variable
CONFIG_MAX_THREAD_BYTES to allow this test to build.
- Does not affect Rev A0 (2 cores).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Since PocketBeagle 2 RevA1 has 4 cores, we need to adjust the variable
CONFIG_MAX_THREAD_BYTES to allow this test to build.
- Does not affect Rev A0 (2 cores).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Since reva1 support was merged so close to psci PR, it's only enabled
in reva0 right now. So enable it here.
- Tested with smp/pi sample
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Add the flags parameter to the z_thread_stack_alloc_pool function.
Determine the maximum possible stack size based on the size of the reserved
memory for stack and the thread type (flags).
The stack size that can be used by a thread depend on its type
(kerner/user). For the same stack size, the macros K_KERNEL_STACK_DECLARE
and K_THREAD_STACK_DEFINE may reserve different amount of memory.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
- Configure and attach DMA for each USART node.
- Enable hardware flow control capability.
- Add RTS/CTS pin name signals.
Note: Some platform series are missing due to conflicts with other pins
used by different test drivers
(RTS pin should be connected to the CTS pin.)
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Configure and attach DMA for each platform's USART to enable
asynchronous UART communication.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Enable support for FDCAN1 on nucleo_h7s3l8 board. PD0 (RX) and PD1 (TX)
are used for interfacing an external CAN transceiver according to the
breakout connector description in the board's schematic.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Provide the soc configuration for fdcan1 and fdcan2 controllers.
This includes registers address, clocks and interrupt lines
details.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Some x86_64 platforms have only one CPU node defined in their
respective devicetree files, while setting `CONFIG_MP_MAX_NUM_CPUS`
to two.
This commit adds missing CPU nodes in said devicetree files.
Signed-off-by: Adrian Ściepura <asciepura@internships.antmicro.com>
Print the actual number instead of a single-element tuple.
For example: "2 messages dropped" instead of "(2,) messages dropped"
Signed-off-by: Tamás Kiss <tmik@demant.com>
Move assigned number for mesh from mesh.h to assigned_numbers.h where
all assigned numbers are located.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Move assigned number for audio from audio.h to assigned_numbers.h where
all assigned numbers are located.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Move Bluetooth Assigned Numbers to own header file to separate them from
core GAP functionality.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Remove codecov upload from doc build workflow and instead ensure both
test and doxygen coverage is uploaded in the same codecov.yml workflow,
this way codecov report will accurately show the consolidated coverage
for each "push" commit.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This makes it easier for anyone to get a coverage report for the doxygen
documentation through a simple "make doxygen-coverage".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
clang complains about implicit conversion from enumeration type
'enum sensor_channel_ina2xx' to different enumeration type
'enum sensor_channel' causing failures in CI.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The parameter for LPIT_DisableInterrupts should be
lpit_interrupt_enable_t, not channel id.
Besides, improve the code to use BIT macro for shift
operation.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Enable test for all channels.
This test covers following test cases:
- test_set_top_value_without_alarm
- test_set_top_value_with_alarm
- test_valid_function_without_alarm
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add the Texas Instruments INA228 Power/Energy/Charge
monitor. This chip is similar to the INA237, but has
a more precise ADC and added energy/charge channels.
Signed-off-by: Wilkins White <ww@novadynamics.com>
This commit renames the ina23x folder and common files to ina2xx.
The more generic name will support, e.g., the INA237 and INA228
series chips.
Signed-off-by: Wilkins White <ww@novadynamics.com>
Move power configuration from the device init function into the
`DISK_IOCTL_CTRL_INIT` and `DISK_IOCTL_CTRL_DEINIT` handlers. If
`pwr-gpios` is defined, this ensures that the card is not powered up
until requested, and enables power down the card when not in use.
This behaviour matches the implementation for `sdhc_spi`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Provide a pointer to the first element of the clock list explicitly (as
done by `stm32_sdmmc_clock_enable`), instead of a pointer to the list.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The board mismatch error message in `scripts/west_commands/build.py` was
partially missing f-string formatting. This caused `{self.args.board}`
to be printed literally instead of being replaced with the actual board
value.
Fix the f-string.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Added board shared sram noecc overlay.
The overlay configure shall select non ecc memory to avoid being clear
during system startup.
Change window max to 1000 for nxp wdog32 to avoid 16bit overflow when
clock freq is 32768hz and divider is 1.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Limit RX FIFO size allocation to a percentage of the total
SPRAM available, to cap allocation according to memory size.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Disable D+ pull-up on core disable to make sure that device does not
indicate its presence to host before the stack is ready (software
initializes controller and clears SftDiscon bit).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add commands `BTP_SDP_SEARCH_REQ`, `BTP_SDP_ATTR_REQ`, and
`BTP_SDP_SEARCH_ATTR_REQ`.
Add service record handle report event
`BTP_SDP_EV_SERVICE_RECORD_HANDLE`.
Handle the commands and call function `bt_sdp_discover()` to start the
SDP discovery.
And report the discovered service record handle if the request type is
`BTP_SDP_SEARCH_REQ`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add service id BTP_SERVICE_ID_SDP=0x1f for SDP.
Implement function `tester_init_sdp` and `tester_unregister_sdp`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
workflow_dispatch can't filter on branches therefore remove it.
To keep the intended behaviour add a condition on main
to the job of the stale-workflow-queue-cleanup workflow.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
workflow_dispatch can't filter on branches therefore remove it.
To keep the intended behaviour add a condition on main
to the job.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The commit 7b1e610cc7 ("ci: move PR body check to a different workflow")
moved the step this depends on to the do_not_merge workflow,
so it no longer has any effect.
This extra message was initially added to the fail step to make it
easier to spot the issue. But I don't think it's necessary
in the do_not_merge workflow either now.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Due to may current activities and lack of time I can not perform
anymore as GD32 maintainer. At same time, promoting soburi as new
maintainer.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The Bouffalo Lab has been evolved since it was introduced. It can now
grow in the hands of community. The platform is not isolated and there
is an active maintainer which is active working.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This directory was added for the DT items common to both ARM (dts/arm) and
ARM64 (dts/arm64) cores for TI devices.
For now the only TI devices that share DT nodes between cores of different
architectures is the K3 family. If other TI devices start using this dir
then we can get more granular in the MAINTAINERS entry here. Until then
mark the whole directory as part of "TI K3 Platforms".
Signed-off-by: Andrew Davis <afd@ti.com>
When a pull request is based off an old commit in the base branch (usually
`main`), the MAINTAINERS file from the `pull/NUMBER/head` ref may contain
out-of-date changes, and running diff between it and the MAINTAINERS file
from the latest base branch may return more changes than what is actually
made in the pull request.
This commit updates the workflow to check out the MAINTAINERS file from the
`pull/NUMBER/merge` ref, which is a temporary ref created by GitHub with
the pull request commits merged into the base branch.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
When a pull request is based off an old commit in the base branch (usually
`main`), the manifest file from the `pull/NUMBER/head` ref may contain
out-of-date changes, and running diff between it and the manifest file
from the latest base branch may return more changes than what is actually
made in the pull request.
This commit updates the workflow to check out the manifest file from the
`pull/NUMBER/merge` ref, which is a temporary ref created by GitHub with
the pull request commits merged into the base branch.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The uart driver for nRF54h20 doesn't call pm_device_runtime_enable().
During an uart driver init `pm_device_driver_init()` return early,
because the `pm_device_is_powered()` returns `false`. Power domains,
where uarts are instantiated, are disabled: `pm->domain->pm_base->state`
is not equal to `PM_DEVICE_STATE_ACTIVE`.
At the end of the day, an uart instance is left disabled.
This is a workaround to make the uart usable when CONFIG_PM,
CONFIG_PM_DEVICE and CONFIG_PM_DEVICE_RUNTIME are enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This follows change of ethos-u core driver (hal_ethos_u) which
removes cache flush/invalidate mask function ethosu_set_basep_cache_mask.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Remove the hash node from STM32755x SoC DTSI. The node was broken
(wrong node name and compatible property) and seems unused and moreover
most STM32H7xx have an HASH peripheral so a proper fix would rather
be to add the node to all relevant SoC. This will be done later, if
the need arises and after proper validation.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
In partial resolved notification case, there is a case that the tail
room of new allocated buffer is not bigger than the tail room of the
current receiving buffer. Since, the new allocated buffer has the same
size with the current receiving buffer, it means a complete SDP record
cannot fit into the allocated buffer. In this way, the following SDP
discovery should be stopped.
In partial resolved notification case, if the tail room of the new
allocated buffer is not more the tail room of the current receiving
buffer, reports the error `-ENOMEM` and stop the following SDP
discovery.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The minimum receiving buffer size is 0x0007. The following SDP
discovery should not be started if the space of the receiving buffer
is less than 0x0007.
If there is no more space of the receiving buffer for the next SDP SSA
discovery, try to notify the upper layer with the partial resolved.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In the SDP specification, the `MaximumAttributeByteCount` of SA and
SSA should be in range 0x0007-0xffff. But in the current
implementation, this value is not checked both SDP server and client
sides.
Check the `MaximumAttributeByteCount` when receiving the SA or SSA
request on SDP server side.
Check the tail room of the receiving buffer before sending the SA or
SSA request on SDP client side.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Create separate memory regions for each OFS register. With a single
region the linker will gap fill the load segment with zeros between
each option setting section that gets placed in the region when
generating the .elf file.
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
The photo included in the documentation for the Nucleo F722ZE is of
poor quality. Replace it with a better photo.
Signed-off-by: Evan Perry Grove <evan@4grove.com>
This commit updates the GDMA register definitions to align with the
specifications of the chip series.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Callbacks now take a result parameter which may, if the callback was
linkd to by a previous submissions, have the result code from the last
submission.
Additionally the userdata is now const by default making it easier to
use the device pointer as the userdata which is very common.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Similar to SPDX-License-Identifier, there is a standard way to add
copyright notices to source code so update the guidelines so that
recommendation is that copyright notices are added using
SPDX-FileCopyrightText.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add power management state validation in dw_dma_get_status() to ensure
the device is in active state before attempting to read DMA status.
Returns -EINVAL if device is not active, preventing potential issues
when accessing hardware registers while device is suspended.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Introduce nordic NRFS SWEXT power domain bindings and add it to
relevant SoC devicetree files.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The Bluetooth BAP Scan Delegator had a minor behavioral change
that may affect a small subset of devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The Scan Delegator has been modified to not set the PA sync state
automatically anymore, so the test needed to be updated.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove lookups in the Scan Delegator that relates to
the advertiser address. The reason for this, is that the
address is not considered a unique value for receive states,
since the address may change over time in the case of (N)RPAs.
Instead we shall rely exclusively on the address type, the sid
and the broadcast ID.
The implementation of the Scan Delegator and Broadcast Sink
has been updated to not use addresses for lookups anymore,
and there has been a minor API modification to set the
PA sync state as part of bt_bap_scan_delegator_add_src
as the higher layers are better suited to handle the
PA Sync state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Use GPIO bitbang using sysfsgpio openocd driver.
- Not using libgpiod driver since it does not support libgpiod v2 and
above, which is what all the debian 13 images ship with.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Validate the `current-sense-amplifier` driver builds when an instance
with `gain-extended-range` exists.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add the option to specify an alternate ADC gain value to use if the
initial measurement saturates the range. This enables higher data
resolutions when the values are small compared to the maximum signal
values, while still supporting the maximum.
As a concrete example, measuring charge currents from a small solar
panel (0 - 50mA), while also supporting high USB charge currents
(up to 1A).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix missing shift values in `sensor_three_axis_data` when performing
one-shot reads on SENSOR_CHAN_ACCEL_XYZ and SENSOR_CHAN_GYRO_XYZ
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
There is a fix that is needed for building on Linux and
running on Windows. Without this fix, the scripts throws
errors and fails because of the '\' instead of '/'. For
portability, the script should not use literal slashes.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
The build output meta data is written to the zephyr.meta
file not zephyr_meta.yml.
This name is defined by KERNEL_META_NAME in cmake/modules/kernel.cmake.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The fact that log data captured with RTT has a header, like the
following, impedes the parser to parse the data properly
```
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SEGGER J-Link V8.24 - Real time terminal output
SEGGER J-Trace PRO V4.0, SN=XXXX
Process: JLinkExe
```
Signed-off-by: Leonardo Bispo <l.bispo@live.com>
Supported receiving more types frames. One was TX timestamp response
frame and the other one is RX timestamped frame which were for switch
port.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
PTP clock may be enabled per Ethernet port. Especially pseudo port for
switch management does not need PTP clock.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added PTP solution in core driver. Now only gPTP was supported.
- ethernet_api like get_capabilities and get_ptp_clock
were supported in port driver.
- For TX timestamp, added new dsa_api port_txtstamp for device
to handle. Device driver might put pkt in queue, and reported
timestamp after completing transmitting on hardware.
- For RX timestamp, the timestamp could be given to pkt in tag
driver or device driver.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Supported tagger data and connecting device to tag protocol, so that some
device specific work could be handled.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Adding basic support for flashing and debugging. Not using the XDS110
debugger, as I have non on hand, but just a J-Link.
Signed-off-by: Fabian Pflug <fabian.pflug@gumulka.eu>
The .bin file is huge (>1GB) and will probably not be used by anyone if
there are much smaller alternatives. Because of that, disable it by
default for this soc. There is also no support for generating the
CRC32 checksum for the ccfg section in the binary.
Signed-off-by: Fabian Pflug <fabian.pflug@gumulka.eu>
As stated in [0] section 9.2 Customer Configuration:
There are four different CRCs used to validate the CCFG data.
One of the CRCs, the user record CRC, is optional and is the
last four bytes of the 128B user record. The data over which
the CRC is calculated starts at “Data Start Offset” from Table
9-2 and ends at the "CRC Offset". CRC field width is 4 bytes.
Meaning the MCU will not start if the CRC fields are not correct.
TI's tools will automagically set these fields, but other tools have to
do it by hand. Therefore a new post-build-command is introduced to set
the fields at least in the .hex file by generating a new _crc32.hex
file.
[0] https://www.ti.com/lit/ug/swcu193a/swcu193a.pdf
Signed-off-by: Fabian Pflug <fabian.pflug@gumulka.eu>
Limited by board design and soc, rt700 sdhc only support 1.8V
output and there is no voltage level translators designed on
board. So sdhc function on rt700 board can't meet SD3.0 compatible.
Remove case as solution.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add maintainers for nordic's IronSide SE.
The IronSide Secure Element provides a root-of-trust and cryptographic
services to nrf54h20 and nrf9280 SoC's.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
According to the LIS2DU12 datasheet (p.30), the device must be
inpower-down mode before executing a software reset.
Entering power-down requires setting the ODR field to 0x000.
This commit adds the missing call to set ODR=0x000 before issuing the
reset. Without this step, the sensor does not recover after a controller
reset and only resumes operation after a full power cycle.
Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
Relocate private reboot function to allow ODR configuration before
execution. This will ensure proper power-down sequence prior to software
reset.
Signed-off-by: Jan Kablitz <jan.kablitz@8tronix.de>
Adds a dependency that causes CMake to re-configure if the input
key files for MCUboot signing/encryption have changed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Remove the build assert checking if net_if_oper_state is of unsigned
type. It's generating warnings with clang, and in fact isn't very
useful.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fixes issue where assigner workflow now fails on issues due to trying
to access a pull_request attribute that doesn't exist on the event.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use two glob patterns for dealing with artifacts that might
be sitting at two different levels depending on whether we
downloaded single or multiple artifacts in "Download Artifacts"
step.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
use bt_a2dp_stream_create_pdu to create the stream pdu net buf, then
application can use the buf->len to check whether the buf's size exceeds
the l2cap mtu.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add the VIRTIO Network device to the driver build_all test on
qemu_x86_64 (PCI) and qemu_cortex_a53 (MMIO). Additionally,
restrict the test to these two platforms, getting rid of qemu_x86,
as enabling networking would cause build errors on many boards,
including the qemu_x86. Use dashes in node names.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Add instructions on running echo_server using the VIRTIO Network device
in the QEMU Ethernet documentation.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Create an overlay and a config file for testing the VIRTIO network device.
Add some instructions to the README.rst file as well.
These can be used with any of the networking subsystem samples.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Add a driver for the VIRTIO Ethernet device.
This is a minimal driver which sets a MAC address and transmits packets,
but does not support any extra features like the control channel or
checksum offloading.
Confirmed to work with the networking subsystem samples. For example, the
zperf sample shows a result of 85 Mbps download and 14 Mbps upload.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Enables bbram driver for motorola, mc146818 under its MFD
to access the RAM of the RTC.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Enabled Motorola, mc146818 MFD, which implements RTC
read/write operations and prevents data corruption
by synchronizing these operations.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
The UDC stack assumes that 'halt' on control endpoints is automatically
cleared by device drivers and never calls udc_ep_clear_halt() for such
endpoints. In practice, most controllers do perform this automatic clear
in hardware, but this requires special handling in udc_ep_set_halt() for
control endpoints (EP0), as setting the 'halted' bit on such endpoints will
lead to the software getting out-of-sync with the hardware.
Update the UDC skeleton driver to handle this edge case and add a comment
documenting the stack's behavior, along with the hardware behavior expected
by the code added to the skeleton driver for it to be functional.
Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Mathieu CHOPLAIN <mathieu.choplain-ext@st.com>
Although not reproducible locally, it has been observed in CI that the
uicr image will not always be the last image to be run.
To ensure it is the last image to be run we have it depend on the
'image' image when defined.
The uicr image is generated based on all other images in the build and
must therefore run last.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Explicitly configure retention mode when powering up HPSRAM banks to
ensure consistent behavior across hardware platforms.
After D3 power state transitions, the retention mode configuration can
become undefined due to hardware reset. This causes test failures in NVL
FPGA testing environment where the hardware strictly enforces retention
mode settings.
The fix ensures retention mode is properly set in two locations:
- sys_mm_drv_hpsram_pwr(): Configure retention mode for all bank
power-up operations
- adsp_mm_restore_context(): Explicitly set retention mode during
D3->D0 restore sequence after each bank is powered up
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Remove hp_sram_init() call from boot_d3_restore() as it's redundant and
causes TLB access errors. The TLB driver's adsp_mm_restore_context()
already handles all HPSRAM power management and content restoration.
The removed code was attempting to zero memory regions that are
intentionally unmapped by the TLB driver for power optimization, causing
access to disabled TLB entries during D3→D0 transitions.
Additionally, hp_sram_init() powers up all memory banks while the TLB
restore function correctly enables only the banks that were actually
used, maintaining proper power optimization.
Current flow causes errors in simulation which revealed this incorrect
double initialization in test scenarios with minimal firmware
configurations.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Disconnect the L2CAP connection when fails on sending an error response
(unit info, subunit info, or passthrough).
Signed-off-by: Make Shi <make.shi@nxp.com>
Add a new callback to support the situation when a Pass Through command
is received, and add an API to respond to the Pass Through command.
Signed-off-by: Make Shi <make.shi@nxp.com>
Add a new callback to support the situation when a subunit info command
is received, and add an API to respond to the subunit info command.
Signed-off-by: Make Shi <make.shi@nxp.com>
- Implemented fragmented packet handling for AVCTP protocol
- Refactored AVCTP header structure to support multiple packet types
- Enhanced AVCTP send logic with packet segmentation support
- Updated AVRCP integration to support new AVCTP fragmented flow
Signed-off-by: Make Shi <make.shi@nxp.com>
Release engineers do not need and do not have admin rights.
Let's just fix this table removing that cross.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Combine the load and noload cache regions for a single MPU aligned block.
This is required to have an MPU region with a size that is a power of 2.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Bit 8 of AHB3 is reserved, there is no clock-enable bit for the flash
controller according to the Reference Manual.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
This sets the run factor for Intel audio DSP simulators to zero.
The simulator is pretty much serialized so SMP switching torture
does not really test concurrent operations, and they are taking
too much time causing timeouts on CI. So sets the run factor to
zero to disable the switch torture test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reduce the sleep time in the torture test for Intel audio DSP
simulator. The current amount of time makes this test to take
a long long time to finish causing problems on CI.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The new I-RAM and D-RAM layout for pb2 m4 is not compatible with
devnull. So do not have the tests for pb2.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
The M4F allows concurrent fetch for instruction code and data via dedicated
buses (I-Code and D-Code, respectively).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
The MCU_M4FSS has a total of 256KB of SRAM divided into two banks: 192KB
of I-RAM, and 64KB of D-RAM. The I-RAM memory is intended mainly for M4F’s
instruction code, and D-RAM for M4F’s data. The M4F allows
concurrent fetch for instruction code and data via dedicated buses (I-Code
and D-Code, respectively).
The MCU_M4FSS supports unified memory for both banks (I-RAM and D-RAM),
which means instruction code and data can be placed in any bank. Since CM4
converts unaligned accesses into word-aligned accesses internally, cross
RAM access also work fine in unified memory mode.
By having a single parent node for SRAM, we allow both operating modes,
i.e. separate I-RAM and D-RAM and unified SRAM easily.
Also fixed the incorrect D-RAM address.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
This feature enables sharing of built applications between test
scenarios, allowing tests to access build artifacts from other
applications.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The SAMC21 has a different revision of the DAC peripheral.
This change adds an ifdef to handle the changed SYNCBUSY register.
Signed-off-by: Stefan Giroux <stefan.g@feniex.com>
added logic to determine the direction of USB transfers for non-setup
packets using the endpoint direction. This ensures proper handling of
USB_IN and USB_OUT directions.
Signed-off-by: Richard Yim <richardyim@ami.com>
Add missing const on `struct rtio_iodev *iodev`
The blocking version, sensor_read(), as well as
rtio_sqe_prep_read_with_pool() which accepts
struct rtio_iodev are both marked as const.
This function should also be marked const.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The `qemu_cortex_m0/nrf51822` platform only has 16 kiB of RAM. However,
`qemu_cortex_m0` is listed as one of the integration platforms for this
testsuite and the `newlib` test configuration listed a `min_ram` of 24.
Decrease the minimum ram for that platform (universally) down to 16 kiB
so that all of the test configurations can run, thus avoiding the false
positive error condition in twister.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A warning was promoted to error in twister runs due to implicit
declaration of the function `z_arm64_safe_exception_stack_init()`.
Include `kernel_arch_func.h` in `prep_c.c` to mitigate the warning.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add overlay for kv260_r5 board in i2c_target_api test case.
For running this test, I2C0 and I2C1 are to be connected on same bus.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
The timer is enabled before comparison value is set, which can lead to
unexpected behavior if the registers contain uninitialized values.
Should call arm_arch_timer_enable() after arm_arch_timer_set_compare().
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Add a config `CONFIG_TEST_MSGQ_PUT_FRONT` in mesgq_test to
enable message queue put front feature.
Also, add `test_msgq_pending` to test message queue behavior when
the caller is going to put and put front.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
When the buffer is full, Thread A gets pended (blocked).
If Thread B later calls the get function, it will unpend Thread A,
allowing it to resume and put the message into the queue.
In this situation, we need to know whether Thread A should
continue with put to front or put to end.
In order to resolve this issue, we don't allow set timeout
parameter for `k_msgq_put_front` and this parameter is always
`K_NO_WAIT`.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Without this change, running the test for hifive1/fe310_g000 fails when
trying to allocate space for env variables, with `heap size is too
small`.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
The PackageName, PackageVersionand and PackageSupplier in the generated
SBOM will be updated based on the information passed in the
external-references in the module.yml.
This way packages are better recognized by vulnerability scanning tools
like cve-bin-tool.
Signed-off-by: Rico van Dongen <rdongen@ziggo.nl>
Plan to restructure eth_stm32_hal into two files, eth_stm32_v1
and eth_stm32_v2, while retaining the git history of v2.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Split the codes of v1 and v2.
V1 supports F1/F2, while v2 supports F4/F7/H5/H7/N6.
This makes it easier to understand and add new functions.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
- Add calls to sys_trace_idle_exit before leaving idle state
to track CPU load
- Extend CPU_LOAD to CPU_CORTEX_A in Kconfig
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
This fixes writes to the flash, and causes the following sample
code to work again: samples/drivers/spi_flash
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Initialize the privilege stack and switch PSP to it early in the SVC
handler to ensure `z_arm_do_syscall` does not start on a user-accessible
stack frame.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
`west build` does not build the `empty_cpu0` application making
`west build -b mps2/an521/cpu1 -t run` fail because of the missing
empty_cpu0's binary.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Introduce a test to overwrite the return address in the exception
stack frame of a lower-priority thread performing an SVC call.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Often the thread k_tid_t value is not referenced for
self-standing threads, and should therefore be allowed
to remain unused.
Signed-off-by: Jaagup Averin <jaagup.averin@gmail.com>
-Wno-volatile is set by gcc/compiler_flags.cmake,
but is not supported by clang and generated warnings.
Signed-off-by: Jaagup Averin <jaagup.averin@gmail.com>
Since this overrides values from gcc/compiler_flags.cmake,
they should ideally have the same structure and order.
Signed-off-by: Jaagup Averin <jaagup.averin@gmail.com>
This forces a build to fail should it select a symbol that cannot
be selected (if the prerequisites cannot be met) instead of
silently ignoring it and allowing an invalid build to complete
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Similarly to #95242, Twister attempts to run this test on HiFive1,
failing with `heap size is too small` on allocation attempt.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Adds initial SoC-level support for the Microchip
PIC32CM JH series, including SoC definition files.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Adds common and SoC-specific .dtsi files for the Microchip
PIC32CM JH family. These files define core peripherals,
address maps, and interrupt controller structure shared
across the PIC32CM JH variants.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
update west.yml for pic32cm_jh family DFP and extended with
a new Kconfig symbol for PIC32C support.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
If we have allocated a TCP connection, and if after that
we get an error like EADDRINUSE, then we must de-allocate
the TCP connection otherwise there is a buffer leak.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
API changes should be in the migration guide, release notes has
everything else, that is deprecated, removed and new. Add a note to
reflect that and avoid confusion.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
- Fix STM32F429II packaging information
- Fix blinky's outcome description when flashing the board
- Refactor the `flashing` section, including supported runners
Signed-off-by: Felipe Torrezan <felipe.torrezan@iar.com>
for test machine without display, need support open-cv-headless mode.
1. support headless mode
2. add parser for environment path
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
When building with high optimization level, the compiler thinks
duration may be used initialized and warns as much.
Let's initialize this variable always to ensure it does not happen
and with it pacify the compiler.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we install a fully pinned west version, including requiring
hashes for all dependencies.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Process is too general, make this more direct and visible in PRs.
Also add related script to the area.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The board support file `scobc-a1.cfg` contained a typo in the
default interface comment.
"Default CMIS-DAP" → "Default CMSIS-DAP"
This fixes the spelling of CMSIS-DAP to match the actual
debug interface.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add .overlay and .conf files for Renesas RA boards to enable
ztest for the DMA driver in:
- tests/drivers/dma/chan_blen_transfer
- tests/drivers/dma/loop_transfer
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add support for the Renesas RA Direct Memory Access Controller,
including driver source files, Kconfig options, and DTS bindings.
- Add initial implementation of the RA DMAC driver
- Add dedicated Kconfig and CMake integration
- Provide Devicetree bindings for the RA DMAC
- Update module Kconfig to include the new driver
This enables DMA functionality on Renesas RA series MCUs.
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Parse manifest for changes and set assignees for any manifest entries
that have changed.
Other changes:
- Do not assign to meta area when additional areas are being changed
- Cleanup of unused code
- Comment where comments are needed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
requests < 2.32.4 is subject to GHSA-9hjg-9r4m-mvj7
pyyaml < 5.4 is subject to GHSA-8q59-q68h-6hv4
pyyaml < 5.1 is subject to GHSA-rprw-h62v-c2w7
protobuf < 5.29.5 is subject to GHSA-8qvm-5x2c-j2w7
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Dependabot automatic pull requests keep wanting to downgrade Sphinx to
8.1.3 so do a manual update of the pinned requirements.txt file that
does not do that (and yet pulls up-to-date versions of the other
dependencies) until we figure out what is wrong.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
MAX32 UART's "almost empty" fires when the FIFO gets down to one byte, but
when sending just one byte, no interrupt is raised, resulting in stalled
TX. Use a timer to ensure the ISR is invoked and TX processing continues in
that scenario.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add a specific interrupt API test, that tests sending different size
payloads with the interrupt API to try to catch edge cases.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The help message for the option '-d'/'--instal-dir' of 'west sdk
install' incorrectly use '-b' in its help message.
Fix the typo by using '-d'.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Some applications need to throttle RRAM writes to handle peak current
management.
Add CONFIG_NRF_RRAM_THROTTLING_DATA_BLOCK which defines the maximum
chunk length that can be written at once.
Add CONFIG_NRF_RRAM_THROTTLING_DELAY which configures the sleep delay in
microseconds after each write.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
Add stm32l083xx SoC variants that are similar to stm32l073xx with an added
AES accelerator.
Signed-off-by: Marek Maškarinec <marek.maskarinec@hardwario.com>
The websocket used mbedtls functions to calculate the
SHA1 needed. Update the code to use PSA crypto calls instead
when the configuration CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT
is enabled.
This can be useful for applications which use TF-M
since it only provides PSA crypto APIs.
Also check the error code from the mbedtls_sha1
call since it can fail and it was not checked before.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
The jedec-id cannot be read after flash device is set to octal mode.
Fixed by moving the jedec-id comparison to
flash_flexspi_nor_check_jedec() which already reads the jedec-id when
flash device is still in single spi mode.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
This adjust the MAC CONFIGURATION register settings to 10MBit/s if needed.
The reduction is needed for 10MBit only PHYs.
Signed-off-by: Adib Taraben <theadib@gmail.com>
Forward get/set selection to the camera source and update the driver's
video_format on set so buffer sizing and streaming follow the selected
region.
Signed-off-by: Armin Kessler <ake@espros.com>
Change hardware cycle count (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC) to 594
MHz. Move that value to the SoC layer's DT.
Validated with the amp_blinky example - the period of the blinking LED
is exactly 2 seconds, like was programmed.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add I2C_TARGET_ALLOW_POWER_SAVING config. Enable this config makes I2C
target device can enter Doze/Deep doze states while the bus is idle.
Ongoing transfers will block low-power entry until they are completed,
ensuring correct communication while still reducing overall power
consumption.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Move bss and noinit sections to the end to reduce
binary size., as they will only be removed when they
are at the end.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Loads this file in a better way that means samples and modules
should not have to source the file before referencing Kconfig
module path variables
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
DSA is part of Ethernet and will utilize more Ethernet definitions for
more features support. So, it's proper to let DSA header include
Ethernet header with moving some DSA definiton from DSA header to
Ethernet header and adding DSA header including in c files using DSA
definition.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
When we reconnect to a bonded device we always attempted to
send the changed PACS notifications, regardless of
whether the remote device has subscribed to them or not.
This resulted in a lot of failed attempts to send
notifications when
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION is enabled (which it is
by default).
Ideally we would not set the flags for devices that have not
subscribed, but since we cannot call bt_gatt_is_subscribed for
non-connected devices, we need to do this when the notify_cb
is called.
It would be possible to use BT_GATT_CCC_MANAGED instead
of BT_AUDIO_CCC to keep track of the writes for each client,
but that would be a minor optimization which would require
significant rework and additions to PACS. The current
solution is inspired by the implementation used in has.c
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
remove unneeded soft irq, as disabeled irqs
will still be registered, but just not propagated
to the cpu until it is enabled again.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Remove LCOV_EXCL_STOP flag as LCOV_EXCL_START was removed in a previous
commit. This causes a gcov compilation error.
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
Once running, a socket service could not be reconfigured (i.e. changing
file descriptors and/or events to be polled). This was due to an wrong
check at the end of the thread main loop of socket_service_thread that
evaluated to false as variable ret is zero if trigger_work(), which is
called previously for all returned events, returns successfully.
Signed-off-by: Philipp Finke <philipp_finke@gmx.de>
Add dts for stm32c051.
STM32C051 is just an STM32c071 w/o USB and different memory configuration.
Therefore STM32C091 can directly include STM32C051 and no longer needs
to delete the usb nodes.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
I manually checked the errata sheets for all STM32Hxx/STM32Uxx parts to
confirm the defect's presence or absence. It appears to have been resolved
in silicon on newer parts (e.g., STM32U3xx family), so hopefully this test
will not need grow further (knock on wood).
Co-authored-by: Nicolas Zuluaga <nicolas.zuluaga@rbr-global.com>
Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
Define BT_AVDTP_SIGNAL_SDU_MAX Kconfig item to limit the max avdtp signal
SDU size, then use avdtp self defined net buf pool to prepare data. Use
default acl_tx_pool pool do to the fragmentation.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Run GDB in batch mode when using RTT, so that pagination is never
enabled. This fixes RTT support when using terminals with a very small
row count.
Fixes#92417
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
The builtin functions __atomic_compare_exchange_* are missing when
CONFIG_ATOMIC_OPERATIONS_C is set. Add them and verify they build/work
as expected.
Signed-off-by: Yuval Peress <peress@google.com>
In USB "in" refers to data going from device to host,
and "out" refers to data going from host to device.
From a BT perspective "usb_out" then refers to the data
we receive from the host, to be sent over BT, so the "out"
terminology still works for that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In USB "in" refers to data going from device to host,
and "out" refers to data going from host to device.
From a BT perspective "usb_in" then refers to the data
we send from the device to the host, that has been received
over BT.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In USB "in" refers to data going from device to host,
and "out" refers to data going from host to device.
From a BT perspective "usb_out" then refers to the data
we receive from the host, to be sent over BT, so the "out"
terminology still works for that, and vice versa for
incoming BT data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Ensure sw_isr_common, dynamic_isr, and init routines are executed from IRAM
by relocating libarch__common.a section.
Running these from flash prevents the board from booting properly, as flash
access is not available during early initialization.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
- use harness console (instead of default ztest)
- use platform_allow to limit build execution scope
(actually, there is also shield needed)
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
When an IPv4 packet is received on a dual-stack socket, return
the mapped v4 to v6 address as source address.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fixed issue when `sendmsg()` was in use and `CONFIG_NET_IPV6`
and `CONFIG_NET_IPV4_MAPPING_TO_IPV6` were in use, as `dst_addr`
argument of `context_sendto()` was passed NULL,
but also used to determine `sa_family`.
Use msghdr, if available, to determine if v4 to v6 mapping is
present.
Also set `dst_addr` to unmapped value when v4 to v6 mapping is
used.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
If v4 to v6 mapping is used, cmsg_level and cmsg_type should
be compared with IPv6 values even if pkt family if AF_INET.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Ensure the Port driver is built unconditionally for S32K1 targets, aligning
with the approach already used for Kinetis in mcux-sdk-ng's drivers.cmake.
Fixes#94848
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Update ethosu_flush_dcache() and ethosu_invalidate_dcache() to accept
base_addr and base_addr_size arrays, with num_base_addr as the element
count, as required by the new Ethos-U driver. Add (uintptr_t) casts to
support 32-bit targets.
Signed-off-by: Johan Alfvén <johan.alfven@arm.com>
Some devices supported by this driver do not have a write-block-size
of 1 such as the mt35xu01gbba. This value is assigned in the dts and can
be used instead.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Counter RTC driver is written using the counter API as a
target instead of a hardware. It can adapt to all RTC
device without broken-down time register but with counter.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Commit removes `Wrong state` warning from some DFU API.
This information has value only for debugging.
No any value for application to generate warning
on the regular basis.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
k_thread_absolute_deadline_set is simiar to existing
k_thread_deadline_set. Diffrence is that k_thread_deadline_set
takes a deadline as a time delta from the current time,
k_thread_absolute_deadline_set is expecting a timestamp
in the same units used by k_cycle_get_32().
This allows to calculate deadlines for several thread and
set them in deterministic way, using a common timestamp as
a "now" time base.
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
The ws2812_spi driver supports both a fast path for 8-bit symbols and
a generic path for other sizes.
This change introduces a devicetree-based, build-time check to
determine if all enabled instances use 8-bit symbols. If so, the
generic path logic is removed from the build.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Add support for NV12/NV21, NV16/NV61 and YUV420/YVU420
(semi)planar formats which can be output by the main #1 pipe.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
ISP is part of the pixel pipes hence it doesn't make any sense to
try to call ISP external handlers if the DCMIPP doesn't have pixel
pipes available.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The maximum frequencies for SYSCLK, AHB and APB bus have changed since
the first issue of the datasheet. Setting values according to the up-
to-date datasheet.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Broadcast ID is 24bits and uinitialized broadcast_id resulted in
(pseudo) random failures since only 3 bytes were set by call to
bt_rand().
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Add FPU power management for suspend to RAM procedures.
Add FPU save/restore procedures when `FPU_SHARING` feature
is disabled.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add overlay files for testing the VIRTIO Console device with
this sample along with a section in the README.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Add the VIRTIO Console to the driver build test on qemu_x86_64 (PCI)
and qemu_cortex_a53 (MMIO).
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Replace the default serial device with a virtconsole if it
is configured in the devicetree. Because of the way -nographic
works, -serial none and -monitor none had to be added as well.
Tested with west build -t run and west build -t debugserver_qemu.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Add a UART driver for the VIRTIO console device.
This driver has support for both polling- and interrupt-based i/o,
as well as interacting with up to 32 console ports (disabled by
default). Based on the Xen HVC driver.
Tested with the console subsystem sample programs. Aside from
enabling CONFIG_PCIE, setting CONFIG_HEAP_MEM_POOL_SIZE to a
high enough value (for example 100000) is necessary -- as is done
in the virtiofs sample.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
This fixes:
* if-statements that check whether a given bit lies within
specification-defined ranges
* a behavior in virtio_pci.c -- where it would read feature bits
from the device and write them back whenever the user tried to
set their own -- which led to bugs
* struct virtio_pci_common_cfg, adding two new fields, bringing
it in line with the specification; the entire struct definition
was reformatted as following the existing style would trigger
warnings
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Use DIV_ROUND_UP to ensure listen_interval is rounded up instead of
being truncated during division by the beacon interval.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Print TCP connection pointer value for debug prints
consistently so that it is easier to find debug prints that
are related to a certain TCP connection.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
In the Japan regulatory domain, channel 14 is restricted to
802.11b/g operation and does not support HT (802.11n) capabilities.
Disable HT capabilities when operating on channel 14 in AP mode.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Fix stm32 XSPI driver to restore the bus command concurrent access
protection that was mistakenly removed on memory mapping operation
by commit e5620e07c9 ("drivers: flash: stm32 xspi flash read with
memcopy when executing").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Improve FPU trap debugging by showing the program counter (PC) of
instructions that trigger FPU access traps instead of potentially
stale saved FPU context data.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Since CONFIG_PM_STATS has been selected at the soc layer,
there is no need to reconfigure it in the test
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
- Add ``R_BSP_SecondaryCoreStart`` for the primary core to start
the secondary core
- Disable ``clock_init`` for the secondary core
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Add support for clock subsystem configuration and pinctrl in the
DesignWare I3C driver to enable proper clock control and pin
management on platforms that require them.
Changes include:
- Add clock_subsys field to dw_i3c_config structure.
- Update clock_control_get_rate() and clock_control_on() calls to use
the configured clock subsystem instead of NULL.
- Use COND_CODE_1 with DT_INST_PHA_HAS_CELL to conditionally extract
clock subsystem ID from devicetree, providing backward compatibility
for platforms without clkid cell.
- Include pinctrl-device.yaml in devicetree binding to enable pinctrl
support for platforms that need pin configuration.
- Gracefully fallback to NULL behavior when clkid is not specified.
This follows the same pattern used by other I3C drivers (mcux, renesas_ra)
and enables proper clock management for SoCs that require clock subsystem
identifiers while maintaining compatibility with existing devicetree
configurations.
Signed-off-by: Shreehari HK <shreehari.hk@alifsemi.com>
The I2C target implementation for i2c_dw does not follow the
zephyr target specification. The following three issues are corrected:
1) The read_requested CB is called on every byte of the transaction
- it must be called only on the first byte of the transaction
2) The read_processed CB is called on every byte of the transaction
- it must be called only on bytes following the first byte
3) Bytes returned in the data ptr param of read_processed are not
sent to the controller
-These bytes must be sent to the controller
Signed-off-by: James Growden <jgrowden@tenstorrent.com>
CONFIG_FLASH_SIZE and CONFIG_FLASH_BASE_ADDRESS symbols were not defined in
native_sim even though it has a flash controller and flash defined.
Signed-off-by: Flavio Ceolin <flavio@hubble.com>
Use DRAM region 1 as the default spill area for the `.noinit`
section if appcpu is not present
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Extra Zephyr modules can be provided via the EXTRA_ZEPHYR_MODULES CMake
list variable. Previously, if this variable were set in multiple places
(e.g. local CMake variable, cache variable set via -D, environment
variable), Zephyr will pick one source based on zephyr_get's documented
hierarchy and ignore the others.
Add the MERGE keyword when EXTRA_ZEPHYR_MODULES is read so that the list
of Zephyr modules is merged from all sources if this variable is set in
multiple places.
An example where this can be useful is when integrating additional Zephyr
modules with a vendor's Zephyr-based application whose build system already
contains usage of EXTRA_ZEPHYR_MODULES.
Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
This board is actually meant to be used as a debug probe and has
dedicated connectors for DP and target UART, add an overlay to make both
work on the dap sample.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This is a follow-up to commit cafa288197.
Bit masks should use the bitwise OR operator, not the logical one...
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix SHA256 verification failures on Windows by ensuring consistent
line ending handling in patch files. Replace inline hash calculation
with existing get_file_sha256sum() function and modify it to read
files as text with normalized line endings before encoding to UTF-8
for hashing.
This ensures cross-platform compatibility and prevents patch
integrity check failures due to CRLF/LF differences between
operating systems.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
add range of cpu power states (run/sleep, stop and standby) for MSPM0
series. add exit latencies ranging from 1.5-15.7µs and minimum
residency times of 5-10ms for optimal power management transitions.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
The fast wake feature in the MSPM0 GPIO peripheral allows the GPIO module
to stay in a low-power state and detect interrupt events on the device pins
without requiring a high-speed clock. This allows the device to support
fast wakeup from low-power modes, such as STOP and STANDBY, on any GPIO
pin.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
add support for SHUTDOWN operating mode in TI MSPM0 series for power-off
operation. Uses HWINFO for reset cause detection to handle shutdown IO
release on low power wakeup.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
TI MSPM0 series supports range of power modes (RUN/SLEEP, STOP, STANDBY)
supporting low power operations. Provides automatic restoration to
RUN mode on wakeup from any low power state.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Update hal_ti to include input-enable property for all UART RX pins.
Without the input-enable property, UART reception does not function
correctly when the SoC enters low-power mode. Adding this property
ensures reliable UART operation in all power states.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Add support for custom NRFX_DIR for Sysbuild builds by checking if
NRFX_DIR has been defined in Sysbuild.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
This helps to circumvent issues in current BAP implementation when
multiple streams are present. Also puts RX path in line with
configuration of TX path.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Extend vpr_launcher and device tree bindings to support configuring
the DMA secure attribute.
Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
Other targets that define this symbol do it in the Kconfig file, and
gate it with a SOC_ model or series symbol. Defining a default in the
Kconfig.soc instead applies it on every build, which is not desired.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add support for halting the Radio core immediately after reset. This
ensures that a debugger can attach and take control from the very
first instruction.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
PM on the nrf54h20 has minimal utility if power domains and devices
are not managed at runtime, as these prevent the soc from entering
sleep states in the first place. Enable PM_DEVICE by default if PM,
which in turn enables PM_DEVICE_RUNTIME for devices and power
domains.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Remove wakeup trigger from Series 2 boards. The implementation
seems to configure a GPIO to be driven low on boot, which has
nothing to do with wakeup. In order to actually configure a
wakeup GPIO, the GPIO_INT_WAKEUP flag would need to be used when
registering an interrupt on the pin. However, this should not
be the responsibility of the board. It is an application
concern, so remove it from the boards.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Use both cores for Zephyr by default. I did enable SMP, however forgot
to enable PSCI to turn on the other cores in the initial PR.
Tested with samples: `tests/arch/arm64/arm64_psci/` and
`samples/arch/smp/pi`
Requires [0].
[0]: https://github.com/zephyrproject-rtos/zephyr/pull/95325
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Print return code on error and remove logging in `sntp_resync_handler`
since it calls `net_init_clock_via_sntp` which already does logging.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add test case where TDM is tested with 8 channels,
32 bit word size and 48k sample rate.
Add Kconfig that enables test skip if the driver supports
8 channels but fails in this configuration.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Expand the test case for RTIO_OP_AWAIT to also cover the relaxed variant
where just the SQE chain is paused until completion, and the rtio_iodev
can serve unrelated SQEs meanwhile.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Allow the rtio executor to handle the RTIO_OP_AWAIT for cases where no
rtio_iodev needs to be blocked while waiting for the signal.
When the RTIO_OP_AWAIT was introduced, the highlighted usecase was
performing transactions within an exact time window. This can be
achieved by blocking the rtio_iodev, effectively locking the bus, while
awaiting.
However, a relaxed implementation which doesn't block any rtio_iodev is
really useful for device drivers that use some kind of ready-event
during transactions. For example in order to read configuration out of
a sensor, the following flow may be required:
1. Write some cmd like "read accelerometer scale"
2. Await data-ready GPIO rising edge (might take "a long time")
3. Read the requested data payload from the sensor
Using a relaxed variant of the RTIO_OP_AWAIT this can be elegantly put
together in a single chained rtio sequence. And by not blocking the
rtio_iodev, other devices can be operated during the await period.
Of course, not blocking the rtio_iodev also means that the bus may be
busy when the RTIO_OP_AWAIT completes and thus, step 3 may be blocked
for a some time and the guarantee of an exact time window cannot be
achieved with the relaxed variant.
To make the API clearer, separate helpers are added for the strict
(blocking iodev) and relaxed (blocking only the sqe chain) variant
respectively.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
* Adds overlay files for tests/drivers/pwm/pwm_api and
tests/drivers/pwm/pwm_gpio_loopback to run these tests on the
cyw920829 board.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
* Updates the overlay files for samples/basic/blinky_pwm and
samples/basic/fade_led to run on the cyw920829m2_evk board.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
This change makes improvements and bug fixes for the Infineon PWM
driver. These include:
* Removes hard coded register addresss from driver.
* Addresses issues causing pwm_api and pwm_gpio_loopback tests to
fail, as well as functional failures.
* Restructures device tree file to better represent the hardware
architecture of the tcpwm module.
* Allows configuration of hardware behavior when PWM is disabled.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
* Changes driver naming to reflect hardware IP being used (TCPWM)
instead of referencing cat1. Cat1 is an internal infineon
reference which has little meaning to users and is being phased
phased out.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
This commit introduces the FoBE Quill nRF52840 Mesh board configuration,
including device tree files, Kconfig settings, and necessary
documentation. It also adds GPIO header definitions
and updates vendor prefixes for proper identification.
Signed-off-by: Chiho Sin <chihosin@icloud.com>
In the previous PR I moved configuring the child supervision
and timeout to the function that is also used in radio
co-processor firmware that does not include APIs for setting
these values.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Make sure that the DNS cache tests have enough stack size for
each ztest thread so increase the stack to 1280 bytes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Lower the number of test cases that are run to speed up CI.
There is no need to test so many combinations.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
PR 84355 introduced configuring the child supervision and
the MLE timeout in openthread_start() (later replaced with
openthread_run()), but that function is only called when
the manual start is not used.
Nothing prevents configuring these settings earlier, in
openthread_init(), which is executed even if OT autostart
is disabled.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Add config options required for storing certificates in protected
storage, and to free up space of ROM to accommodate the additional
features that are enabled for TFM.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Add AES-only cipher certificates. Useful for systems which
have only AES support and DES is not enabled.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
With NRF security, higher heap requirement is seen for operating
with RSA-3072 based certificates. Add a NRF SoC specific conf in
snippets to handle this.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Add image properties data structure to Series 2 binaries.
This data structure is used by the SE or bootloader to enforce
secure boot, and by other tools to extract image information.
Use the app version if set, or fall back to the kernel version
for the image version field. Set image type based on Kconfig
options.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The bt_bap_unicast_client_qos function was recently
modified to check for presentation delay, however it did
not consider that a unicast group may contain streams that
are not configured, and thus do not have endpoints.
Add a stream->ep != NULL check to only consider configured
streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
List the file size helps in developer debugging experience. Provide
a config to disable new behavior in case any users depended on
command output to be a list.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
improve kconfig help and make clear, that
MCUBOOT_GENERATE_UNSIGNED_IMAGE
will not lead to imgtool being used.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
flush pending irq before enableing the irq.
In the litex soc, if an irq is not enabled, it will
it can still be registered and will be pending
if it occurs, it will just not be send to the cpu
until the irq is enabled.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
It is no longer needed to specify the read command parameters in dts,
as the flash driver is capable of obtaining those from SFDP structures,
so the redundant properties are removed.
After commit 612fd940fa got merged, both
the EXMIF and flash nodes in dts are not enabled by default so this
needs to be done in the overlay.
Although nrfutil is still not capable of programming the external
flash on nRF54H20 DK, thus `west flash` will not work in this case,
`nrf54h20dk/nrf54h20/cpuapp` is added as an allowed platform so that
the sample is at least built in CI for it.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When Octal IO mode is to be used with DDR in mx25u family chips,
bit 1 instead of 0 must be set in the Configuration Register 2 at
address 0.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add support for supplying power to the flash chip by activation of
a GPIO specified through the "supply-gpios" property. Implementation
of gpio_reset() is also slightly modified so that it is consistent
with soft_reset() and the new power_supply() and so that all these
functions can use a common routine that performs a reset recovery
delay.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Using a GPIO reset for a flash chip that has a dual function pin
(RESET# or SIO3) and is to be used in Quad mode is rather a bad idea
and so is clearing of the Quad Enable bit at every initialization
of the flash driver, since this bit is usually non-volatile, so such
operation means unnecessary wearing of the flash chip. Soft Reset
should be use instead in such case.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add implementation of the most common Soft Reset routine (sequence of
reset enable instruction 0x66 and reset instruction 0x99).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Complete implementation of quad_enable_set() by adding support for all
possible Quad Enable Requirements (QER) as specified by the SFDP JEDEC
standard (JESD216). Add also corresponding octal_enable_set() to handle
Octal Enable Requirements.
Also remove initial waiting from mxicy_mx25r_post_switch_mode() which
became unneeded, as now such waiting is done in cmd_wrsr() which is
called at the end of quad_enable_set().
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- Use standard operation codes and parameters from SFDP for handling
the used flash commands (allow to override some of them through dts
with the `read-command`, `write-command`, and `rx-dummy` properties)
- Use all available erase types as specified by SFDP
- Allow using all IO modes
- Add support for switching to 4-byte addressing mode
- Use common functions for reading and writing of status registers
and for enabling write operations
- Switch IO mode (between the target one and Single IO) in a common
function that performs transfers and do it only when required for
a given command
- Make checking of JEDEC ID at initialization optional
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Get parameters for used flash commands and requirements for enabling
Quad and Octal modes from dts uint8-arrays containing data read from
SFDP tables for particular flash chips.
Also introduce `pre_init` quirk that allows alteration of the above
parameters or complementation of them in a specific way for particular
flash chip families.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use the l2_processed-flag to decide whether a network packet needs to be
processed by an L2-handler. This could be used in the future to requeue
packets for later processing by a different traffic class queue.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
There is an issue found that the L2CAP BR channel attempts to send
signaling commands through fixed channel when the ACL connect is
broken. At this time, the ACL connect of fixed channel is invalid.
Then the `__assert` occurs in function `bt_conn_ref()`.
Fixed the issue by checking the ACL conn of the L2CAP channel before
sending the data.
Here is a referred fault case for this changes,
There are two connected L2CAP Channels. The first one is primary
connection of the profile. And the second one is secondary connection
of the profile. When the primary connection is broken, the secondary
connection should also be disconnected.
In normal case, if the primary connection is disconnected by calling
L2CAP channel disconnection function, the secondary connection will
be disconnected by calling L2CAP channel disconnection in the
disconnected callback of primary connection.
But there is a corner case is that, the ACL connection is broken.
When the disconnected callback of primary connection is called, the
function call of L2CAP channel disconnection for secondary connection
will be asserted. Because the signaling channel (fixed channel ID
0x01) is disconnected and the `chan->conn` of the fixed channel is
NULL in this time.
The call stack is,
o bt_conn_ref() -> Asserted in this function.
o bt_conn_data_ready() -> The parameter is `br_chan->chan.conn`.
It is the NULL.
o raise_data_ready() -> The parameter `br_chan` is fixed channel.
o bt_l2cap_br_send_cb() -> The parameter is ACL conn and CID of fixed
channel (cid = 0x01). The channel can be found, but `chan->conn` is
NULL.
o l2cap_br_chan_send_req()
o bt_l2cap_br_chan_disconnect()
o bt_l2cap_chan_disconnect() -> The parameter is the channel of
secondary connection. The state of secondary channel is connected,
because the stack is handling the primary channel disconnecting.
And the function is called in disconnected callback of primary
channel.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Define a video device for each pipe instead for the main dcmipp device
since the pipe is the device that communicates with application
(zephyr,camera chosen node), not the dcmipp device.
This helps to enable camera controls as well.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The pipe nodes are not video interfaces. Describe them as normal child
nodes instead of using port/endpoint.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The test was supposed to disable the default enabled
CONFIG_WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES instead of enabling it.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Drop the success check for completed workflow so that the job does not
wait forever for workflows that have failed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Newlib does not seem to define a number of mandatory POSIX limits
(e.g. minimum values).
Include Zephyr's POSIX definitions in an override of Newlib's limits.h
(when the appropriate application conformance macro is provided).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Rather than duplicating limit logic in several places, de-duplicate it
and centralize preprocessor checks in posix_limits.h .
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Update the green LED pin from PA5 to PB0 in the device tree, based on the
default solder bridge configuration in the NUCLEO-H755ZI-Q user manual.
Signed-off-by: Duc Le <levietduc0712@gmail.com>
Add two optional arguments to shell commands `sdp_client sa_discovery`
and `sdp_client ssa_discovery`.
The first argument is the beginning of the attribute ID.
The second argument is the ending of the attribute ID. If the second
argument is omitted, the ending of the attribute ID is 0xffff.
Add test case `test_sdp_ssa_discover_multiple_records_with_range` to
test the ssa request with attribute ID list.
Add test case `test_sdp_sa_discover_multiple_records_with_range` to
test the sa request with attribute ID list.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the ATTR ID list is set with fixed value
(0x0000, 0xffff). For the case that responding a lot of SDP record
data, the responded data cannot be processed properly due to the
receiving buffer size limitation. In this case, the ATTR ID list can
be used to reduce the length of the responding data. In this way, it
will help reduce the SDP's requirement for receiving data buffer size.
Add the attribute ID list configuration to the SDP discovery request
structure `struct bt_sdp_discover_params`.
If the `struct bt_sdp_discover_params::ids` is NULL, or
`struct bt_sdp_discover_params::ids::count` is 0, the default range
(0x0000, 0xffff) is used.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, if the response total data length is more
than the receiving buffer size, the request cannot be completed
properly.
Improve the SDP client with the following changes,
o Notify the received completed SDP records if the case occurs, and
then start the continuing SDP discovery,
o Stop the SDP discovery if the hold SDP record cannot be saved to the
receiving buffer,
o Stop the SDP discovery if the `BT_SDP_DISCOVER_UUID_STOP` is
returned by upper layer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, after parsing the received service search
pattern and all matched SDP records are saved in the local variable
`matching_recs`. The max count of SDP records within its SDP
database that match the given service search pattern is
BT_SDP_MAX_SERVICES when parsing the received Service Search Pattern.
And it causes the max count registered SDP records is limited to
BT_SDP_MAX_SERVICES.
Refactor the parsing of service search pattern to remove the
limitation with the following steps.
1. Save the service search pattern to a simple buffer by calling
the function `parse_service_search_pattern()`.
2. Traverse all registered SDP record and check for each SDP record
if it is matched with given service search pattern by calling
function `service_search_pattern_matched()`.
3. Use the matched SDP records to response the SDP request.
And also remove the limitation of the max count of registered SDP
records.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Use slist instead of custom singly linked list to manage SDP records.
Check if the SDP record has been registered in the function
`bt_sdp_register_service()`.
Append the new SDP record to the tail of the SDP record list.
Check if the index of SDP record is overflow in the function
`bt_sdp_register_service()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Migrate support from crc library to new crc subsystem
Add hardware acclerator backend for crc subsystem
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
The missing variable "config" in phy_mc_ksz8081_cfg_link() maybe
used by the macro "USING_INTERRUPT_GPIO", add the variable to avoid
compiling errors.
fixes: #95492
Signed-off-by: Tony Han <tony.han@microchip.com>
Fix incorrect LLL scheduling of subsequent subevents when
using single timer implementation, due to missing call to
accumulate the last PDU end timestamp which is essential to
setup next radio start and to setup header complete timeout.
Relates to commit 373dc0db71 ("Bluetooth: Controller:
Single timer use Extended Advertising nRF54L support").
Relates to commit 6e8f081385 ("Bluetooth: Controller: Fix
peripheral assert under single timer use").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Only upload to `slot1_ns_partition` if we're building for TF-M nonsecure
and we're doing split images. Single images need to upload to the whole
`slot1_partition`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Asynchronously release the device after a small delay to minimise power
state transitions under multiple sequential API calls (e.g. NVS).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Request calibration of the ADC in the voltage divider driver to improve
the accuracy of the measured voltages.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Added support for the IronSide bootmode service which allows requesting
a reboot into secondary firmware boot mode. In this mode, the secondary
configuration defined in UICR is applied instead of the primary one.
The service provides the ironside_bootmode_secondary_reboot() function
that can pass message data to the boot report of the CPU booted in the
secondary boot mode.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Make it easy to force any XIAO-shaped controller to use the D6/D7 UART
pins for the console. Especially useful for the upcoming XIAO Debugger that
easily forwards XIAO serial over USB.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
This default value 2 of WIFI_NM_MAX_MANAGED_INTERFACES
ensures WiFi network manager can properly handle both
access point and station interfaces.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
CAN2 requires CAN1 to be enabled because both controllers share the
same hardware filter banks. The master-can-reg property in the CAN2
node points to CAN1, making it the hardware filter master. Set CAN1
status to "okay" in the device tree to ensure proper CAN2 operation.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Compilers may optimize away empty while(1){} loops in helper threads,
causing the idle thread to run instead and breaking runtime statistics
measurement.
Use volatile condition variable to prevent optimization.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Allow disabling of remote wakeup in cases where a driver does not
support remote wakeup or where the functionality is not desired.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This brings many tf-m patches related to stm32 SoCs. It sync stm32 with
the vendor mainline patches and add all the necessary pieces to allow
STM32U5Axxx SoC work with TF-M.
The patch list can be checked in:
https://github.com/zephyrproject-rtos/trusted-firmware-m/pull/145
In addition, redesign the b_u585i_iot02a flash partitions. The current
b_u585i_iot02a NS flash layout difficult the development of large
applications. Since there is an external NOR memory which is already
supported by tf-m, this proposes a layout reconfiguration which allows
bigger bootloader, S and NS software. With this redesign the overlay
in the tests can be safely removed. This new layout is synced with
TF-M 2.1.1 mainline, see:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/41126
The bootloader BL2 now will fetch FOTA content from the external memory.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The S and NS shares the extermal NOR memory. This extracts the external
NOR partition definitions from b_u585i_iot02a-common.dtsi and move to
b_u585i_iot02a.dts to allow NS software defined their own external
partition layout.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
After PR 79683, DTSI files were full of U-suffixed constants in the
clock configurations. This was copied verbatim in this file even
though the U prefix should not be used.
Remove the useless U suffixes in DT snippets of this binding.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTS.
This bloats the files for no reason and is starting to spread as people
use the DTS for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTS files for ST boards.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PR 79683 added unnecessary U suffix to constants in DTSI.
This bloats the files for no reason and is starting to spread as people
use the DTSI for reference in other places, and so copy this bad pattern.
Remove the useless U suffixes in DTSI files for this series.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
The bt_csip_set_member_unregister function unregisters
a CSIS instance and restores the attributes to the original
state (the attributes may change during registration).
The previously solution had some issues with a check when
using picolib (‘__ssp_bos_check3’ undeclared), and this
fixes that by using a proper variable for the memcpy.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Consolidate board documentation into a single page to avoid duplication
and, more importantly, ensure the board documentation is properly
displayed in the documentation website.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Prevent board docs to be mounted twice in the doc hierarchy ;
also leverage zephyr:board-supported-hw:: to provide a short overview
of the features supported by each board variant.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
pwd.c and grp.c both had incorrect preprocessor guards around the stubs
that they were implementing. Functions were surrounded by
```cpp
ifdef CONFIG_POSIX_THREAD_SAFE_FUNCTIONS
..
endif /* CONFIG_POSIX_THREAD_SAFE_FUNCTIONS */
```
Which is not at all accurate, since that subprofiling option group is
`(CONFIG_)POSIX_SYSTEM_DATABASE_R` (which is a PR that is in-draft).
Remove the guards, since they are invalid anyway, and at most an
application will link properly. We don't really need the guards anyway,
since conditional compilation will be used to link the files into the
build.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Instead of re-implementing or assuming that POPCOUNT is available
we now use the generic function from Zephyr.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a generic function that will count the number of bits set in
a value.
It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.
POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.
A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update documentation of native_sim to leverage zephyr-board Shinx magic,
in particular the ability to generate the table of supported HW
features.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
PyGithub >= 2.7.0 is required for the
`Repository.get_collaborator_role_name` function used by the maintainer
check script.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The PyGithub `Repository.get_collaborator_permission` function invokes the
GitHub REST API `/repos/{owner}/{repo}/collaborators/{username}/permission`
and returns the value of the `permission` attribute in the response.
As per the GitHub documentation [1], the `permission` attribute "provides
the legacy base roles of admin, write, read and none, where the maintain
role is mapped to write and the triage role is mapped to read", and this
caused the users with `triage` permission level (i.e. the users in the
`contributors` team) to be incorrectly flagged by the script.
This commit updates the script to use the `get_collaborator_role_name`
function, which correctly returns the up-to-date user permission/role name,
including `maintain` and `triage`.
Note that the `get_collaborator_role_name` function is only available in
PyGithub>=2.7.0.
[1] https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#get-repository-permissions-for-a-user
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The commit 31ef45e2f1 converted the
maintainer check workflow from `pull_request` to `pull_request_target` --
this caused the "checkout" action to check out the base branch instead of
the pull request branch and effectively made the workflow compare the
mainline MAINTAINERS.yml against itself.
This commit reworks the workflow such that it checks out the pull request
MAINTAINERS.yml separately and compare it against the mainline
MAINTAINERS.yml checked out by the "checkout" action.
Note that the `requirements-actions.txt` and `check_maintainer_changes.py`
files used in this workflow are checked out from the base branch (i.e. does
not contain any modifications) and therefore do not pose a security risk.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This corrects the board referred to as "xiao_nrf54l15" to the correct
target "xiao_nrf54l15/nrf54l15/cpuapp".
Signed-off-by: Leon Mueller <leon@nowatch.com>
Make tx_data9 and tx_data24 non-cachable within the 9-bit word size and
24-bit word size functions. This repairs a suspected cache coherency issue
where these buffers are written to cache and therefore not seen correctly
by spi/dma.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Add possibility of using data strobe signal (DQS) called RXDS in
the SSI documentation. This signal may be necessary to make use
of DDR modes.
Remove also a TODO comment that should have been removed when support
for DDR was added in fc64fec8fe.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Within spi_rtio_copy there'd be a case where the tx_buf pointer would
mistakenly get assigned the address of an rx buffer.
Specifically this would happen in the case where there are no rx buffers
provided, and as such this would lead to pontential nullptr dereferences.
Correct the mistake to let tx_buf correctly point to the provided tx
buffers.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Select ARCH_SUPPORTS_COREDUMP_STACK_PTR on xtensa, and provide an
implementation for the arch_coredump_stack_ptr_get function.
Signed-off-by: Mark Holden <mholden@meta.com>
Modify the big_disconnect function to do cleanup_big before
calling the `stopped` callback. This will allow the ISO channels,
as well as the BIG itself, to be reused for other purposes directly
in the stopped callback, without having to offload such actions
to a separate thread.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
I3C targets can join the bus after initialization so CCC should not exit
if no known I3C devices exist at init time.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The Zephyr is implementing a linter to catch devicetree problems. This
boards comments are exceptions and are formatted to be compliance with
the linter. However due to the exception the linter check was disabled
to avoid undesirable formatting and keep the original details in the
comments.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Skip checking timing expectation when COVERAGE is used.
Coverage mode affect timing - making code slower,
as additional operations are needed to gather coverage stats.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Add a new ec_host_cmd backend based on USB. The backend uses the new USB
device stack.
The backend implements a vendor-specific (Google) USB interface. It uses
three endpoints:
- bulk OUT to transfer a host command request
- bulk IN to transfer a host command response
- interrupt IN to signal an event and readiness of the response
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Fix the node configured as the application SRAM partition. This aligns
this board with all the other Nordic DK `_ns` boards.
Signed-off-by: Jordan Yates <jordan@embeint.com>
By swapping the boxes with observer types in the graphics (thanks
Rodrigo) it now matches the description of the bullet points. Before
they were not in the order of the bullet points which confused during
reading.
Signed-off-by: Andreas Kurz <info@akurz.net>
move variable declaration out of if,
because it will be optimized away, when
optimisation is enabled and leads to
undefined and unwanted behavior.
In my case `send_buf` of `http_client_req`
was put at the same address and the
http request was malformed.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Do not directly include and use APIs from ksched.h outside of the
kernel. For now do this using more suitable (ipi.h and
kernel_internal.h) internal APIs until more cleanup is done.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The sensor interface gives current channel values in Amps, but the "I"
(current) value is displayed in mA, so needs to be converted accordingly.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Use csv instead of a plain split to split extra arguments for extra west
flags, this allows correct passing of arguments that are internally
escaped in quotes, such as arugments containing commas.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The resulting BUILD_ASSERT macro provided by
zephyr/toolchain/gcc.h is defined to be empty, making the macro
useless.
This commit ensures we define it to something that actually
performs a validation. When not compiling for C++ or >=C11,
we rely on that cdefs.h provides _Static_assert.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add initial support for FRDM-IMX93 board
Building hello_world:
west build -p always -b frdm_imx93/mimx9352/a55 samples/hello_world
Signed-off-by: Hongbo Wang <hongbo.wang@nxp.com>
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Increase the EXECUTE_TIMEOUT for the _ac_common.sh tests,
as some of them occasionally times out when the CI
servers are busy (especially for the cap_ac_11_ii tests).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Enable Si7210 Hall-effect sensor node under I2C2 in slstk3701a DTS for
magnetic field sensing. Include a 3.3V fixed regulator (sensor-enable)
via GPIO for power control.
Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
The CMC interface controls the entry and exit of the
CPU's low-power mode and the identification of the wake-up source.
To ensure the normal operation of the system's low-power timing sequence,
when transfer IDLE_RUN to IDLE_SLEEP, it is necessary to ensure
that the system is not awakened by the wake-up source during this stage.
Therefore, an IRQ MASK needs to be set on the CMC
Before the CPU enters the low power mode, a wake up mask needs to be set
according to the situation where the interrupt controller is enabled
at that time.
After the cpu exits the low power mode, resume needs to be performed
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add scmi_cpu_set_irq_mask function for scmi nxp cpu driver,
set cmc wakeup mask from scmi interface by this.
The CPU_IRQ_WAKE_SET is sent to the scmi platform
to determine which interrupt can wakeup the cpu platform
when the corresponding interrupt occurs
"1" means the IRQ cannot wakeup CPU platform
Each bit corresponds one-to-one with the interrupt
controller of the platform such as nvic in mcore
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Update the live logger to be able to read the logs from JLink, over the RTT
protocol.
The support for the jlink-rtt mode is done similarly to the currently
existing support for files and serials.
The implementation for opening the jlink for reading was inspired by the
available example from the pylink python implementation here:
https://github.com/square/pylink/blob/master/examples/pylink-rtt
In contrast to the other readers, the jlink-rtt does not support being
polled from 'select'.
To make it possible to work with such readers, the code was updated to
allow for busy-waits, instead of smart polling.
This change does not affect the current readers, but support the new
reader, and allows for future readers which does not support smart polling.
Signed-off-by: Omri Sarig <omsi@demant.com>
Adds a function that verifies if an endpoint pointer is
part of ASCS before performing CONTAINER_OF operations on it.
Adds checks for this in the BAP Unicast server public API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the code to use the public API to get the endpoint
ID and direction rather than relying on the internal
bap_endpoint.h header file.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The bt_ascs_ase_status was stored directly in the
struct bt_bap_ep, which was an issue as
bt_ascs_ase_status is a variable sized struct.
The struct could have been moved to the end of
bt_bap_ep to avoid the issues it caused, but
there is no actual reason to use that struct
rather than storing the ID and state as
seperate values.
The ascs_ep_get_state exists but was not widely
used in ascs. Modify places to use the function
instead of directly accessing the state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modified the smf_hierarchical_initial digraph so that it doesn't use a
`<>` label as that makes recent versions of graphviz unhappy (warning).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes the `spi_loopback` test failure on board Renesas `rzg3s_smarc` since
the test has been updated by zephyrproject-rtos/zephyr/pull/86383
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Change the pin configuration (xg9_rb4412a) for the IADC to allocate
odd bus 0 on GPIO port C/D instead of GPIO port B, allowing access to
pin PD3.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Implement a workaround to ensure only one of the two top-level indexes
is included in the documentation build, preventing Sphinx from issuing
INFO notices about documents being referenced in both index and
index-tex toctrees.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
For most people, this should be only an optimization.
For Emacs TRAMP (ssh) users, this fixes the following build failure when
a file is not saved yet. This build failure happens because TRAMP
creates backup files on the local host and seems to use deliberately
broken symlinks as "bookmarks" to those local files.
file snippets/.#index.rst
snippets/.#index.rst: broken symbolic link
to userid@hostname.intel.com.966265369654
```
Traceback
=========
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/sphinx/events.py", in emit
results.append(listener.handler(self.app, *args))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File " doc/_extensions/zephyr/external_content.py", in sync_contents
shutil.copy(src, dst)
~~~~~~~~~~~^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 428, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 260, in copyfile
with open(src, 'rb') as fsrc:
~~~~^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:
'___/zephyr/snippets/.#index.rst'
```
Just for the record, these backup files were already discussed in commit
bab7df9f9e (".gitignore: do not ignore .\#* files")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The insertion of MCUBOOT header will shift the rom code ahead with
0x800 bytes because of memory alignment
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Fix to ensure temperature is sampled at the same timestamp as x,y,z axis
data.
Signed-off-by: Vinayak Sunilkumar Priyadarsini <Vinayak.SunilkumarPriyadarsini@analog.com>
Add tests to validate pointer authentication code (PAC) in 2 scenarios:
1. when the PAC key itself is corrupted
2. when lr is corrupted on stack
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
To support unprivileged mode (CONFIG_USERSPACE):
- Set unprivileged PAC key registers when system is in unprivileged
mode.
- Add `bti` after each svc call, to make sure that the indirect jumps on
`lr` while returning from an `svc` don't result in a usage fault.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Add a config option to set unique PAC keys per thread and
make sure to retain them during context switch.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
As part of enabling PACBTI support:
- Add config options to enforce PAC and BTI features
- Enable these config options based on the branch protection choice
selected for `ARM_PACBTI`
- Enforce PACBTI, based on the new config options, by enabling
corresponding PACBTI bits in CONTROL register and in FVP.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Rename and move PACBTI config options to common Kconfig so that
they could be re-used for arm64 in the future.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
As the other spi_nxp_lpspi driver source files use DT_DRV_COMPAT
and that is used to determine in spi_context.h if the gpio cs
code is used, it also have to be defined in spi_nxp_lpspi_common.c
so there is no mismatch and breaking of the driver.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
CTF tracing relies on all packet timestamps being increasing- if a
timestamp of a later packet is less than the prior packet, the CTF
parser assumes the timestamp field has overflowed and adds to the
overall timestamp to account for this.
When taking a timestamp for a CTF packet, it was possible for an interrupt
to occur before the packet was submitted to the tracing core framework
but after the timestamp was generated. The interrupt itself would
generate a tracing event with a later timestamp then the packet in
question, leading to the packets being recorded out of order.
To resolve this, take an IRQ lock before generating the timestamp and
release it after submitting the packet to the tracing core.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Added support for combined write-read operations
with repeated start for asynchronous (async)
operations in the Silabs I2C driver for EFR
series 2 devices.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Describe the modification of the hardware checksum offloading
configuration for the Xilinx GEM Ethernet controller.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Adjust the DT binding of the Xilinx GEM controller so that the
explicit enable flags for RX/TX hardware checksum offloading are
turned into explicit disable flags.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Invert the RX/TX checksum offloading to hardware behaviour so that
hardware checksum generation / evaluation for TCP/UDP packets on
either IPv4 or IPv6 is enabled by default, but can be disabled
explicitly.
This behaviour, which should optimize network performance, has
become possible with the implementation of the device driver's
get_config function, indicating to the network stack that HW
checksum offloading is not supported for, e.g., ICMP packets.
Before this implementation, enabling the HW checksum offloading
resulted in invalid packets for any unsupported protocol and
could therefore not be enabled by default.
For QEMU, which does not support the emulation of the HW
checksum offloading, automatically disable the offloading.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
This reverts commit d0a076984b.
The reason for reverting this is that the only safe startup time for
54L series is the one defined in the SoC .dtsi files (1650us), and other
startup times are not reliable even when tested on a particular board.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
z_prep_c does not return, mark it as such consistently across
architectures. We had some arches do that, others not. This resolves a
few coding guideline violations in arch code.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
simplify cmake file and use macros for adding files that are part of the
kernel based on the configuration.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move device model syscalls to device.c and decouple kernel header from
device related routines. Cleanup init to have only what is needed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
No reason for this to be part of already packed init.c.
Moved to own file and build only when BOOTARGS are enabled.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cleanup init.c code and move early boot code into arch/ and make it
accessible outside of the boot process/kernel.
All of this code is not related to the 'kernel' and is mostly used
within the architecture boot / setup process.
The way it was done, some soc code was including kernel_internal.h
directly, which shouldn't be done.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move under arch, as this is not a kernel feature really. arch also
matches the test idcentifier in place.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move under arch, as this is not a kernel feature really. arch also
matches the test idcentifier in place.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move under arch, as this is not a kernel feature really. arch also
matches the test idcentifier in place.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Not really a kernel feature, more for architecture, which is reflected
in how XIP is enabled and tested. Move it to architecture code to keep
which much of the 'implementation' and usage is.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For clear, this splits large isr function into smaller ones which are
dedicated for handling plug/unplug, wakeup, reset/suspend/resume, SOF,
Setup, and endpoint events.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This refines interrupt handling sequence: clear interrupt flag first,
then process it. This can avoid one race condition when interrupt flag
is cleared but not processed for interrupts of the same type coming
very closely.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This fixes timing to enable D+ pull-up so that device won't be recognized
by host until user application invokes udc_enable().
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This combination (with newlib) seems to catch some build failures due to
include depdenency, adding a test file so it gets caught in CI.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change utf8_count_chars return type to int and drop thesys/types.h, this
way the function does not depend on posix types.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This moves the declaration of the utf8 utils defined in lib/utils/utf8.c
in their own header. Main reason to do this is that the current setup
requried adding an include for sys/types.h in util.h, which can result
in a build falure due to a circular header depdenecy when using:
CONFIG_POSIX_API=y
CONFIG_NEWLIB_LIBC=y
_GNU_SOURCE
the loop and error are:
- include/sys/types.h:50: <- this is a NEWLIB one
- include/zephyr/posix/sys/select.h:9:
- include/zephyr/posix/posix_types.h:30:
- include/zephyr/kernel.h:17:
- include/zephyr/kernel_includes.h:25:
- include/zephyr/sys/atomic.h:18:
include/zephyr/sys/util.h:705:1:
error: unknown type name 'ssize_t'
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Restructure the IronSide boot report interface with enhanced error
reporting and boot context information.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Ensure that flash partitioning makes use of the entire flash with
no overlapping regions. Remove scratch partitions.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Some applications might require cleanup prior to performing a system
reboot. Add an option that disables hawkbits automatic reboots so that
it can be postponed until the application is ready.
Signed-off-by: Mandus Börjesson <borjessonmandus@gmail.com>
Fix missing ISO Receiver access address capture that caused
ISO PDU reception error. Missing access address capture for
subsequent subevent when prior subevent did not have an
anchor point sync prevent proper drift compensation hence
causing ISO PDU reception error for the entire BIG event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the jitter considered in the PDU reception in the
subevents of ISO Sync Receiver to not exceed such that the
reception is scheduled late (causing assertion).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit adds a print statement to both connected_cs_initiator and
connected_cs_reflector which will inform the user that the sample cannot
handle more than 1 CS subevent per CS procedure.
This is preferable over the sample failing silently if a user is
attempting to use such a configuration.
Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
This change is made to fix the currently broken CS samples, to prevent
them from just printing error messages like:
`Channel sounding not enough memory to store step data (530 > 512)`.
This change updates the CS config and procedure parameters. The
intention with the updated parameter selection is to use parameters that
result in:
- CS procedures with only a single CS subevent per procedure. This is
required because the samples are not designed to support > 1 subevent
per procedure and the samples will break down if > 1 subevent per
procedure is generated.
- A limited number of CS steps per procedure. This is achieved by
setting `.channel_map_repetition = 1` and only enabling a limited set
of channels in the channel map. This is required because the samples
are designed to transfer all of the step data from one procedure, from
the reflector to the initiator, using a single GATT write operation
which is limited to 512 bytes.
Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
RFC4330 section 10 states:
A client MUST NOT under any conditions use a poll interval less then 15
seconds.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
sdp matching_recs maybe filled with uninitialized record. if
sdp_svc_search_req come from remote with invalid max_rec_count,
which is greater than num_services, matching_recs would response
uninitialized record result.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
This is for using the Raspberry Pi Debug Probe as a general purpose
microcontroller board, not for using it in its original debugging role.
Product photo from https://www.raspberrypi.com/products/debug-probe/
Tested with the samples mentioned in the index.rst page.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Previously the ETHOS_U_LOG_LEVEL choice and int symbol only existed
when STDOUT_CONSOLE was enabled. This caused build and compile issues
if logging was disabled, since CONFIG_ETHOS_U_LOG_LEVEL would be
undefined and C code using LOG_MODULE_REGISTER() would fail.
- Replace dependency on STDOUT_CONSOLE with LOG.
- Ensure ETHOS_U_LOG_LEVEL is always defined, even when LOG is off.
In that case default to 0 (NONE).
This guarantees a valid CONFIG_ETHOS_U_LOG_LEVEL is present in all
configurations and allows clean builds regardless of console settings.
Signed-off-by: Johan Alfvén <johan.alfven@arm.com>
WPA Auto security adds support for WPA/WPA2/WPA3 PSK security.
Supports auto security mode, enabling STA to select the most secure mode
among WPA, WPA2, and WPA3 based on the capabilities of the AP.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
When the external AP is in WPA/WPA2 mixed mode, the group cipher uses
TKIP, the group cipher mismatches, so the connection fails.
Fix: set the WPA2 group cipher to TKIP + CCMP by default.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
ARM CMSIS 6 has different ITM and TPI register definition comparing
with CMSIS 5. Update the swo initialization to use CMSIS 6 defines.
For the Cortex-M cores which are higher than Cortex-CM7, the LAR
has been removed from ITM.
Signed-off-by: Aaron Ye <aye@ambiq.com>
Provide a map from RTS5912_GPIO_NUM_000 to RTS5912_GPIO_NUM_131
for appication call be easier read.
For example:
Used: <&gpiog 6 (GPIO_OUTPUT)>
Now: <RTS5912_GPIO_NUM_102 (GPIO_OUTPUT)>
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
Disable the shadow registers bypass in init function before RTC
deinitialisation to avoid infinite loop as the bit cases the RSF bit
to be kept in 0. The systick is not working in PRE_KERNEL_1 so it will
never timeout.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Enables low power stop mode for C0.
Code is taken from F4 family, tested on nucleo-c71rb with
samples/basic/blinky.
Power consumption in run mode 3.7 mA, in stop mode ~87 uA.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Test the received byte against the byte sent depending on the speed
selected, not the standard-speed mode byte every time.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
dts improvement for MXCHIP - AZ3166 IoT Dev kit.
I added accel0 alias for compatibility with the accel_polling sample.
Signed-off-by: Alexandre Francoeur <afrancoeur@uzinakod.com>.
fix a typo in board name (mixm... instead of mimx...) and actually use
a proper board name anyway since it looks like this was still using
a HWMv1 name.
Fixeszephyrproject-rtos/zephyr#95015
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Ensure all top-level device driver headers have a Doxygen @file tag and
put the @file in the same group as the driver API.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Move MSPI devicetree macros documentation under MSPI group to not
clutter top-level device drivers page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Basically just fixing the comment style to use javadoc-style comments
so that doxygen picks these up
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The group dedicated to transport layers for MCUmgr ended up being
orphan, probably due to a bad rebase in the recent past. This commit is
fixing it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The current test result merge command uses artifacts/*/*/twister.xml as
an argument but that directory hierarchy only works if there's >1
runners. If twister decies to only schedule one, then the only file is
going to be in
artifacts/twister-out/twister.xml
and the current command is going to fail with a file not found error.
Using a ** glob for finding the files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Take a repo and org argument to the do_not_merge.py script so it can be
used in the testing repository.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add test for sys_bitarray_alloc and sys_bitarray_free with 32 bit
bitarray which is using an optimized algorithm.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When bitarray is limited to a single 32 bit word then bitmask_find_gap
can be used which is much faster than bit by bit search which is
used in bitarray spanning across multiple 32 bit words. Tests shows
that allocation and freeing is 2-3 times faster.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add function which finds contiguous number of bits which are not set
in the 32 bit mask.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
According to the datasheet, one page is made of 64 bytes
and one row is made of 4 pages, that is 256 bytes.
This MR fixes the incorrect page write size for sam0
and sets it to 64 bytes.
Signed-off-by: Taras Zaporozhets <zaporozhets.taras@gmail.com>
Add a HWINFO driver for native_sim with support for getting the device
ID. Default device ID will be that returned from gethostid(), but the ID
can be overriden via the -hostid command line option.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Adding configuration to facilitate the testing of
stdby BLE feature for stm32wbax nucleo boards
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Reworking pm implementation in stm32wba ble hci driver.
Enabling "no-reset" quirk for stm32wba ble hci driver to
maintain specific configuration required for pm.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
system clock at 32MHz (nucleo_wba55cg and nucleo_wba65ri).
32 Mhz is the lowest value to manage radio events.
lsi clock disabled (nucleo_wba55cg).
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Fixeszephyrproject-rtos/zephyr#92663
Disabled LFXO via devicetree allows pin 0.00 and 0.01 to work correctly
as gpio by assigning it to the app core instead of peripheral. Removed
deprecated Kconfig options so DT is the only config path now.
Signed-off-by: Ivynya Lu <ivy.lu@level.co>
Add support for running the APU ELF on QEMU using the
`west build -t run_qemu` target. QEMU integration is now wired through
west and Twister for the `versalnet_apu` board.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Introduce a generic board configuration for the APU on the Versal Net SoC,
which is based on the ARM Cortex-A78 processor.
This board setup provides a baseline environment for enabling and testing
Cortex-A78 features and peripheral integration on the APU subsystem.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Add initial support for the Versal Net SoC APU, which is based on
the Arm Cortex-A78 processor. It includes basic wiring for memory
regions, UART, interrupt controller, and timer.
The versalnet_apu.dtsi file defines peripherals shared across the SoC,
while versalnet_a78.dtsi captures peripherals private to the Cortex-A78
processor. These device trees lay the groundwork for further APU-based
development on the Versal Net platform.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Add CPU bindings for the Cortex-A78 to enable reading CPU device tree
properties in Kconfig. This is required to correctly configure and
use CPU-specific settings based on the device tree.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Introduce a new Kconfig option CPU_CORTEX_A78 to enable support for the
Arm Cortex-A78 CPU architecture within Zephyr. This configuration can be
selected by boards or SoCs that utilize the Cortex-A78 core, enabling
architecture-specific features and optimizations as needed.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
The LSM9DS1 bindings were described as a full 9-axis IMU, while each
binding only covers one part of the device. This also made the
"Supported features" section of the generated docs misleading, since it
only shows the first sentence.
Update the descriptions to explicitly state whether they cover the
accelerometer + gyroscope or the magnetometer.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Fixes sample command added to the documentation by commit
a31f784e95 ("twister: add a --flash-command flag")
During the review of #93944, I recommended to change the order and pass
user --flag(s) last. This was changed in the code but not in the example
added to the documentation.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
snippets toctree should only look one level deep, and **/* wouls cause
matching to be too greedy.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit fixes the bug in the prescaler configuration formula.
Prescaler enumarations values are not consecutive numbers, so this
formula does not work correctly. This commit adds prescaler enums into
an array and sets PWM prescaler from this array with using
prescaler_index parameter.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Disable VHT (Wi-Fi 5) capabilities when building with softAP support
to ensure consistent Wi-Fi 4 only behavior across all channels and
frequency bands.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
STM32L4xx series shares several SAI & DMA configurations with
the other platforms. These changes aim to remove specific
DMA & SAI configurations which are not used by STM32L4xx
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Previously, the openamp sample enabled ESP32/ESP32S3 SoCs directly,
which caused all SoCs of these families to be included in the testcase.
However, only a subset of boards is actually supported and mapped in
Kconfig.sysbuild.
To avoid applying defaults to unsupported boards, move the configuration
out of the SoC directory and into board-specific files. This ensures that
only the intended boards are targeted by the openamp sample and avoids
misleading test coverage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix typo introduced in some shields DTS overlay files by commit
c683b044d9 ("shields: devicetree: use arduino-header-r3.h constants
in all shields").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Update the USB shell sample to the new syntax. This is based on tests
done with native_sim, along with the virtual.conf, virtual.overlay and
device_and_host_prj.conf extra config files.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Hide the mutex lock details inside a wrapper call, like done for the
device stack API. This is not used for the per-device lock of the host
stack which use a different mutex lock.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
In the while loop parsing descriptors, check that the descriptor is past
the end just before dereferencing it to check if it is seemingly valid.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Make the struct name match the device naming for ease of use, although
slightly longer name. Propagate the change to the subsystem, includes,
tests and samples.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
5718af02c5 introduced a regression where a warning was printed
about unknown BOARD when rebuilding. Commit moved _find_board()
to an earlier stage and that was failing during the rebuild. Instead
of moving board finding earlier we can move parsing of the test_item
to the later stage as it is needed only just before running cmake.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Commit 39cb574 changed the log level from LOG_DBG to LOG_ERR in
bt_le_adv_resume(). This causes the error log
"No valid legacy adv to resume" to appear during normal connection
establishment when using bt_le_ext_adv_start(), even though the
system is functioning correctly.
Revert the change to restore the original LOG_DBG level.
Fixes: #94954
Signed-off-by: Samuel Tsai <stsai@atmosic.com>
If the cmd fail to receive response (for example: timeout), the buf is
NULL, then need to callback the result.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
TDM should have clock divider bypass enabled when calculated clock divider
exceeds maximum allowed value which is `CKDIV2`.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add support to test flash/common for qspi_nor on Renesas
ek_ra6m5, ek_ra6m4, ek_ra6m3, ek_ra6e2
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Add the STM32 auxiliary macro STM32_DMA_GET_CHANNEL_INSTANCE to handle
naming convention conflicts between STM32 series.
The H5, H7RS, N6, U3, MP2, U5, and WBA series use
the LL_DMA_GET_CHANNEL_INSTANCE definition, while other series use
__LL_DMA_GET_CHANNEL_INSTANCE.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Commit 4f637258ef reworked the twister main
function. Update the west wrapper to align with that change.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit updates the CI workflows to use the CI image v0.28.4, which
includes Zephyr SDK 0.17.4.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
If pm action fails within put_sync_locked, usage count should be
reset to reflect the state of the device.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Test the test driver returning negative values on calls to
pm_device_runtime_get/put calls.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add API to configure the return value of pm actions of the
test_driver used by the device_runtime_api test suite.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add tests for CPU frequency subsystem covering
SoC integration of pstate as well as the on_demand
policy.
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.
Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.
The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.
Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.
Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
GIC ITS depends on kernel heap, so move GIC initialize to be behind of
heap which initialization priority is CONFIG_KERNEL_INIT_PRIORITY_OBJECTS
which is 30 by default.
MU mailbox and SCMI objects depend on GIC, so set their init priority
to be same with GIC, the initialization sequence decided by the dts
dependency although they use the same init priority.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
The comments for INPUT_BTN_GEAR_DOWN and INPUT_BTN_GEAR_UP were
incorrectly swapped. This commit fixes the documentation to match
the actual button definitions.
Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
Ensure all RST files only ever belong to one single toctree by means of
cleaning up existing in globs used in nested folders.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Main sample category page for CANbus contained "old" toctree alongside
zephyr:code-sample-category, causing doc build warning due to documents
belonging to multiple toctrees.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Ensure all RST files only ever belong to one single toctree by means of
cleaning up existing in globs used in nested folders.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When the loop completes without breaking, tries would be
BMI270_CONFIG_FILE_RETRIES + 1 so the error check was never hit.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The call to k_sleep() is not safe as dai_dmic_probe() is called
from PM dmic_pm_action() and k_can_yield() may be false.
Problem was caught on Intel WCL ADSP platform with SOF as application
and a Zephyr build with asserts enabled.
Fix the issue by using k_busy_wait() instead.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
For all GPIO headers/connectors, add a short mention of the header file
that can be used to access pin numbers macros.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make use of `tabulate` to pretty print the results of the hardening tool
instead of custom formatting.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes minor issues of the max17048 driver, which came up during
another PR.
This was tested with the CI and the Adafruit ESP32-S3 Reverse TFT Feather.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Format existing drivers according to clang-format rules.
Not all drivers were formatted, according to the clang-format rules,
this commit resolves this.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Refactor drivers so all have the same clean public interface.
With this change, all drivers have the same coding style.
This change does not change how the driver works and was tested with
the "fuel-gauge-build all test"
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Add build tests for the following missing devices:
- x-powers,axp2101-fuel-gauge
- onnn,lc709203f
- silergy,sy24561
This is important, because it guarantees that all drivers will be
build the driver during CI.
Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
Updating standby exit latency time according worst case value
from stm32wba5 and stm32wba6 datasheets.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
soc power management rework to support power states
removing dependency on ST system clock manager (SCM).
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Add wsen_isds_2536030320001 driver with
the corrected name and compatibility with
the hal update as well as added new features.
Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
These tests verify the expected returned value and device state for
error cases (-EALREADY, -errno) conform to the device_init()
documentation.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
This fix makes sure that do_device_init() returns a negative value if
the device's initialization failed. Previously, it mistakely returned
+errno instead of -errno.
This oversight happened during the refactoring of z_sys_init_run_level()
to support deferred initialization, from which most of do_device_init()
code derives. The rc value computed and stored in dev->state->init_res
is the POSITIVE value of the resulting errno. Returning rc therefore
breaks the convention of a negative value to signal failure.
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Rate limit the get_recv_buf() callback from the application to
reduce system trash when buffer pressure gets high.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
This is used for properly tracking if legacy or extended advertising
API is used and should not be changed if advertisign is enabled.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
If extended advertising was used GAP module was always creating
new instance on advertising start (while failing to stop it at
the same time).
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Refactored twister_main.py module to simplify the code and system tests.
Removed the need to patch `sys.argv` in blackbox tests.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Add a Doxygen group for the GPIO pin headers macros and initially
document Arduino Uno (R3) header pin constants.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add mention of ARDUINO_HEADER_R3_* constants in binding description for
the Arduino Uno (R3) header.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make shield overlays less error prone and easier to maintain by
switching to GPIO pin constants defined in arduino-header-r3.h.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There are a few board overlay files with identical lines describing the
flash disk. Move these lines to a separate overlay file that could be
used for any board with a large enough storage partition. Update the
documentation accordingly.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When building in CI for specific SOCs, it's useful to only have `west blobs
fetch` pull a selected set of blob objects. This is especially helpful on
`hal_espressif`, which currently has 78 blob objects.
Add a `--allow-regex` arg to the `west blobs fetch` subcommand to filter
only specified blobs, for example:
```bash
# only download esp32 blobs, skip the other variants
❯ west blobs fetch hal_espressif --allow-regex 'lib/esp32/.*'
```
Also, replace all `str.format()` invocations with f-strings per review
feedback.
Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
Currently the workflow is correctly uploading to codecov but all the
paths are prefixed with an extra `zephyr/`.
Use the `working-directory` parameter to ensure the paths are correct,
and also ensure that only the new.info file is ever processed.
Tested locally by doing the equivalent of what the action now does
using the codecov CLI and I was able to both reproduce the bug as well
as confirm the fix.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add more macros for interacting with controller/data type of
relationships (phandle arrays / cells)
Add macros for arbitrarily iterating cells of phandle specifiers
Add tests for the new macros
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add information about the ram_plot and rom_plot build targets to generate
memory usage reports using sunburst charts.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a helper script that can take in a size report in json and render it in
a sunburst chart.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Release DMA channels allocated through dma_request_channel with
dma_release_channel in test_loop, test_loop_suspend_resume and
test_loop_repeated_start_stop.
This prevents channel allocation leaks and enables the tests to still
run even if the utilised DMA driver is configured to only utilise a
subset of implemented DMA channels.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add a num_of_allocated_channels field to struct dma_mcux_lpc_config. Add
a a capacity check for dma_X_channel_data_arr in dma_mcux_lpc_configure.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Used simple vlanX for vlan interface name. What interface the
vlan interface was attached to could be checked by "net iface"
or "net vlan".
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
There were two problems about vlan interface naming currently.
1. When there were more than 1 vlan interfaces. It's not able to
initialze name for all of them to same name VLAN-<free>.
2. When enabled vlan with tag, the name VLAN-xxx was used.
However we may need to support multiple physical interfaces
in the future. So, it's not able to use same name VLAN-xxx
either for same tag on different physical interfaces.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add support for setting and getting the bearer provider
name. For now the name will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the name exists.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a possibility to specify VID and CID for each MCUboot image and pass
it to the imgtool.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.
Signed-off-by: Tony Han <tony.han@microchip.com>
Call ksz8081_init_int_gpios() after phy_mc_ksz8081_reset() due to
keep the configurations for interrupt.
Signed-off-by: Tony Han <tony.han@microchip.com>
Update the internal driver flags to avoid setting DO_AUTONEG_FLAG
unconsciously when setting LINK_STATE_VALID.
Signed-off-by: Tony Han <tony.han@microchip.com>
Zephyr Version Compatibility page get moved in sdk-ng project. This
patch updates to URL to match the new page name.
Signed-off-by: David Schneider <schneidav81@gmail.com>
Updated the documentation for the BAP broadcast assistant client shell
commands to include the previously added 'add_by_broadcast_name' command.
Signed-off-by: Babak Arisian <bbaa@demant.com>
Add a stupid binding for doc purposes. Terrible coupling when we have to
configure DT in order to generate documentation properly. At least we
get rid of one of the stupid HAS_MCUX_ kconfigs in the process.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
When USDHC_Reset fails, we should be more verbose about it failing. Add
the error prints here so that we can observe the failure in logs.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
This test covers following test cases:
- test_set_top_value_with_alarmp
- test_valid_function_without_alarm
- test_set_top_value_without_alarm
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
1.Update dts bindings to move clock-source properties from
nxp,ftm-pwm.yaml to nxp,ftm.yaml.
2.Provide counter driver based on FTM driver from NXP mcux-sdk-ng
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
We only need west, so not go about installing packages using the
scripts/requirements-actions.txt file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The following error is issued by clang when building with
SPI_NOR_SFDP_RUNTIME enabled:
error: fields must have a constant size:
'variable length array in structure' extension will never be supported
1379 | uint32_t dw[MIN(php->len_dw, 20)];
Instead, hardcode the array length to 20 32-bit words (it's instantiated
in the stack anyway).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move MIPI headers under Display group so that they don't clutter
top-level Device Drivers group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update Zephyr fork of MCUboot to revision:
aa4fa2b6e17361dd3ce16a60883059778fd147a9
Brings following Zephyr relevant fixes:
- 557f84be bootutil: Move primary/secondary slot definition to
bootutil_public
- 82bd4a76 boot: bootutil: Fix pure image validation check with
offset swap
- fe8f9fc0 bootutil: Fixed security counter overflow detected to
late
- 10a3cffa boot: zephyr: boards: nrf54h20dk cpuapp add chosen
code part
- 86678000 zephyr: use REQUIRED in dt_nodelabel calls to fail
early and with meaningful message
- e0b84a0c zephyr: Fix FLASH_DEVICE_ID for nRF54H20 platform
- 504847e3 bootutil: Fix PureEdDSA when flash base is not 0x0
- aa229135 bootutil: Fix bootutil_aes_ctr_drop memset usage
- 713b98b6 boot/boot_serial: build-time skip of the erasing of
img status page
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Re-configure the registers if they re erased because of a STOP2 low power
mode.
Return the error code when re-initializing the UART after a STANDBY low
power mode.
Fix few typos and comments.
Run clang format on uart_stm32_pm_action()
Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
The interface descriptor and its associated string descriptor are shared
between different speed configurations. Do not try to add a string
descriptor if it has already been added and the index is not zero.
Similar to commit ec851ba7c7
("usb: device_next: avoid false error logging in CDC ACM").
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
In both lsm9ds1 and lsm9ds1_mag drivers, the device data structure is
generally referenced with the variable name data.
However, in the initialization functions, the variable was named
lsm9ds1 (or lsm9ds1_mag for the magnetometer), which breaks this
convention.
Rename these variables to data for consistency across the driver.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Adds support for device PM for the lsm9ds1 sensor, putting the sampling
frequency of both the accelerometer and the gyroscope at 0 when the device
is suspended.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Memory region configuration: Configure the flags of each memory
regions present on the device using the mechanism provided by
the xuantie core (chapter 9.2 of E907 manual).
This enables matching more closely the real memory space of
the device than the defaults.
Signed-off-by: Camille BAUD <mail@massdriver.space>
Controllers that use buffers directly must always allocate the length of
the control OUT buffer as a multiple of the control endpoint MPS.
Kinetis UDC driver explicitly checks the remaining buffer size and
finishes the transfer earlier.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix typo und remove unused variable, add a check for buffer allocation.
Do not disable controller on udc_disable.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Some controllers, such as those used in Kinetis devices, do not provide
a way to reset the buffer descriptor flags for each endpoint. Do not
reset the odd flag on endpoint enable, as this will cause it to become
out of sync with the hardware.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This reverts commit 4f18ccd73b
now that STM32C0 based target are supported by the test default
configuration (see commit 7dbd60016c ("tests: ram_context_for_isr:
Use Kconfig for IRQ config").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Define the vbatts-pins for the RA4E1, RA4M1, RA4M2, RA4M3, RA4W1
RA6E1, RA6M1, RA6M2, RA6M3, RA6M4, and RA6M5
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
The `%.*s` format specifier expects an int so cast the size_t parameter
to int.
Fixes an issue spotted in CI for:
west twister -p native_sim/native/64 -s sample.net.dns_resolve.mdns
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add entries for the two new functions,
bt_bap_unicast_group_get_info and bt_cap_unicast_group_get_info.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add an additional step when doing CAP unicast tests where
we validate that the presentation delay set for each stream
match the presentation delay from bt_bap_unicast_group_get_info
via the BAP unicast group pointer retrieved via
bt_cap_unicast_group_get_info.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add bt_cap_unicast_group_get_info to get information about
a CAP unicast group. For now this just contain the pointer
to the BAP unicast group, which then can be used with
bt_bap_unicast_group_get_info to get information specific
to BAP. The bt_cap_unicast_group_info struct can later be
expanded with any additional information CAP may add.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use bt_bap_unicast_group_get_info in the BSIM test to verify that
the return values are as expected.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add bt_bap_unicast_group_get_info to get information
about a unicast group. In this first iteration the info
struct only contains the sink and source presentation
delay, but the info struct can easily be expanded on
later to contain more.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
BAP section 7.1 states that all streams in a direction shall
have the same presentation delay. To achieve this, we need to
store the configured presentation delay for a unicast group,
so that we can compare with the new presentation delay.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Until recently this driver wasn't built in CI. Now that it is, clang
is complaining about `err` possibly being uninitialized in case
`bitmask` is 255. Fix it by actually removing code that was
unnecessarily trying to access the uninitialized variable.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Update TTC0 clock frequency to 100MHz to align with the Configurable
Example Designs (CED) for kv260 board as used in Vivado.
- Add support for deriving SYS_CLOCK_HW_CYCLES_PER_SEC from Device Tree
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Modified the assertion statements to raise informative exceptions
that indicate which lines did not pass the assertions.
Added unit tests using pytest to validate the functionality of
the modified functions.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Adds a output env file that lists the paths of zephyr modules
which can be used in Kconfig files and uses this in Kconfig. Also
updates Kconfig doc output to generate and use this
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
To simplify the work on client drivers, provide a STM32_DMA_GET_INSTANCE()
macro which abstracts:
- STM32_DMA_STREAM_OFFSET
- __LL_DMA_GET_STREAM_INSTANCE() vs __LL_DMA_GET_CHANNEL_INSTANCE()
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
In HAL based stm32 drivers, dma handling is done internally to HAL.
Though, in order to avoid a dma_config() call is done to ensure stream
will be set as busy in zephyr dma driver to avoid potential resource
sharing conflict.
This dma_config() call was done while taking into account
STM32_DMA_STREAM_OFFSET, which is wrong as it will prevent zephyr dma
driver to set the right stream as busy.
Fix this in impacted drivers.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To ease code understanding of offset handling within the driver,
harmonize its treatment within impacted functions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
STM32_DMA_STREAM_OFFSET is defined as 0 in case "dma u5" is in use.
Clean up code relating to this define.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
On STM32L4, similarly to other STM32 series, enable DMA directly based
on dt configuration and avoid need to configure it at application level.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
When testing ESP32-based platforms in CI, early boot logs can be missed
if the serial connection isn't reset properly. This patch applies the
standard RTS/DTR toggle sequence to reset the ESP32 after flashing,
ensuring consistent log capture from the very beginning.
The logic is applied conditionally when the runner is "esp32".
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Splits up partition configuration for nrf5340-based cpuapp board
targets for secure and non-secure versions, the secure version now
has an extra 16KiB per slot which was previously wrongly reserved
for TF-M partitions which the secure board target does not use
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
As the compiling warning "duplicated unit-address" been solved by
using a common parent node, remove the suppress from makefiles.
Signed-off-by: Tony Han <tony.han@microchip.com>
USB host, device, Type-C, and BC1.2 are now all grouped under a
top-level USB entry in the "Device drivers" doxygen group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add MCUboot variants to RPI Pico / Pico W and SysBuild parititions:
- rpi_pico/rp2040/mcuboot
- rpi_pico/rp2040/w/mcuboot
Add MCUboot variants to RPI Pico 2 / Pico 2 W and SysBuild partitions:
- rpi_pico2/rp2350a/m33/mcuboot
- rpi_pico2/rp2350a/w/m33/mcuboot
Signed-off-by: John Lin <john.lin@beechwoods.com>
Suppress memory leaks detected by valgrind originating from
nct_new_thread(), part of the native_sim CPU thread emulation.
This covers calls to posix_new_thread() as well, since this function simply
calls nct_new_thread (but may be optimized out by the compiler).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Currently twister requires west to flash a board, either directly using
west-flash or indirectly through the cmake flash target.
Add an option to specify a custom flash script, this is passed a
build-dir and board-id flags so it can be used to implement custom
flashing scripts in a system that does not use west.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
When the SHI driver receives data from the host and finds it is invalid
(due to a checksum error or an unsupported protocol version),
it currently resets the state machine, initializes the output buffer,
and waits for CS de-assertion. Upon CS de-assertion, the driver resets
the state machine and initializes the output buffer again. This commit
removes the first redundant reset and re-initialization in the function
`shi_npcx_bad_received_data()`, improving the driver’s efficiency.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
This change fixes STM32H7xx dma configuration.
PeriphInc and MemInc should be the same for both directions.
MemDataAlignment should be set to DMA_MDATAALIGN_HALFWORD
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Fix Coverity issue CID 524766: A potential integer overflow could occur
in paj7620_set_sampling_rate() due to multiplication of
sensor_value->val1 instance(which is of type int32_t) with 1000000
without typecasting it to int64_t.
Fixes#90482
Signed-off-by: Aditya Chopra <adityachopra2912@gmail.com>
Set mem_block to NULL after the STOPPING command in order to exit
TX callback at the end of the buffer transmission.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Add configuration overlay file to support observer sample
with Extended Scanning on BBC Micro Bit board.
Due to slow CPU, there will be assertions, and this commit
(for now) validates build-only. And the sample may run for
a duration until it asserts.
Asserts:
- ASSERTION FAIL [start_us == (aux_start_us + 1U)]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/
nordic/lll/lll_scan_aux.c:359
This will happen for small aux offset value, definitely
for the 300 us because CPU usage latency to setup such
auxiliary PDU reception on nRF51 is high due to slow CPU.
- ASSERTION FAIL [0]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/
nordic/lll/lll_scan_aux.c:592
prepare_cb: Actual EVENT_OVERHEAD_START_US = 579
This will happen due to CPU usage latencies scheduling
the radio events, due to slow CPU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Check `explorir_m_uart_transceive`'s return value in `explorir_m_init` and
return the value if not 0.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
rtc_ds3231.h only contains register definitions and bitmasks used
internally by the driver - make this header file private.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix CI issues whereby arch.arm.swap.common.no_optimizations test is
failing due to overlapping sections
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add an example west alias for automatically excluding certain platforms
when running Twister via west.
This is especially useful for excluding the 32-bit native_sim target when
running on hosts systems without a 32-bit host C library
(i.e. Linux/AArch64).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Fix compile errors in the sensor documentation for temperature
polling - extra curly braces and unused variable.
Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
Renamed the static function `rtu_tx_adu` to `modbus_rtu_tx_adu`
for naming consistency with `modbus_rtu_rx_adu`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
There is a "native" RTC driver for DS3231 now (maxim,ds3231-rtc, one of
the multiple functions implemented as MFD) so do all we can to
discourage the use of the legacy, counter-API based, driver.
Flag the compatible as deprecated.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The firmware subsystem has been around since Zephyr 4.0. Therefore,
add an entry for it in the MAINTAINERS file such that changes will
no longer go unnoticed. For now, nominate myself as its maintainer.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The Adafruit ESP32 Feather V2 is a board that uses the Feather standard
layout. It uses an ESP32-PICO v3 02 module, and includes a USB-C
connector, LiPo battery charger, NeoPixel RGB LED, and STEMMA QT
connector.
Signed-off-by: Lena Voytek <lena@voytek.dev>
Add compatibility macros to map SDMMC constants to SDIO equivalents
for STM32F4 series MCUs. STM32F4 uses SDIO peripheral with SDIO_*
constants while newer STM32F7/H7 series use SDMMC peripheral with
SDMMC_* constants.
This fixes compilation errors on STM32F4 platforms where SDMMC_*
constants are undefined:
- SDMMC_CLOCK_EDGE_RISING
- SDMMC_CLOCK_BYPASS_ENABLE/DISABLE
- SDMMC_CLOCK_POWER_SAVE_ENABLE/DISABLE
- SDMMC_HARDWARE_FLOW_CONTROL_DISABLE
Fixeszephyrproject-rtos/zephyr#94896
Signed-off-by: Shan Pen <bricle031@gmail.com>
The AT25XV021A variant is a flash variant of Atmel's AT25 family
that adds extra protections, requiring additional writes to the
device to program or erase data.
This commit adds a flash driver for AT25XV021A devices instead of
modifying (1) the existing AT45 SPI flash driver or (2) the
existing AT24/25 EEPROM driver because this variant poses
fundamental changes that affect all aspects of the driver.
Notably,
- AT25XV021A includes a second status register, and the format
and functions of the existing status register is
changed from the existing drivers.
- AT25XV021A requires executing page or chip erase commands
before writing, making it incompatible with the
existing AT24/25 EEPROM driver.
- AT25XV021A adds a software protection layer that requires
extra writes before executing program or erase commands.
Tested writing to and erasing from an AT25XV021A device. Tested
reading from an AT25XV021A device across page boundaries. Tested
chip erase function. Tested driver initialization from varying
initial hardware states.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
The `pio` value is stored in the internal `pio_rpi_pico_config` structure
that is not exposed. However, it is the first element of the structure.
Here, I convert the pointer to `pio_rpi_pico_config` into a pointer to PIO
to access this value.
Signed-off-by: Terry Geng <terry@terriex.com>
Connection manager doesn't depends on ESP32 Wi-FI AP+STA mode.
This modification fix integration of connection manager binding
in the Wi-Fi ESP32 driver.
Signed-off-by: Joel Guittet <joelguittet@gmail.com>
Add a test for the new API to query the buffered data size in the
stream_flash subsystem.
Signed-off-by: Syver Haraldsen <syver.haraldsen@nordicsemi.no>
add a wrapper function to read the number of bytes currently buffered
and pending for the next flash write operation.
Signed-off-by: Syver Haraldsen <syver.haraldsen@nordicsemi.no>
These types are useful for IoT deployments and should be available
thru the resolver interface to get the data. The SRV is especially
useful to find services on the local network when not using a dns-sd
deployment and just something like Avanhi or Bonjour.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
When resolving SRV records - the label might not be compressed so
the first entry into the net buf is the start of the name and a
period could end up at the start - ie. ".example.local" so only add
a period when the buffer is not empty.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
The enum will auto increment, so in debug the IP and DATA records are
negative numbers which initially made this look like an error, so just
push the expected good values to be positive numbers in case of a print
or something else would imply these are ok.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
There was an issue where terminating the BIG while in the
ISO connected callbacks could lead to continueing the loops
would cause access to cleared memory.
The simple solution to this is to simply prevent
bt_iso_big_terminate from terminating the BIGs while we are
processing the BIG HCI events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a choice of which RSSI type should be reported to the application
layer, packet RSSI (which stops at the noise floor) or signal RSSI
(which estimates the LoRa signal strength into the noise floor).
Signed-off-by: Jordan Yates <jordan@embeint.com>
As a first integration of the LoRa Basics Modem backend, implement the
LoRa API for the standard SX126x/SX127x chips.
Much of the logic from `lbm_common.c` is taken from the loramac-node
`sx12xx_common` implementation, but it should now be agnostic for all
LoRa RF transceivers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Import the lora-basics-modem module as an alternate backend for LoRa
and LoRaWAN, since loramac-node has been deprecated.
Support is currently limited and experimental.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the current implementation of the LoRa API using `loramac-node` to
a dedicated folder in preparation for the LoRa basics modem
implementation.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The broadcast code was attempting to read from argv[1] instead
of argv[2] that actually contains the broadcast code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add Andrew Davis (@glneo) as TI K3 Platform maintainer, Andrew is an
active collaborator and permanent employee of TI Processor SW team.
Also move myself as collaborator for K3 platforms.
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Ignore the direnv .envrc file to automatically loads and unloads
environment variables from the current directory.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is fixing configuration of mx66uw1g45g NOR when working
at 200MHz.
According to its specification, when running at 200MHz, this memory should
use a Number Dummy Cycles configuration of 20 (DC bits in CFGR2), which is
the device's default configuration.
Applying the 66MHz configuration as done today was preventing flash to run
at frequency higher than 100Mhz.
This commit doesn't solve the more generic problem of this driver which
is applying this 66MHz configuration universally, irrespective of the
frequency and the memory device, but fixes the configuration which was
reported broken today.
Providing a global change would require starting a clear split between XSPI
controller configuration an bus device configuration, which is what new
MSPI API intend to solve, so this will be tackled once this driver will be
available.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Fix copy/paste issue on XSPI_SEL macro and use HCLK5 as kernel clk.
This has no functional impact on NOR as HCLK5 is the default clk which
was used due to the copy/paste error.
Remove now useless ic3 nodes.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Rework doxygen group naming and fold "internal" Flash API into the main
Flash API group.
Also a minor fix of a missing javadoc-style comment.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
For the ULPM set, it asks for a 10ms ready time for the module.
Use k_busy_wait instead of k_msleep to ensure we wait enough clock cycles.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
The ZMS API should not unexpectedly crash the application; this commit
adds tests to check if the ZMS API can safely handle and return -EINVAL
if called with a NULL fs pointer.
This commit also adds test to confirm the return value matches the
documentation if user calls the ZMS API before ZMS is mounted
Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
Add checks on the fs pointer passed through the api before using to
avoid causing an exception
Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
zms_active_sector_free_space is documented to return -EACCES on fs not
mounted error but currently returns an usigned type size_t. This fixes
that by changing the return value into a ssize_t
Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
STM32CubeProgrammer does not support flashing in BOOT-SERIAL mode
using the device's serial number.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add a testcase to execute the samples/drivers/spi_flash on
stm32 disco kits where the external flash is accessible
in memory mapped mode : CONFIG_STM32_MEMMAP=y.
In this testcase condition, the DMA transfer is not used but memcopy.
limit to "st,stm32-Xspi-nor" compatible only.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
These macros depend on time.h (which is not included in clock.h)
and are not really kernel related, but translation from the kernel
tick representation into time_spec values.
Let's place them in timeutils with their related macros/functions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
* Fixes in code and test so it works with any expected time_t size.
* Fix test_timespec_normalize so it also tests the output of
timespec_normalize(), fixing some incorrect expected values
accordingly.
* Test: Do not force a C library in the integration platform
and do not filter by libC as it is not necessary anymore.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Since it's possible that rounding up might not always be the right thing
to do in every situation, in order to allow the application to make more
informed decisions, we created a modified timespec_to_timeout() that also
returns the remainder (or difference) between the requested time to
convert and resulting k_timeout_t. The difference is expressed as a
timespec object.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Elaborate on testing for functions that convert between timespec and
k_timeout_t.
We explicitly add tests to verify functionality in the regions of
interest, verify the semantic equivalence of specific time points.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Originally, the timespec_to_timeout() and timespec_from_timeout() tests
assumed that tv_sec and tv_nsec values divided evenly with the number of
ticks per second (CONFIG_SYS_CLOCK_TICKS_PER_SEC). However, those
assumptions broke down when testing with 32768 ticks/s .
Upon further investigation, there were additional corner cases
discovered that were not handled in an ideal or safe way.
Part of this fix involved identifying several "domains" and special
values that have semantic meaning that must be handled particularly
carefully.
Additional hidden-API constants were made to simplify the solution.
K_TICK_MIN (1)
K_TICK_MAX (UINT32_MAX-1 in 32-bit, INT64_MAX in 64-bit)
K_TIMESPEC_NO_WAIT (like K_NO_WAIT)
K_TIMESPEC_FOREVER (like K_FOREVER)
1. Converting a negative k_timeout_t
These only exist in 64-bit representation and actually encode absolute
timepoints via ticks. Since the stated purpose of the conversion
functions is to convert between durations, we must reject absolute
time points in timespec_from_timeout().
2. Converting a negative timespec
We assume that this duration means a timeout has already expired, and
round these up to K_NO_WAIT in timespec_to_timeout().
3. Due to the larger numeric space in the timespec representation,
the reverse mapping of timespec to k_timeout_t is "fuzzy". However,
K_NO_WAIT (K_TIMESPEC_NO_WAIT) and K_FOREVER (K_TIMESPEC_FOREVER) must
remain semantically equivalent. The previous implementation also held this
to be true, but the test cases are a bit clearer about it now.
4. Also, due to the larger numeric space in timespec representation,
there was a special requirement to round up to the nearest tick
boundary for any timespec in the strictly exclusive range
(K_TIMESPEC_NO_WAIT, K_TIMESPEC_MAX). We must round up, since
a) rounding down to K_NO_WAIT is most certainly not representative
of a non-zero finite duration delay
b) the kernel operates on tick boundaries
5. Above the K_TIMESPEC_MAX boundary, which is the highest possible
timespec that can be represented by a tick, and specifically in the
64-bit timeout representation, there is a domain that cannot be
rounded up to K_TIMESPEC_FOREVER and should always be rounded down to
K_TIMESPEC_MAX.
This is to ensure that finite durations remain finite (even if
they are beyond the heat death of the universe).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Define additional constants and macros for converting between timespec
objects and k_timeout_t.
There are four semantically important durations identified with new
constants identified via '.
1. K_NO_WAIT / K_TIMESPEC_NO_WAIT'
* duration of zero
2. K_TICK_MIN' / K_TIMESPEC_MIN'
* minimum number of ticks strictly greater than K_NO_WAIT
3. K_TICK_MAX' / K_TIMESPEC_MAX'
* maximum number of ticks strictly and semantically less than K_FOREVER
4. K_FOREVER / K_TIMESPEC_FOREVER'
* the familiar non-expiring number of ticks (i.e. infinity)
With these definitions, there are 3 meaningful regions for conversion
between timespec and k_timeout_t representation:
1. < K_TIMESPEC_NO_WAIT (i.e. a negative timespec)
* should be rounded up to K_TIMESPEC_NO_WAIT
* < K_NO_WAIT in ticks is an absolute time point in 64-bit
representation should no be permitted in the affected conversion
routines, as they are explicitly for converting time durations rather
than absolute time points.
2. K_TIMESPEC_NO_WAIT < x < K_TIMESPEC_MAX
* should be rounded-up to the next tick boundary
* must be represented as the minimal non-zero duration in ticks
3. K_TIMESPEC_MAX <= x < K_TIMESPEC_FOREVER
* must be represented as the maximum expiring duration in ticks
* should be rounded-down to K_TIMESPEC_MAX
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The IWDG4 is on the APB3 bus on STM32MP2x SoCs. When the system is
in debug mode, the watchdog should be frozen to prevent it from
expiring and resetting the system during debugging sessions.
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Like the H7x series, the MP2x series has a WWDG1 peripheral in the APB3
bus. The MP2 has the same LL function to freeze the watchdog in debug
mode.
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Add more apsta_mode configurations for frdm_rw612
and rd_rw612_bga.
Add overlay file to set apsta_mode configurations.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Introduce a dedicated Kconfig option for apsta_mode example to
allow more flexible configuration in the application layer.
This change helps make apsta_mode more generic and easier to
integrate across different vendor platforms.
Add compile-time assertions for the following macros:
CONFIG_WIFI_SAMPLE_AP_SSID
CONFIG_WIFI_SAMPLE_SSID
CONFIG_WIFI_SAMPLE_AP_IP_ADDRESS
CONFIG_WIFI_SAMPLE_AP_NETMASK
Default to empty string ("") if the following
two macros are not defined:
CONFIG_WIFI_SAMPLE_AP_PSK
CONFIG_WIFI_SAMPLE_PSK
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
EM4 wakeup interrupts are dedicated interrupts tied to specific
pins that enable wakeup from EM4 through reset. Add support
for using these interrupts instead of the regular interrupts when
the GPIO_INT_TRIG_WAKE flag is set.
Since it's not possible to tell what pin is associated with what
EM4WU interrupt at runtime, the driver must store a mapping table
sourced from device tree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add EM4 wakeup capable pin mapping to GPIO port node. Pins
capable of EM4 wakeup have dedicated interrupt flags.
Add EM4 as a soft-off power state that is disabled by default.
Marking it as disabled allows users to enter it with
`pm_state_force()`, while preventing the power management
subsystem from selecting the state automatically.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Implement the function bt_cap_initiator_broadcast_foreach_stream that
allows users to iterate on all BAP streams in a BAP broadcast source.
This can be used to easily get references to other broadcast streams in
the same group.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check that SegN is not 0. SegN = 0 is invalid as the first segment is
sent in Transaction Start PDU.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When the application is executed in external flash, the read operation
cannot be in indirect mode but with memcopy.
Note that writing or erasing the external flash being executed
is not possible during the execution.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Cancelling the alarm needs to reset the callback to NULL, else setting
an alarm subsequently will never work.
chan_id parameter being unused, using ARG_UNUSED() relevantly then.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
There are 14 TIMG and 2 TIMA, all which can be either a counter or a pwm,
so let's fix the names to avoid ambiguity and enforce uniqueness.
Rule applied here being:
tim<g/a><n>: tim<g/a><n>@<address> {
...
counter<g/a><n>: counter<g/a><n> {
...
};
pwm<g/a><n>: pwm<g/a><n> {
...
};
};
It will be much easier then once get the 16 timer nodes included.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Refactors the TX of the unicast server. This commit effectively
copies the TX approach of the unicast client sample, to make
the sample more similar.
This changes the TX to be based on the number of complete
packets event (which results in free'ing the buffer), instead of
a timer. This completely ensures that we do not skip any sequence
numbers which may be rejected by the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use a temporary variable to store and compare the reference time
instead of calling the time function multiple times,
which may lead to slight mismatches in comparison due to timing drift.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
While these are not expected to be used by applications in normal
scenarios, they are still public and document them can be helpful in
non-normal scenarios.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
A limitation on current HW shadow stack implementation for x86 is that
more than one thread stack can't share the same variable name, even if
they are static. To avoid skipping useful tests, for now, while this
limitation holds, change the name of the stack variable.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
A limitation on current HW shadow stack implementation for x86 is that
more than one thread stack can't share the same variable name, even if
they are static. To avoid skipping useful tests, for now, while this
limitation holds, change the name of the stack variable.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
- No more need for special IRQ shadow stacks - just reuse the one
created for z_interrupt_stacks;
- Add the linker sections for the pairs of stack/shadow stack;
- Support shadow stack arrays.
Last item was a bit challenging: shadow stacks need to be initialised
before use, and this is done statically for normal shadow stacks. To
initialise the shadow stacks in the array, one needs how many entries it
has. While a simple approach would use `LISTIFY` to them do the
initialization on all entries, that is not possible as many stack arrays
are created using expressions instead of literals, such as
`CONFIG_MP_MAX_NUM_CPUS - 1`, which won't work with `LISTIFY`.
Instead, this patch uses a script, `gen_static_shstk_array.py` that
gathers all needed information and patches the ELF to initialize the
stack arrays. Note that this needs to be done before any other operation
on the ELF file that creates new representations, such as the .bin
output.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This patch modifies thread stack macros (such as K_KERNEL_STACK_DECLARE
or K_KERNEL_STACK_ARRAY_DECLARE) to also create a HW shadow stack (when
CONFIG_HW_SHADOW_STACK=y), as well as define a pairing between the
thread stack (or thread stack array) and the shadow stack (or shadow
stack array).
This pairing, which currently is simply an array of pairs (stack,
shadow_stack) is searched during thread setup to find the corresponding
shadow stack and attach it to the thread. If linear search on this array
proves to be a performance issue, the actual structure can be revisited.
To define the size of the shadow stack for a given stack, the stack size
is used. A new Kconfig, CONFIG_HW_SHADOW_STACK_PERCENTAGE_SIZE is used
to define how big the shadow stack is compared to the stack. Note that
this size is in *addition* to the stack size. To avoid some shadow
stacks becoming too small, CONFIG_HW_SHADOW_STACK_MIN_SIZE is used to
define a minimum size. Note that after this size is defined, platform
restrictions on the size of the shadow stack are still applied.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
New cmake list, `post_build_patch_elf_commands`, will be prepended to
`post_build_commands` one, effectively making these commands to run just
after the ELF is created. It's particularly useful for operations that
patch the ELF generated, before other representations of it (such as
.bin) are created.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Test could trip shadow stack protections instead of normal stack
sentinel, thus requiring special handling for this case. Just avoid this
test instead, if CONFIG_HW_SHADOW_STACK=y.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
It seems that, at least on tests, it's common to call k_thread_create()
on a thread multiple times. This trips a check for the CET shadow stack
- namely, set a shadow stack on a thread which already has a shadow
stack.
This patch adds a Kconfig option to allow that, iff the base address and
size of the new shadow stack are the same as before. This will trigger a
reset of the shadow stack, so it can be reused.
It may be the case that this behaviour (reusing threads) is more common
than only for tests, in which case it could make sense to change the
default - in this patch, is only true if ZTEST.
Even if being enabled by default becomes the reality, it would still
make sense to keep this option - more conscious apps could avoid the
need for the shadow stack reset code altogether.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
So that kernel created threads can use shadow stacks. Note that
CONFIG_X86_CET_SHADOW_STACK is abandoned in favour of
CONFIG_HW_SHADOW_STACK.
This means change some types, functions and macro throughout shadow
stack code.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
In order to allow kernel created threads (such as main and idle threads)
to make use of hardware shadow stack implementation, add an interface
for them.
This patch basically provides an infra that architectures need to
implement to provide hardware shadow stack.
Also, main and idle threads are updated to make use of this interface
(if hardware shadow stacks are enabled).
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Some SoCs may need to do some preparatory work before changing the
current shadow stack pointer (and thus, currently used shadow stack).
This patch adds a way for that, shielded by a Kconfig
(CONFIG_X86_CET_SOC_PREPARE_SHADOW_STACK_SWITCH).
As currently only 32 bit SoC may use this, support is only added to the
32 bit code.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Most notable difference on base support is the need to keep the shadow
stack tokens, which are 8 bytes, 8 bytes aligned. Some helper macros are
used for that.
Also, an `ssp` entry is added to the task state segment (TSS).
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Currently, it's permitted to have threads that don't have a shadow
stack. When those are run, shadow stack is disabled on the CPU. To
identify those, the thread `shstk_addr` member is checked.
This patch adds an optional check, behind
CONFIG_X86_CET_VERIFY_KERNEL_SHADOW_STACK, that checks if an outgoing
thread has this pointer NULL with shadow stack currently enabled on
the CPU, meaning a 1) bug or 2) some attempt to tamper with the pointer.
If the check fails, k_panic() is called. Note that this verification is
not enough to guarantee `shstk_addr` can't be tampered with. For
instance, it only works on a running thread. Ideally, all threads should
be shadow stack capable, so a missing `shstk_addr` would simply be a
hard fault, but that is still to come.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Main peculiarity is that if an exception results in current thread being
aborted, we need to clear the busy bit on the shadow stack on the swap
to the new thread, otherwise future exceptions will fail when trying to
use a busy shadow stack.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Nested interrupts are supported, on the normal stack, by creating a
stack whose size is a multiple of CONFIG_ISR_DEPTH, and updating the
pointer used by Interrupt Stack Table (IST) to point to a new base,
inside the "oversized" stack.
The same approach is used for the shadow stack: shadow stack size is
multiplied by CONFIG_ISR_DEPTH, and the pointer to the stack on the
shadow stack pointer table is update to point to the next base.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
For IRQs, shadow stack support a mechanism similar to the Interrupt
Stack Table (IST) for x86_64: a table, indexed by the IST index, pointing
to a 64 byte table in memory containing the address of seven shadow stacks
to be used by the interrupt service routines.
This patch adds support to this mechanism. It is worth noting that, as
Zephyr may exit from an interrupt by going to a different thread than
the one that was interrupted, some housekeeping is done to ensure that
the necessary shadow stack tokens are on the right shadow stack before
return from the interrupt.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Shadow Stack is one of the capabilities provided by Intel Control-flow
Enforcement Technology (CET), aimed at defending against Return Oriented
Programming.
This patch enables it for x86_64 (32-bit support coming in future
patches):
- Add relevant Kconfigs;
- Shadow stacks should live in specially defined memory pages, so
gen_mmu.py was updated to allow that;
- A new macro, Z_X86_SHADOW_STACK_DEFINE, added to define the area
for a shadow stack;
- A new function, z_x86_thread_attach_shadow_stack(), added to
attach a shadow stack to a never started thread;
- locore.S changed to enable/disable shadow stack when a thread
using it comes in/out of execution.
As not all threads are currently shadow stack capable, threads that do
not use it will still run with shadow stack disabled. Ideally, at some
point in the future, all threads would use the shadow stack, so no need
to disable it at all.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Add code to enable it and sprinkle `endbr64` on asm code, where needed.
Namely, IRQs and excepts entrypoints.
Finally, tests added to ensure IBT behaves sanely.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Indirect Branch Tracking (IBT) is one of the capabilities provided by
Intel Control-flow Enforcement Technology (CET), aimed at defending
against Jump/Call Oriented Programming.
This patch enables it for x86 (32-bit, 64-bit support coming in future
patches):
- Add relevant Kconfigs (everything is behind X86_CET);
- Code to enable it;
- Enable compiler flags to enable it;
- Add `endbr32` instructions to asm code, where needed.
Points in the code where an indirect branch is expected to land need
special instructions that tell the CPU they are valid indirect branch
targets. Those are added by the compiler, so toolchain support is
necessary. Note that any code added to the final ELF also need those
markers, such as libc or libgcc.
Finally, tests added to ensure IBT behaves sanely.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This adds exception handling of control protection exception
in fatal code.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Commit f9168ae464 made all non-cached memory
loadable by default.
However as nocache memory is typically used for reserving larger buffers to
be shared between peripherals, this comes at fairly large cost towards ROM
usage.
This commit creates two distinct sections for both loadable and
non-loadable nocache memory sections.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The current initialization sequence enables the I3C controller before
setting the controller information, which can result in improper setup
and cause the controller to not function as expected.
Fix the initialization order by ensuring that the controller information
is set prior to enabling the controller.
Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Signed-off-by: Balanakakamal V <balanakakamal.v@amd.com>
Commit df0f74d491 added a shell command to be
able to print out the partitions. However the label property is optional.
Print both the name and label if available.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This refines log message in udc_common.c, including:
1. Add address of allocated net_buf info into udc_ep_buf_alloc log so
that net_buf create/destroy can be easily monitored with calls to
udc_ep_buf_alloc and udc_buf_destroy.
2. Add ep info into udc_ep_buf_alloc log on failure.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Those memories should be disabled by default and enabled
at application level.
Incidentally, fix the way Kconfig symbol is enabled as
we should not parse status of ramcfg, but status of enabled
memory nodes.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
The uart_sam0_irg_rx_ready() function always returns true, even if
interrupt is disabled. This happens because the function do not
evaluate if the interrupt is enable of not. This fixes the issue
by adding the missing check.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The gpio_int_trig enum did not enumerate all possible combinations
of flags after the addition of the GPIO_INT_WAKEUP flag.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The GPIO_INT_WAKEUP flag is available in the binding header,
but was not propagated from dt_flags in the interrupt_configure_dt
function. Allow GPIOs to be declared as wakeup sources in dts
by propagating the flag.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Since 45a3d31, the GPIO_INT_WAKEUP flag has been available in
the binding header. Update the mask to include it.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Instead of add BT_UUID_BROADCAST_AUDIO_VAL for either BAP or
CAP, we now only do it one place (in BAP). This can now be done
since the default_source.broadcast_id was recently added.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a broadcast_id field in broadcast_source so that it can be
lookup later, which is useful for doing broadcast assitant
procedures on a local broadcast source.
The broadcast ID is now created at the same time as the
broadcast source(s), instead at the time of retriving
the advertising data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Follow ROMABLE_REGION from include/.../arm/cortex_m/scripts/linker.ld
This enables UF2 images to be created for RAM-only apps on RP2350.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Implemented siwx91x_set_rts_threshold and siwx91x_get_rts_threshold
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Apply the same modifications made to the ZynqMP's memory
regions to the cortex_r8_virtual SoC which was mainlined
while the fixes for the ZynqMP were being developed
(minus the OCM mapping, as there's no indication that this
type of memory was considered).
The cortex_r8_virtual appears to be a stripped down copy
of the old qemu_cortex_r5 codebase, therefore, the duplicated
MPU regions have the same flaws as qemu_cortex_r5 or any
actual ZynqMP-based target for that matter.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Overhaul the MPU region definitions that are being
configured when the MPU is set up:
- drop local attribute definitions in favor of those
already provided in arm_mpu_v7m.h
- actually tie the RAM region to the device tree
- set up a (potentially overlapping) R/O region for
.text and .rodata, which hasn't existed so far
- Consider XIP
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Remove the universal, unconditional declaration of the RAM area
at the SoC level, due to:
- the hardcoded base address 0 overlapping the exception vectors,
the ATCM and the BTCM areas.
- the availability of the BTCM not being guaranteed unconditionally
(config pin dependant)
- the possibility of having a 'black hole' between the ATCM and
the BTCM depending on the operating mode of the R-cores cluster,
which leads to a part of the text section being unavailable
- qemu not properly implementing the configuration-dependant
behaviour of the ATCM and BTCM areas.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Declare the sram0 area for this board to start at 0x4000000
and to be 64MB in size. The base address is the lowest possible
multiple of 64MB which doesn't have its base address at 0,
therefore preventing the mixed use of regular RAM and the
ATCM/BTCM and the possible issues of having a 'black hole'
between the ATCM and BTCM areas or the BTCM being completely
disabled.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Expand the RAM area beginning behind the BTCM to allow the use
of a 64MB SRAM area starting at 0x4000000, which is the lowest
possible 64MB area with a non-zero start address that doesn't
overlap with the ATCM and BTCM memory areas.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Move the unmodified sram0 memory area declaration to this board's
device tree due to its removal from the SoC device tree.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Move the unmodified sram0 memory area declaration to this board's
device tree due to its removal from the SoC device tree.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Provide toolchain-specific implementations for the new functions
added in d77b58a, because the default ones end up with build failures.
As the MWDT toolchain doesn't support different combinations of
compilers and linkers, there's no need to pass any linker properties
from the compiler, at least for the time being. Moreover, the default
implementation of compiler_set_linker_properties() uses the compiler
flag (--print-libgcc-file-name) that doesn't make any sense for MWDT.
Therefore, provide an empty implementation of the function.
The default implementation of toolchain_linker_add_compiler_options()
doesn't cause any issues for now, but it's still better to replace
it with the passthrough implementation borrowed from ld/lld.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Check that the buffer length of the received advertising data is less
than reported TotalLength in Transaction Start PDU.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Because the EC host command with SHI/SPI backend is timing sensitive, it
required the CPU to response the SHI interrrupt as soon as possible.
This commit re-arranges the default interrupt priority by:
1. keep the SHI's interrupt priority to 1.
2. Decrease the priority of the other peripherals by 1.
(i.e. increase the priority `value` by 1)
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Move Kconfig symbol setting to 'Kconfig.defconfig' file to fix
compliance check "defined without a type" warning.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Change BoardYml compliance check from using get_module_setting_root()
to load and parse module.yml directly.
get_module_setting_root cannot be used directly with module.yml.
Instead adjust the code so that the module.yml file is loaded locally
and the dts_root setting is extracted from the dictionary.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Adds support for outputting details on sysbuild Kconfigs for use
with the documentation Kconfig lookup tool
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When compiling, the following warning occurs:
Warning (simple_bus_reg): /soc/sai1@452005804: simple-bus unit address
format error, expected "52005804"
Looking at table 3 in the reference manual[1] for the stm32n6 it seems that
the sai1_a address simply had a typo, where a "4" was added in front of the
correct address.
Fix the typo.
[1] RM0486 Rev 2: https://www.st.com/resource/en/reference_manual/rm0486-stm32n647657xx-armbased-32bit-mcus-stmicroelectronics.pdf
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Use CMAKE_C_COMPILER_TARGET to allow clang to correctly determine
the runtime library for the target architecture.
Otherwise, the default runtime library will be selected.
Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
Multiple handlers were setting status/reason in slightly different ways,
but the code was mostly trying to do the same. Put this code in the
handler class and implement in one place.
This fixes an issue where in some cases qemu failures were not handled
correctly and status of cases was not updated, leading to multiple
failures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The misra severity is being treated as relevant to whether a guideline
should be followed or not in the context of the zephyr project.
Remove from the table, the MISRA severity can be looked up in many
public places or in the MISRA coding guielines themselves.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Honor the --flash-before option when using a serial-pty script with
--device-serial-pty <script> and start the script only after
flashing the device.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
While reasonably straightforward, ensure the signature of the
comparator_callback_t is properly documented.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Modify values in audio.conf to reduce memory usage.
Most notably disabling logs reduced the FLASH requirements.
Ideally the shell works as expected without debug logs, but
there are far too many profiles and services to verify them all.
All the log options are left in audio.conf so they can easily be
re-enabled when needed.
Memory before this change:
Memory region Used Size Region Size %age Used
FLASH: 1018512 B 1 MB 97.13%
RAM: 423146 B 448 KB 92.24%
IDT_LIST: 0 GB 32 KB 0.00%
Memory after this change:
Memory region Used Size Region Size %age Used
FLASH: 791308 B 1 MB 75.47%
RAM: 369090 B 448 KB 80.46%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add ST nucleo_h503rb board to I2C driver i2c_target_api test.
The board configuration make it testing transfer of 300 bytes data
to ensure the ReloadMode of the SoC I2C controller nicely handles
exchanges of more than 256 byte.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add CONFIG_I2C_TEST_DATA_MAX_SIZE to I2C driver i2c_target_api tests
to set the max data size of tested I2C transfer. The effective I2C
transfer data size depends on that value and the size of the
EEPROM defined in the board DTS file.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add configuration options CONFIG_I2C_RTIO_LOOPBACK_DATA_READ_MAX_SIZE
and CONFIG_I2C_RTIO_LOOPBACK_DATA_WRITE_MAX_SIZE to set the number
of bytes exchanged during I2C transfers in I2C driver rtio_loopback
sample.
Add also a bit of verbosity when exchanged data are corrupted.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
System designers may want to change the behavior of assert_print, such as
storing the message off into retained RAM and instantly rebooting. Adding
__weak allows customatization
Signed-off-by: Clay Wynn <cwynn@meta.com>
The various DT helpers benefit from being shown in their respective
device sections as it's expected that some users will be looking there
rather than generic Devicetree help pages.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
At the moment, "blinky" sample can be built for Pico 2 W, but it doesn't
work as expected because the board has no LED connected to GPIO.
rpi_pico2.dtsi is a common dtsi, used by Pico 2 and Pico 2 W, it
shouldn't contain board specific stuff (like LEDs).
So, include "rpi_pico-led.dtsi" directly in Pico 2 board dts.
Signed-off-by: Andrei Lalaev <andrey.lalaev@gmail.com>
when compiling net-samples then the required gpio is disabled.
the installed vsc8541 phy requires gpio for reset. additionally,
we enable NET_L2 when network is enabled.
Signed-off-by: Sven Ginka <s.ginka@sensry.de>
when compiling net-samples then the required gpio is disabled.
the installed vsc8541 phy requires gpio for reset. additionally,
we enable NET_L2 when network is enabled.
Signed-off-by: Sven Ginka <s.ginka@sensry.de>
Rather than keeping limits defined in a common way, controllable with one
Kconfig, move posix definitions out of the standard common libc header
`<limits.h>` into `<zephyr/posix/posix_limits.h>`, not controlled with
Kconfig. Additionally, include `<zephyr/posix/posix_limits.h>` wherever
an in-tree C library includes a custom `<limits.h>`.
Note: the only reason any of the `<limits.h>` files exist, is to define
the POSIX limit PATH_MAX without declaring `_POSIX_C_SOURCE`, which would
be necessary according to the standard, and each of the custom `<limits.h>`
files is nearly identical in this regard.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
In order to reduce conflicts with limits defined in external C libraries,
move Zephyr's POSIX limits from posix_features.h to limits.h in the
common C library sources.
In order to give the implementation better control over where POSIX
limit definitions originate, use `#include_next <limits.h>` to pull in
the corresponding header of the C library, and provide a non-user
configurable option `CONFIG_TC_PROVIDES_POSIX_LIMIT_DEFS` that may be set
in order to ensure that the C library version of POSIX limits are used.
Note: this may mean that runtime invariant values are inconsistent with
parts that are actually in use within Zephyr, so applications are
encouraged to use `sysconf()` with external C libraries that implement
parts of the POSIX standard to query system configuration values at
runtime.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Fix building with Privacy feature without enabling LE
Encryption support. This should allow being either Observer
or Broadcaster role with Privacy features.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a bullet point for this new, relatively important deviation from
the official specification.
Also, advertise the Zephyr-specific zephyr/psa/* header files as they
are related and probably need more attention from end users.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Instead of literally having 0x in the format string, use the %# flag
character so the printf implementation adds the 0x for us.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
nrf54l15dk/nrf54l15/cpuapp already covers the non-emulated case as
part of the integration_platforms.
Having ophelia4ev/nrf54l15/cpuapp does not bring any additional value
and increases CI load, so remove it.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add a migration guide entry regarding the modification of the UID size
as it is by default a breaking change.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
77f19eb1b5 made ZMS depend on
FLASH_MAP.
Enable that Kconfig option in the ZMS Kconfig overlay file.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add test scenarios for the newly-added CONFIG_SECURE_STORAGE_64_BIT_UID
enabled with both the ZMS and Settings backends.
They don't test backward compatibility but it makes sure that secure
storage compiles and works fine with this configuration.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Cast the UIDs to unsigned long when they are 32 bits.
This allows to use a single %l length modifier instead of the double
one for long long.
Certain printf implementations only support the former and not the
latter length modifier, so this has the advantage to work with them
now that the UIDs are 32-bit by default.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Make the storage UID type 32-bit long.
This makes it more convenient to use those UIDs as storage entry IDs
when storing the entries to NVM.
The previous 64+ bits UIDs made it incovenient to use them as such.
As Zephyr defines UID ranges to be used (see
e.g. `zephyr/psa/key_ids.h`), this guarantees that all the UIDs will
fit within the 30 bits reserved for them.
The secure storage ITS implementation API is changed to take
`psa_storage_uid_t` separately so the implementation can check
that no forbidden bits are set before they are packed into
`secure_storage_its_uid_t`.
This change breaks backward compatibility because
`secure_storage_its_uid_t`, which is used both as part of the additional
data for authentication and for generating encryption keys, changes
size from 12 to 4 bytes.
For users wanting to preserve backward compatibility (for example when
upgrading an existing installation to a newer Zephyr release) or that
for some reason want to use a 64-bit `psa_storage_uid_t`, the Kconfig
option CONFIG_SECURE_STORAGE_64_BIT_UID is added. When enabled, it
makes the implementation behave the same as previously and compatibility
with existing entries is preserved. This was tested manually.
Fixeszephyrproject-rtos/zephyr#86177.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Versions for specific modem modules don't include versions in their
headers, and the chat module did not even define a group.
This commits updates most modem modules to include versions in
their headers. Specifically, the following modules have their
versions set to 1.0.0, as these should no longer be marked
experimental:
- modem_chat
- modem_cmux
- modem_pipe
- modem_pipelink
- modem_ppp
- modem_ubx
Though the modem_ubx was recently refactored, it is tested in CI
and is implemented by two drivers, and has been present since
release 3.7, so it is not marked as experimental.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Remove the EXPERIMENTAL label from the MODEM_MODULES and update
API version to 1.0.0. These modules are fully tested and widely
used, and have been present for 2 years.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Instead of using mdio bus for getting link state, only get it in the
monitor and save it off for get rate api implementation to use
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Two issues are being simultaneously address in this commit:
Issue 1:
Current issue is that zephyr boot / init is slow because it is blocked
by the phy ksz8081 init doing autonegotiation which can take on the
order of a few seconds.
Fix by now doing autonegotiation in the monitor handler instead of in
the cfg link call. The cfg link call will now only set the ANAR register
and a software flag to let the monitor handler know whether or not to
redo the autonegotiation sequence.
Issue 2:
The ksz8081 phy currently does not link up ever on cold boots on the NXP
RT platforms due to regression on mainline. My understanding of why is
not clear, but I found that re-setting the RMII override bit by the time
the monitor work handler runs with the change to fix the first issue,
makes the link come up.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
`BOOT_ENCRYPT_ALG_AES_128` and `BOOT_ENCRYPT_ALG_AES_256` are used in
`share/sysbuild/image_configurations/BOOTLOADER_image_default.cmake`
They were first introduced in commit 9a1fe30
Signed-off-by: MA Junyi <mjysci@live.com>
Replace hard-wired constant "2" with CONFIG_I2S_INIT_BUFFERS in the loop
where audio data is read and written.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Modify DMIC channel mapping (req_chan_map_lo) to account for physical
1:1 mapping between logical channel numbers and physical channel space.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Reorganise Kconfig fragments (prj.conf, boards/*.conf). Rename
mimxrt1170_evk@B/mimxrt1176/cm7 fragments to
mimxrt1170_evk/mimxrt1176/cm7. Change Kconfig defaults for SAMPLE_RATE
and I2S_INIT_BUFFER.
This change is meant to reduce the length of target-specific
configuration, as some of the settings are duplicated across targets.
Also, with the inclusion of the sine wave vector, the default sample
rate of this sample changed to 16 kHz.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Use BLOCK_SIZE instead of the test 16 kHz sine wave length. Add a build
check so that BLOCK_SIZE doesn't overflow the test sine wave buffer.
This accounts for situations where the sample queue can't be big enough,
mainly when it doesn't fit in the device's SRAM and the count of samples
queued will be less. As the test sine wave vector contains ~42 periods,
it can be truncated.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Move mem_slab (audio queue) to an uncached region with __nocache.
On platforms with data cache (such as platforms with the Cortex M7
core), it's desirable to have the audio data in an uncached region, so
that all data is committed in the selected location before DMA transfers
are triggered.
Playback problems observed on mimxrt1170_evk/mimxrt1176/cm7 before this
was done.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add Kconfig symbol USE_CODEC_CLOCK. Modify configuration for supported
boards.
This change enables to adjust the position of both the codec and I2S
peripheral on the I2S bus.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add tearing effect configuration of the spi display. The falling edge
of the tearing signal is chosen because the spi bandwidth is lower than
the display refresh rate at 60fps.
Signed-off-by: Christian Rask <christianrask2@gmail.com>
Add tearing effect support for better display synchronization. If
tearing effect is configured in the mipi_dbi device, the display
controller configures its tearing effect register.
Display orientation configuration is updated to also rotated the
direction of the display pixel vertical scanline, such that scan order
matches the display orientation.
Signed-off-by: Christian Rask <christianrask2@gmail.com>
Add tearing effect support for better display synchronization. This
allows users to configure an external interrupt on falling/rising edges
of the gpio connected to the display controllers tearing effect pin.
See dt-bindings/mipi_dbi/mipi_dbi.h for details of how this works for
mipi_dbi display interfaces.
Signed-off-by: Christian Rask <christianrask2@gmail.com>
The error code instead of `BTP_STATUS_FAILED` of the function
`bt_le_ext_adv_create()` should be returned.
Returns the error code returned by `bt_le_ext_adv_create()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add `LOG_ERR()` to log all reasons if status is `BTP_STATUS_FAILED`.
Add `LOG_DBG()` to log the excution result of the BTP commander.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The payload length saved in command header should be changed from CPU
endian to little-endian.
Use `sys_cpu_to_le16()` to fix the issue.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add command `BTP_GAP_BIG_CREATE_SYNC` to create BIG sync establishment.
Add event `BTP_GAP_EV_BIG_SYNC_ESTABLISHED` to notify the event that
the BIG sync is established.
Add event `BTP_GAP_EV_BIG_SYNC_LOST` to notify the event that the BIG
sync is lost.
Add event `BTP_GAP_EV_BIS_DATA_PATH_SETUP` to notify the event that
the data path of the BIS is setup.
Add event `BTP_GAP_EV_BIS_STREAM_RECEIVED` to notify the received BIS
stream data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Change the compatible of CPU core for qemu_rx, rx130 and rx261
target accroding to the change of dt-binding for rx cpu core
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
The RXv2, RXv3 feature with a configuration to be able to relocate
the exception vector table by setting the extb register in the
CPU, this commit support to enable the config and code handling
for it
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Adding bindings for rx cpu core version and remove the redundant
compatible in the qemu_rx and rsk_rx130 boards
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
The nrfs_gdpwr driver has a two stage init, which requires tracking
an "expected" state of the power domain, to be applied once the
ipc service needed to control the power domain is ready. This was
tracked with the "off" member of struct domain_data.
So, "off" was initialized to false, but, should actually be
initialized to true, since by default, if nothing needs the power
domain, it should be turned off when ipc service is ready.
To fix this, rename "off" member to "on" and adjust logic.
Additionally, define the correct struct domain_data in the
DOMAIN_DEFINE() macro. Can save 2 bytes. This did not cause any
issue since we typecast it anyway, and its size is large enough.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
No need to toggle reset line manually, use the standard reset API.
This improves code searchability and aids debugging.
Requires f2f496df84 to make sure reset
deassertion is waited for.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Fix compilation issue in test overlay without pll
like hse_8_bypass.overlay and hsi_8.overlay
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Update Kconfig dependencies in mbedTLS and logging backend to use
OPENTHREAD instead of NET_L2_OPENTHREAD.
Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
Fix prepare pipeline processing of overlapping events by
including ticks_at_expire value to uniquely identify
overlapping events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix long standing bug in processing resume events that cause
prepare pipeline overflow due to incorrectly enqueueing up
preemptor events as duplicate events in the pipeline where
being aborted before currently active event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce prepare being deferred due to previous events
desire to continue. In such case the deferred prepare param
will have the defer flag set.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Disable connection event continuation on overlap with same
connection's next event. This implementation has bugs and
needs to be fixed in subsequent commits.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix stuck forced continuation of connection event under high
throughput scenario. At near supervision timeout the force
flag is set, but in the next connection event if full
connection interval is used for data transmission and a
subsequent request to abort happens it was not honoured
causing the tx-rx chain to keep continuing until supervision
timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix window widening on connection update to current window
widening periodic at the instant, and use new periodic
window widening for subsequent new connection interval.
Relates to commit 247037bd3e ("Bluetooth: Controller: Fix
incorrect elapsed events value").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix drift compensation applied late under high throughput at
after the instant has passed for a connection update.
Workaround test failures due to Zephyr Controller scheduling
overlap causing Periodic Advertising Sync timeouts, ACL
connection failed to be established or Controller assertion
when having latency at the CIS setup instant.
Workaround by using `-start_offset` to ensure that the ACL
established does not overlap the sink being established.
Relates to commit 5f852998d0 ("tests: bsim: Bluetooth:
Workaround Zephyr Controller scheduling overlap").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Unlike legacy Zephyr Controller's double headed Tx queue
linked list, the new split Zephyr Controller's new LLCP does
not place a control PDU at the head of the Tx queue causing
control PDUs to be delayed on air.
Pause the data enqueue until pending PDUs are transmitted
across before enqueuing LE Connection Update Ind PDU, and
thereafter resume other PDUs being enqueued again.
There can still be connection timeout if enqueued PDUs are
not being transmitted/acked during repeated retransmissions.
Updated bap_unicast_audio_acl_disconnect test to not use
random seed, to be similar to unicast_client test; to get
it to pass without overlapping state/roles casing connection
failed to be established after the changes in this PR.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix LLCP to use event_counter in the current event to
compare instant when trying to check instant passed on
reception of PDU with instant.
Fixes regression in commit e3e410aeed ("Bluetooth: Controller:
Fix LLCP event_counter value used during prepare").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Make the throughput test to fail when increasing Tx buffers
that will delay a LE Connection Ind PDU from being
transmitted on air due to previously queued Data PDUs.
Unlike legacy Zephyr Controller's double headed Tx queue
linked list, the new split Zephyr Controller's new LLCP does
not place a control PDU at the head of the queue causing
control PDUs to be delayed on air.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add connection parameter update to throughput test to cover
any connection timeout performing connection update while
subjected to high throughput scenarios.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Move the declaration code to locality of reference and be
consistent in how the code pattern is, related to calling
LLL disable.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Single timer use needs additional event overhead to start
radio to ensure the software switch implementation executing
in radio completion ISR can correctly set the tIFS switching
after a maximum radio ISR latency.
The latency value shall be the used additional overhead so
that there is no spurious tIFS switch before radio ISR
executes.
The additional event overhead value is not considered in the
event overhead check.
Relates to commit 37bf99eee7 ("Bluetooth: Controller: Fix
radio_tmr_start_us for single timer use").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix an assertion detecting delayed prepare establishing an
ACL connection due to scanner or advertiser not disabled
immediately when scheduling the first connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix assertion on scan disable observed in BabbleSIM audio
tests due to clearing of pending radio IRQ under race
conditions between scanning being stopped by application
and scanning stopped on central connection setup.
irq_enable/disable is not needed either as radio_isr_set
is always called from Radio or LLL execution context which
are co-operative with each other at same execution priority.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing radio tmr status reset on radio_disable call,
without this which disables PPI/DPPI caused under race
conditions the radio to transition into Tx or Rx state and
put the Controller's state out of sync with the Radio
peripherals internal state. The symptoms being that the
Central role was not transmitting in the next interval;
also, caused the defer iterations to reach maximum events
being enqueued in the pipeline, and manifesting as large
CPU overheads in redundant prepare of deferred events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adjust the RFP runner platform check to properly handle Darwin or Windows
and skip setting a default RPF port on those two platforms.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
I believe there is some confusion about what this function does. This
function is doing some type-bending, so it's extra important to document
it.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Unbound feature in IPC with cpusys will be enabled by default.
This is needed to enable IPC link renewal.
If unbound is not needed then it can be disabled in overlay,
sysctrl will detect if it is present.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Save the air_mode to SCO connect object.
Add a structure `struct bt_conn_sco_info` to return the SCO conn info.
Return SCO info through `struct bt_conn_sco_info` when calling the
function `bt_conn_get_info()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The PAN B511 evaluation board is a development tool for the
nRF54L15 from Nordic Semiconductor. Due to marketing reasons
the naming was adjusted from panb511 to panb611.
Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
The debug connector designation for JTAG/SWD is J55. J16 is for OPENSDA
"OPENDBG INTERFACE JTAG CONNECTOR"
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
The computation of paths to crtbegin.o and crtend.o must be delayed until
after the compiler_file_path function has been defined. The
toolchain_linker_finalize function is where these are supposed to get set
now.
Signed-off-by: Keith Packard <keithp@keithp.com>
In the default PM policy, the function k_us_to_ticks_ceil32() is used
and does calculation using 64-bit integers which can be slow and
avoidable if the input is 0.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Patch needed to fix a bug where the SLEEPDEEP bit is not cleared
properly after a wakeup from EM2.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
The high frequency clock was always restored before handling the
interrupts to make sure that the system clock is as expected. However,
the response time to interrupt when we were in EM2 was a between 300 and
600 us. By default, we use the low interrupt latency.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
There are three aspects of changes involved:
1. The format of Service Category should be checked in set
configuration cmd and error code and Service Category
should be detailed in response.
2. There is no INT Stream Endpoint ID in re_config cmd,.
3. Fail ACP SEID should be added to start and suspend rej rsp.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Enable uart_elementary test and fix edge cases where the
configure function did not return the appropriate error code
when given invalid parity or flow control parameters.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Properly return the correct error codes when the watchdog API
is misused. Fail timeout install if WDT_FLAG_RESET_CPU_CORE is
set, a watchdog reset will at a minimum cause a soft reset of
the entire SoC.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The wdog0 unit address and reg entry pointed to the secure
alias, while the SMU was configured to expect the non-secure
alias.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Some devices require PM to go to sufficiently deep sleep modes
for the watchdog to get paused using WDT_OPT_PAUSE_IN_SLEEP.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Enable the adc_error_cases test on Series 2 devices and change
the return values in the driver for unsupported configurations
to what the test expects.
Ensure that the resolution configuration in the test is valid
such that the invalid buffer test correctly receives -ENOMEM.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Move the CONFIG_BT_EXT_ADV fields up and have the 2
8-bit values first, so they can be placed in the same
word as the previous 2 when applicable.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Store the SID in the advertising set, and let it be possible
to get it again via bt_le_ext_adv_get_info.
The SID may be used by higher layers to shared information
about the advertising set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of always using SID=0 for advertising sets (which can be
tricky if there are multiple advertising sets using the same SID
and address), the SID will be incremented and wrap around when
reaching the max to reduce the risk of 2 or more sets having the
same SID.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove the default selection of SETTINGS_TFM_ITS when
TFM_PARTITION_INTERNAL_TRUSTED_STORAGE is enabled
which caused this backend to be built when it was
not intended.
Signed-off-by: Sean Kyer <sean.actor@gmail.com>
nRF92 series is not supported in the IEEE 802.15.4 stack yet,
so remove it from the board for now.
Signed-off-by: Bernt Johan Damslora <bernt.damslora@nordicsemi.no>
Add Doxygen tags giving users an indication that some API will only be
available if the corresponding Kconfig option is enabled.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In function `parse_read_by_uuid()`, the response length is not checked
before parsing the response PDU. There is a potential issue that the
`len` will be underflowed if the `len` is less than the size of
`struct bt_att_data`.
Check the length before parsing the response PDU. If the length is less
then the size of `struct bt_att_data`, notify the upper layer with the
error `BT_ATT_ERR_INVALID_PDU` and stop the parsing.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The nRF54L1 has 1012 KB RRAM and not 1022 KB as
it was set before. This adjusts the NS target
RRAM size for the relevant Ezurio boards
which use the nRF54L10.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
The nRF54L1 has 1012 KB RRAM and not 1022 KB as
it was set before. This adjusts the NS target
with the correct size.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
`#ifdef` will always evaluate to true when used on string Kconfig options.
Therefore username and password is set to "" if unset in Kconfig which is
not an issue.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
GitHub, in a moment of infinite wisdom, decided to change the default
tab from eight to four characters.
According to the GitHub announcement the problem that the change
addressed is that "many users are unaware that tab size can be adjusted
in their settings". As a result now users with this so called "improved"
setting sees a different indentation from all other users.
Help GitHub in their awareness mission, by making the users aware that
tab size can (or rather, has to) be adjusted in their settings to the
previous default, by mentioning it in the contribution guideline.
Call it out in the quick style guide too since it's not the default
anymore.
Link: https://github.blog/changelog/2025-08-07-default-tab-size-changed-from-eight-to-four/
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a guard clause in flash_esp32_read() to return 0 when the
requested length is zero. This avoids unnecessary operations
and aligns with expected flash API behavior, where reading
zero bytes is treated as a no-op.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
At this moment, DMA for SPI 3-wire half-duplex operation is not supported
by the pio driver. A check was implemented there to prevent user from
enabling DMA, but wasn't bypassed when CONFIG_SPI_RPI_PICO_PIO_DMA is
not enabled at all, under which the `dma_config` structure isn't defined
at all.
Fixed#94897.
Signed-off-by: Terry Geng <terry@terriex.com>
If we cannot initialize settings subsystem, it does not make
much sense to do calls into it. This leads to uninitialized
variables being printed and generally makes it hard to tell whether
or not the sample runs with the given config.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Fix an issue where 1 vector is being requested when MSI-X is
enabled. The previous logic always assumed the PCIE device has
only fixed or single MSI when we are requesting 1 vector, which
is not entirely correct. So if there is no vector allocated
already, try to allocate one.
Fixes#93319
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arch_pcie_msi_vectors_allocate() has a return type of uint8_t.
One of the error path returns -1 which would result in 255
being returned. So fix that by returning 0 instead, as there is
no vector being allocated anyway.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
qemu_x86_64 has NVME disk as overlay so we need to enable
kconfig CONFIG_NVME or else it would fail to compile.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
- Move sensing documentation in the "OS Services" group
and clean up group declarations
- Add missing documentation for the Sensing Subsystem API and complete
existing docs when it was too terse
- Other grammar/cosmetic improvements
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A lot of users seem to be confused by this sample when they try to do
west debug. This is because Zephyr currently does not support flashing
all the cores from a sysbuild automatically when doing a west debug
command. So west flash needs to be done prior to a west debug command.
The README previously actually said the step by step instructions are to
do the build, then immediately west debug, which would cause faulting
and crashing, so change the instructions goal to be a flash, and put a
note about needing to flash before debugging.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Silicon Labs controller with integrated radio each rely on a specific
binary blob (RAIL library) for using the EFR32 radio subsystem.
This commit adds support for the Silicon Labs BGM240SA22VNA SoC.
Signed-off-by: Ephraim Westenberger <ephraim.westenberger@gmail.com>
Duty value in the driver is calculated from timer cycles, which
can introduce precision loss when converting from pwm_set() to
pwm_set_cycles(). To avoid truncating values with a fractional
part ≥ 0.5 and further drifting the effective duty, round the
computed duty to the nearest integer.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
- add some missing docs
- make sure API guarded by Kconfig is showing up in the docs
- show EC Host Command docs in the Device Management group
- re-arrange groups for backends and simulator API
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Make sure that subsystems such as MCUmgr, EC Host Command, etc. are
grouped under a Device Management group instead of showing up as
top-level "OS Services".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Currently, if a SV is tracked, we try to store:
flags & BIT(3) -> 0b1000 -> least significant bit 0 is stored.
Same is valid for the is_corrected field.
Use double negation to treat any non-zero value as true.
Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
Render test settings more generic regarding clock options, in order
to better support new devices. Add ESP32-H2 testcase to rtc_clk suite.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add API documentation for `bt_conn_le_cs_mode` and internal extractors
for main and sub-mode parts. Clarify that the enum values are an
internal encoding, not a stable API, and that the sub-mode extractor
maps 0 to HCI 0xFF (unused) for a compact representation.
Also mark the extractors as private helpers and tighten wording for
developer clarity.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Allows NVS to work with flash device configured to
use only 64KB block erase. Due to how addresses
are encoded internally in NVS, 64KB is the maximum
sector size. Add a test for this during mount.
Add a native_sim unit test case for 64kb erase block size
Signed-off-by: Mike J. Chen <mjchen@google.com>
Series 2 EUSART and SiWx91x GSPI drivers were missing the
`iodev_submit` member from their API structs, leading to
null pointer dereference if CONFIG_SPI_RTIO was used.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Replace `select NET_MGMT` and `select NET_MGMT_EVENT` with
`select NET_CONNECTION_MANAGER` to get L4 events.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Change topic from <device_id>_rx (and tx) to <device_id>/sh/rx.
This allows use of wildcards. E.g. subscribe to all devices "+/sh/tx".
Level "sh" is added to the topic to make it less generic and prevent
potential clashes with other topics.
The topic part after <device_id> is configurable via Kconfig.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Exclude STM32F7 SoC series from PM support since that SoC doees not
yet manage power management in Zephyr and HAL API functions
LL_I2C_EnableWakeUpFromStop() and LL_I2C_DisableWakeUpFromStop()
are not implemented in the H7 HAL/LL drivers.
This change ports into the STM32 RTIO driver the change made in the
non-RTIO driver through commit 1804eb7bc3 ("drivers: i2c: stm32:
exclude stm32f7 family for PM").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Drop few CONFIG_PM_DEVICE_RUNTIME guards, the pm_device_runtime
functions they are masking are no-op automatically when the
corresponding config option is not selected.
This change is related to the change made in the STM32 non-RTIO driver
trough commit 4f3523d9af ("i2c: stm32: drop few redundant guards").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Always call pm_device_runtime_get() when registering a target
even if the device is not wakeup capable to prevent I2C target not being
function if the device goes into a SoC Stop mode.
This change ports into the STM32 v2 RTIO driver the change made in the
non-RTIO driver through commit 67f80e35b8 ("i2c: stm32: always call
runtime_get when registering targets").
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Build time configuration option to set TWT setup duration.
If AP does not respond to TWT setup request for this period,
STA will timeout and report setup failure.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Fix assertion under race conditions where LLL scheduling
did not have an auxiliary context assigned but when node rx
is released an auxiliary context is picked from the scan
context that has no parent assigned yet due to a previously
assigned auxiliary context to the scan context was not
cleared.
Relates to commit 49642efa41 ("Bluetooth: Controller: Fix
regression in scan aux release").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix extended scanning assert on invalid chan_idx received in
the aux pointer structure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Reorganize how gen_uicr.py is invoked.
Instead of invoking it from one of the Zephyr images we invoke it from
a new special Zephyr image called uicr.
This uicr Zephyr image is flashed in the same way as normal Zephyr
images so special handling in the runner is no longer necessary.
Also, we simplify gen_uicr.py by moving parsing of Kconfig/DT from
gen_uicr.py to CMake.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Set the VERSION field to 2.0 in gen_uicr.py to indicate the version of
the format the script produces blobs for. This is required for forwards
compatibility with newer versions of IronSide SE.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
When SNIPPET is added to the build, it is added to all images. But not
all images have the test directory added to their SNIPPET_ROOT, so we
also update the SNIPPET_ROOT.
This allows, for instance, the uicr image of nrf54H to find this
snippet.
Ref: NCSDK-NONE
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added support for retrieving the regulatory domain information from
the siwx91x driver. Since the SDK does not provide a GET API for
region details, the driver now stores the country code and reuse
the configuration `sli_si91x_set_region_ap_request_t` to get the
channel information. This stored data is returned when a GET
operation is requested.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Moved the `siwx91x_map_country_code_to_region()` function
from the Wi-Fi driver source file to nwp.c.
This change prepares the codebase for upcoming enhancements
related to the regulatory domain GET operation.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Add support for configuring the regulatory domain (region code) to
ensure the device operates in compliance with local RF regulations.
The region must be set before the Wi-Fi interface becomes active
i.e., before scan or connection in STA mode, or before starting in
AP mode.
Since the SDK does not support setting the country code directly,
the driver maps country codes to region codes
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
- AVRCP SDP record updates for browsing channel
- L2CAP setup for AVCTP browsing channel, and add connect/disconnect
- Add SetBrowsedPlayer browsing command handling
Signed-off-by: Make Shi <make.shi@nxp.com>
- This patch refactors the AVCTP layer to support multiple L2CAP PSMs
- Introduced bt_avctp_server structure for dynamic L2CAP server
registration and new server register apis
- Added k_sem protected server list to support multiple AVCTP servers
Signed-off-by: Make Shi <make.shi@nxp.com>
For 11V roaming, it attempts to use previously received scan results,
if they are recent enough to be used for connection.
If wifi driver does not keep the previous scan results, it will failed
to find the bss entry.
Fix: flush all unused BSS entries, for 11V roaming, don't try to use
recent scan results.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
The test feature USB_CDC is not required or used in any of the USB
samples or tests, yet it mysteriously appears again and again for
various boards.
Follow-up on commit ef784cd3fd
("boards: remove test feature usb_cdc and usb")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Replace test feature usb_device with usbd for boards that use the CDC
ACM serial backend. Otherwise, Twister could use these boards with
deprecated legacy samples, but the build would fail due to warnings
about the CDC ACM log level.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When building for the board with a serial backend, a warning will appear
regarding the log level of the CDC ACM implementation. Set it to "OFF"
to avoid CI failures.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
To avoid conflicts with boards using the CDC ACM serial backend,
explicitly disable initialization at boot.
Similar to commit 11c7371f99
("samples: Explicitly disable boot USB device support init at boot")
addressing it for the legacy device stack.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move disks directory to disk to match with the naming of the driver
class. This only affects the recently introduced header for STM32 disk
drivers so it should be very low impact.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Use DT_ENUM_IDX_OR instead of DT_STRING_UPPER_TOKEN_OR to get HCI bus
from DT, in order to avoid the expansion of UART/SPI/etc. macros when
they exist in vendor's SoC headers.
Fixes#93675
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
fix
Add a few missing defines for limits used in ISO.
Add missing units and provide the value in both
hex and decimal (with units) for easier-to-read support.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since no internal flash is available, provide the right configuration
so the test can run on external flash for stm32n6570_dk.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Following introduction of hsi-div on L0, upate hsi description on l0.
Since this description is not compatible with l1 series anymore add a
dedicated l0 test variant and matching overlay.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Since the broadcast ID is generated at runtime, it is nice
to get it printed so that it can be shared.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since the broadcast ID is generated at runtime, it is nice
to get it printed so that it can be shared.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When scanning, the broadcast_scan_recv now prints the broadcast ID
and the broadcast name (if found). Without this, it is not possible
to use the shell to scan for an unknown broadcast ID or broadcast
name.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The adv-create command no longer takes a name, and the shell
documentation has been updated to reflect that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The adv-create command no longer takes a name, and the shell
documentation has been updated to reflect that. Instead the
device name can be added via the adv-data command.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Previously, the Kconfig option `NET_GPTP_CLOCK_ACCURACY_2_5MS` had a
incorrect description "1.5ms".
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
remove `select MDIO` from the
ethernet drivers, that don't directly use mdio
and only use the ethernet phy api, now that the
phys select MDIO
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
devices on a bus are recomended to
select its needed drivers, apply this to the eth phys
that need gpios, so that they just work by
enableing the device in the dts.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
devices on a bus are recomended to
select its protocol, apply this to the eth phys
on the mdio bus, so that they just work by
enableing the device in the dts.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
When GPIOF4 and GPIOF5 are not used as USB alternate function,
the default 15K pull-down should be disabled.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
From avdtp spec, the get_all_capablities should be used if the avdtp
version is v1.3, otherwise the get_capabilities should be used.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
This file contains macro definitions for baudrates that are not needed ;
probably leftover from an earlier iteration of the binding that used an
enum for the baudrate(?)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Due to a mismatch in naming of debug jtrst pin name
(compared to hal_stm32) all boards based on stm32wba5x
are not compiling.
This temporary fix will solve this issue until a systematic
approach will be put in place.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
In bt_gatt_write_without_response_cb there is a check for
write != length. However since the call to bt_att_create_pdu
should ensure that this is possible, this should never happen.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since there is a retry mechanism implement, this is not something
that the user needs to be warned about.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When an API function returns an appropriate error code,
LOG_DBG is better suited than LOG_WRN or LOG_ERR as the
caller can handle the return value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For user-initiated requests like notifications, read and write
requests, there will be an error code, so there does not need to be
a generic LOG_ERR if these fail to be allocated.
However if the response or (indication) confirmation PDUs fail
to be allocated, these should still be logged as errors.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use LOG_DBG rather than LOG_WRN, as that is an expected
scenario when using K_NO_WAIT (e.g. when sending
GATT notifications), and it is better for higher layers
to determine if this is indeed an error.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use the region name token to describe the location of sections.
Because for some linkers (e.g. llvm lld) region_name and "region_name"
are not the same.
Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
`bt_att_recv`, which parses ATT PDUs, already contains code that
responds with `BT_ATT_ERR_NOT_SUPPORTED` if a given handler is not
implemented.
Therefore, `att_prepare_write_req` and `att_exec_write_req` handlers do
not need to explicitly return `BT_ATT_ERR_NOT_SUPPORTED` when
`CONFIG_BT_ATT_PREPARE_COUNT` is set to 0 and can be completely removed.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Adds infrastructure to allow the execution of a function on
a different CPU. The function to be executed on another CPU
runs within the IPI handler at ISR level (and is thus subject
to those constraints).
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
We have a few checks that report warnings, and for some of them it's
actually the _only_ type of failure they report, so it can be confusing
when the output of check_compliance.py says the "check failed" and lists
all the things that are effectively warnings as "ERROR"s.
This commit makes the output more clear by differentiating between
warnings and actual errors, both when printing out individual failures,
but also when printing the summary for each test case (ie. a test case
is said to be "failing" only when it has at least one error, and is only
showing up as having warnings if it only contains... warnings).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
z_nxp_os_timer_ignore_timer_wakeup() was only added
when Standby mode was enabled. Move this function
out of the conditional section.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
As it's not being used anywhere in the driver. Moreover, the extra
unref would trigger a double-free assert (#94311); which is what
motivated this cleanup.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to allow the linker to place certain objects into external RAM,
e.g. heaps, adjust the memc initialization level to PRE_KERNEL_1, allowing
clock control and memc to come up before priority objects like heaps are
initialized.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Determine event discardability after parsing the HCI header and require
at least one byte before reading the LE subevent. This removes a possible
OOB read on malformed/short LE Meta events. Also mark LE Extended
Advertising Report as discardable, matching legacy Advertising Report to
reduce RX pool pressure during heavy scanning.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The TX flow control semaphore was initialized with a count of 1 and
released again after every bt_esp32_send() call. This broke the VHCI
flow control contract and could allow sending more packets than the
controller advertised.
This prevents host/controller overruns and ensures proper synchronization
with the ESP32 VHCI interface.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix a bug where if CONFIG_UART_ASYNC_API was enabled in the config, the
interrupt flags would get cleared after the interrupt driven API callback
finished executing, causing data loss if data happened to arrive after the
callback but before the flags were cleared.
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
Re-organize groups, including addition of a top level "Binary
Descriptors" group that becomes the main entry in OS Services
Add missing documentation to some API (bindesc_entry, with public
fields, and bindesc_handle, opaque)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Group name was incorrectly used as a brief description ;
used the opportunity to fully clean-up file and group
definition
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Adds a context pool that can be used when a number of threads may be
dynamically created to use with RTIO. While the pool has a small cost to
it, the cost of verifying a statically declared kobject likely makes it
worth avoiding dynamically allocating these with the typical
kobject_alloc method. Instead this arena style pool of objects can be
used where the kobject validation uses the gperf hash created at build
time.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Extend external memory node with 'reset-gpios' property.
When this property is defined, driver will reset
the memory at startup.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
follow up to commit 5e3f1dbaa that introduced espi_evt_data_pvt without
full doxygen comments for it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Crash was observed if "diag stop" was invoked during the transmission.
The issue was caused by an update to otPlatRadioSleep that made it
compilant with the documentation and not allowing direct Transmit to
Sleep transition.
The transmission result was forwarded to OpenThread making it crash due
to an invalid state.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add missing doxygen docs for the NXP FlexIO driver and "mount" into the
Misc. drivers doxygen group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit adds specific DMA configuration for STM32N6xx.
STM32N6xx uses GPDMA for SAI as STM32U5xx/U3xx/H5xx/H7RS etc.
In constrast to these series, STM32N6xx DMA requires a secure
and privileged channel.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Use an asynchronous clock with an increased prescaler value for the ADC of
the Nucleo C031C6 so that the adc_sequence sample runs correctly.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use proper Doxygen commands so that 100% of the
andes_flash_xip_api_ex.h header is documented.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the
ra_flash_api_extensions.h header is documented.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the rts5912_flash_api_ex.h
header is documented.
Note that this uncovers weird usage of in vs. out parameters in the
various functions and might be worth a cleanup as a follow-up.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the
stm32_flash_api_extensions.h header is documented.
Removed unnecessary #ifdefs since enums needed not to be guarded from
declaration in the context of the header file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a new Doxygen group for vendor-specific extended operations so that
they can all be properly documented and show up in one place.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
It was observed in a project that when an error transaction occurs,
printing the error message can delay resetting the SHI state machine and
initializing the output buffer, which may cause the subsequent
transaction to fail, especially during stress tests involving heavy host
command communication.
This commit changes some error log level from ERR to DBG to prevent the
condition above from happening.
Also change the default debug level for the SHI driver to LOG_LEVEL_ERR.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add a workaround for `NRF53_ERRATA_159_ENABLE_WORKAROUND`
instead of simply printing an error and failing the transaction.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The test attempts to register an ISR for an IRQ
used by a device driver on this platform.
This breaks builds of the test and makes CI red.
Temporarily exclude all C0-based platforms from
the test until a clean solution is implemented.
Signed-off-by: Mathieu CHOPLAIN <mathieu.choplain@st.com>
Add a test case test_sdp_discover_with_range to test the ssa request
with attribute ID range with the following test steps.
Step 1, Discover all included attribute IDs,
Step 2, Set the start of range from 0 to (max value + 9) of the
discovered attribute ID,
Step 3, Set the end of range from start of range to (max value + 9)
of the discovered attribute ID.
step 4, Send SSA request with the specific attribute ID range,
Step 5, check the discovery result according to the range,
Step 6, repeat step 4 - 5 until the range to
(max value + 9, max value + 9).
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If the range of the service search attribute request is set and the
start of the range is not 0x0000, the response data of the request is
not valid. It is caused by the data element sequence has not be added
to response data. The client cannot parse the response data properly.
The root cause of this issue is that the total length of service
record will be added only when adding the first attribute of service
record.
Fix the issue by reset the `state.last_att` and `state.last_att_index`
if the index of current record is not same with `state.current_svc`.
And do not update `state.last_att`, `state.last_att_index`, and
`state.current_svc` in the function `select_attrs()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the received buffer is incorrectly used for
other SDP discover requests.
Release the RX buffer when the SDP discovery is done. And allocate the
new RX buffer from the pool of the new SDP discovery request.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Enable CAN1 and CAN2 in nucleo_f207zg.dts. Update supported
features in YAML and the board documentation accordingly.
Signed-off-by: Taeyoun Park <nvnv0422@gmail.com>
Add device deinit function. Support is optional as it is not widely
used and it enables pinctrl sleep state so it impacts memory footprint.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When PM or PM_DEVICE is enabled pinctrl sleep state is using for
device suspension. However, there are cases where power management is
not used but we still want to be able to put pins to sleep state, e.g.
device deinit.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
On Windows and Linux, the stm32cubeprogrammer runner will use
STM32_Programmer_CLI from PATH if it is available, but this was not
implemented on macOS. Add PATH lookup for macOS as well, using the same
approach as Windows and Linux.
Fixeszephyrproject-rtos/zephyr#93056
Signed-off-by: Garrett L. Ward <glward@glward.net>
A bit of doxygen love to this header to improve documentation coverage,
mainly focusing on missing documentation for a few enumerations, as well
as making sure javadoc-style comments are used where appropriate.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix two issues with the SAI TX Stream.
1. Drain command does not release the last memory buffer
2. TX Stream status does not change to READY after STOPPING
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Issue: the alarm 1 do not generate interrupt
There are three compare registers in a SAM TC channel:
RA --> alarm 0
RB --> alarm 1
RC --> top_value
By default the RB/TOIB was configured as an input and no longer
generates interrupt.
Set the direction of TIOB to output for alarm 1 interrupt.
Fixeszephyrproject-rtos/zephyr#85018
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
- Fixes the flash module type used for MIMXRT1060-EVKC.
It has the 16MB w25q128jw flash module
- Fixes flash driver initialization failure for MIMXRT1060-EVKC.
- Older MIMXRT1060-EVK/EVKB have the 8MB is25wp064 flash module.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
GPIO interrupts do not work on MCXA, MCXA has ICR register but feature
FSL_FEATURE_GPIO_HAS_INTERRUPT_CHANNEL_SELECT value is 0, can't only use
this feature to support ICR. So adjust feature judgment.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
For better organization, split the Kconfig files into one per each CPU.
Also, there was a bug where MFD was made to depend on flexcomm being
enabled, when really it probably meant to just default y if flexcomm is
enabled.
Leave Kconfig.soc in one file for the SOC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
We can both optimize and clean up the code by using short circuit logic
and static variables instead of stack variables.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Refactor ISR by:
1) making a helper function to put the tickful calculation in, to reduce
an indentation level and cognitively separate this case while reading
2) Rewrite the calculations to simplify them. More info on that below.
Math changes:
- In the ISR, there was a variable called "now" which represented the
current cycle count of the timer. last_count was updated using a
calculation based on the number of elapsed ticks
and the hardware cycles per second value. However, this is
redundant because mathematically, this is equivalent to "now". So the
variable can just be set to now.
Proof is that the previous calculation was (in programming language):
(1) last_count = last_count + elapsed_ticks * CYC_PER_TICK
So let's rewrite this as the following to be clear about the different
values we are talking about here (in math language):
(2) count[t] = count[t-1] + elapsed_ticks * CYC_PER_TICK
We calculated elapsed ticks in the function as:
(3) elapsed_ticks = (now - last_count) / CYC_PER_TICK
(4) elapsed_ticks = (now - count[t-1]) / CYC_PER_TICK
Rearranging (2), we see
(5) elapsed_ticks = ( count[t] - count[t-1] ) / CYC_PER_TICK
Substituting this into (4), we get:
(6) ( count[t] - count[t-1] ) / CYC_PER_TICK =
(now - count[t-1]) / CYC_PER_TICK
Doing simple algebra, you can see we result with:
(7) count[t] = now
So therefore, we can simplify the programming expression to
(8) last_count = now
- The other change is regarding the calculation of the next tick match
value for tickful kernel mode. The previous calculation was doing:
(1) next = now + CYC_PER_TICK
We know that last_count is equivalent to now, at this point in the code
with the first change:
(2) next = last_count + CYC_PER_TICK
And then, for some reason, we are adding yet another CYC_PER_TICK to
next if (next - now) < MIN_DELAY. The reason for that I do not
understand, but let's write that down:
(3) next - now < MIN_DELAY
Now rewrite (2) as (4) and (3) as (5):
(4) count[t+1] = count[t] + CYC_PER_TICK
(5) count[t+1] - count[t] < MIN_DELAY
And now we substitute (4) into (5):
(6) count[t] + CYC_PER_TICK - count[t] < MIN_DELAY
And simplify:
(7) CYC_PER_TICK < MIN_DELAY
So actually no runtime calculations are needed here, this is a
hardcoding. The reason for this calculation I don't know, but we can
simplify the code.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There are a couple places where effectively the exact same calculation
is done. Refactor to share code to do this calculation to make it easier
to read, and explode the code to multiple statements to be even easier
to follow the calculation. Compiler will likely optimize the same way
when opt enabled. Rename dticks variable to be more explicit what that
means (elapsed ticks).
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Refactor to remove nesting and consolidate lines of code.
I also ran clang format but that actually did not change very much in
addition to what I had already changed manually.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Some SoCs such as iMX8ULP and iMX93 use sentinel controller
for secure system management, this change ensures the device
driver is available by default.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This update ensures that TRDC settings are correctly applied
when user space is enabled. By default, the M33 core operates
in privileged mode.
However, when user threads are scheduled, the system transitions
to unprivileged mode. The TRDC configuration is adjusted to support
this behavior, maintaining secure and functional access control
for both privileged and unprivileged execution contexts.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
1.Remove the code that sets the UTRIM register to 0,
because UTRIM is automatically loaded with a factory-trimmed
value, zeroing will affect the accuracy. Only need to clear
VREF UTRIM[TRIM2V1] at the initialization stage.
2. VREF does not have NXP_VREF_MODE_INTERNAL_REGULATOR mode,
the internal voltage regulator and chop oscillator are used
to suppress power supply noise and reduce voltage offset,
so remove the NXP_VREF_MODE_INTERNAL_REGULATOR mode.
there are only three modes in VREF, the first is the standby
mode (CSR[BUF21EN] = 0, CSR[HI_PWR_LV] = X), the second is
low power mode (CSR[BUF21EN] = 1, CSR[HI_PWR_LV] = 0), and
the third is high power mode (CSR[BUF21EN] = 1, CSR[HI_PWR_LV] = 1).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Added new boolean type 'nxp,internal-voltage-regulator-en'
and 'nxp,chop-oscillator-en' properties for 'nxp,vref'.
The user can use these properties to improve the stability
and accuracy of the VREF output voltage.
2. Added properties 'nxp,current-compensation-en' and
'nxp,internal-voltage-regulator-en' and 'nxp,chop-oscillator-en'
for LPC55S3x, MCXN23x, MCXN94x, and MCXW7x VREF node.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1.The VREFO is internally connected to the ADC channel,
so can change the measurement channel to simplify the
test process.
2.Change the VREF mode to NXP_VREF_MODE_HIGH_POWER as the
'NXP_VREF_MODE_INTERNAL_REGULATOR' mode is removed.
3.Increase ADC sample time to improve ADC accuracy
4.Adjust tolerance-microvolt to a suitable value,
20000uv is a more suitable value for NXP VREF,
the actual VREF tolerance-microvolt can be smaller
than this value, but hardware differences may cause
this case to fail to run on some boards.
5.Add frdm_mcxn236 and frdm_mcxw71 to test platform.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The macros for PWM output on these GPIOs had names that referred to PWM
channels that do no exist on this chip- it only has 12 channels, where
channels 8..11 are exposed on both GPIOs 32..39 and 40..47.
Signed-off-by: Peter Marheine <peter@taricorp.net>
RP2350 adds four more PWM slices from the eight available on RP2040,
which are only broken out to package pins on RP2350B. This change fixes
the driver to support the correct number of slices on RP2350.
Tested by confirming that PWM can correctly be configured on GPIO 44 of
RP2350B.
Signed-off-by: Peter Marheine <peter@taricorp.net>
RP2350 has 48 GPIOs, where only the first 30 are broken out to pins on
RP2350A (same as RP2040) and the remaining 18 are only usable on RP2350B.
This change makes the soc pinctrl driver support GPIOs above 31, where
previously it was impossible to configure GPIOs 32 through 47.
Tested on RP2350B, confirming that GPIO44 can be correctly configured for
PWM.
Signed-off-by: Peter Marheine <peter@taricorp.net>
Updates the implementation of the osEventFlags APIs to use
Zephyr kernel events instead of polling.
Fixes#92899
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Replace direct assignment of evt.evt_data with structured access via
espi_evt_data_pvt. This change separates the incoming evt_data into
type and data fields.
This update alse includes support for handling PVT, PVT2, and PVT3
events using the structured event data.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Introduce a new bit field structure "espi_evt_data_pvt" to represent
the evt_data field in PVT IO related eSPI peripheral events.
With this change, callback functions handling eSPI events can extract
both the data and its associated type from evt_data.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
For devices other than the stm32h745/747/755/757 that use
dual-core cortex-M4/cortex-M7, do not multiply flash
controller size by 2. Single-core stm32h7x devices define
their flash-controllers dtsi as a single area, not two banks.
Use the presence of the bank2-flash-size prop to determine if
this is a dual-core stm3h7x or not.
Signed-off-by: Rory Piper <rory.piper@signal-fire.com>
This cleans up the doxygen documentation for the MCUmgr subsystem
(consolidated the doxygen groups, added some missing docs, added proper
@name'd sections where appropriate, etc).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Which does not have HW support for it, as stated by ST here:
https://www.st.com/en/microcontrollers-microprocessors/stm32u575-585.html
"
The STM32U575 portfolio offers from 1 to 2 Mbytes of flash memory
and from 48- to 169-pin packages.
The STM32U585 is available with 2 Mbytes of flash memory and provides
an additional encryption accelerator engine (AES, PKA, and OTFDEC).
"
All the U5 SoC have a hash HW accelerator (even the ones which don't
have crypto support: U535XX, U575XX, U59XXX and U5FXXX).
The hash node is therefore moved directly inside the stm32u5.dtsi.
Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
Introduce a new API function in the sdmmc_stm32 driver that allows
applications to access the Card Identification (CID) register of the
SD/MMC card. This functionality, already available in the SPI-based SD
and MMC subsystems, was previously missing from the STM32 SDMMC driver.
This enhancement enables use cases such as verifying the correct SD card
during manufacturing, ensuring that OEMs use the specified SD card, and
preventing mismatches.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
According to the STM32MP2 reference manual, the I2C controller uses
a single interrupt line for all events (EV + ERR), so the combined
interrupt must be enabled for the STM32MP2 series.
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
The STM32MP2 series needs gpioz pinctrl support to be able to use
the GPIOZ pins.
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Update hal_stm32 to include the modifications allowing to read the I2C8
clock frequency in the same way as I2C1-7.
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
The Controller is abbreviated as CTLR in contrast to CTRL
which is used in the context of Link Layer Control
Procedures.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adding sys_poweroff to WBA family. It switches to standby
(non-retention) mode. It can be woken up by any wakeup source.
Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
Enable two timers and PWM in STM32N6570-DK board dts.
Add overlays to test the pwm_loopback test on STM32N6570-DK board.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Closes#94549
Removed vestigial d and d_len variables from le_adv_update()
and replaced them with a single bt_ad wrapper. This simplifies
the function while maintaining identical functionality.
Signed-off-by: Ayman Elfayoumi <aelfayoumi2@gmail.com>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for this sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Complete the Doxygen documentation for the ADLTC2990 sensor driver,
put in sensor_interface_ext group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Re-work the Espressif supported boards documentation:
* Include repeated parts into included block
* Flatten the headers hierarchy
* Update the board variants usage.
* Fix references
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add a doxygen group for PWM api extensions and mount the now cleaned up
documentation for the MAX31790 driver into it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Clean up some redundant or paraphrasing Doxygen comments.
Add documentation for the MIPI CSI-2 data types.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If the GDB stub is enabled the exception handler will jump to the GDB
stub to allow remote GDB debugging.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1. Add config and overlay file in test scatter_gather for adp_xc7k_ae350
and adp_xc7k_ae350_clic to support the test case.
2. Modify the config file in test chan_blen_transfer and loop_transfer
because the tests do not support the NOCACHE memory configuration,
the DCACHE configuration needs to be disabled.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
1. Upgrade the ATCDMAC driver to make it compatible with multiple
ATCDMAC series drivers.
2. Rename the driver from ATCDMAC300 to ATCDMACX00.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
To generate the GATT Database Hash characteristic, the function
`db_hash_setup` is called. It allocates an entry for the AES key that will
be used in the CMAC calculation. Next, `db_hash_update` is called to feed
all GATT database entries into the hash. Finally, `db_hash_finish`
produces the resulting hash.
However, the AES key entry allocated in `db_hash_setup` was not being
destroyed after the hash generation completed. This caused a memory
leak, eventually leading to the error `PSA_ERROR_INSUFFICIENT_MEMORY`
(`-134`).
This commit fixes the issue by destroying the allocated AES key after
the GATT Database Hash calculation is complete, by calling
`psa_destroy_key` in `db_hash_finish`.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Use CONFIG_USE_USB_AUDIO_OUTPUT instead of CONFIG_USB_DEVICE_AUDIO
when assigning USB streams, as CONFIG_USB_DEVICE_AUDIO is unused
by the sample.
Additionally the BSIM test for the sample also incorrectly used it,
so the Cmakelist.txt file was updated to correctly include sources.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
PocketBeagle 2 contains an MSPM0L1105 soc which emulates ADC and EEPROM.
It is connected to the AM62xx soc over I2C and SPI.
The initial support just allows building the minimal zephyr sample. Due
to the constraints and the purpose of the SOC, most peripherals should
not be enabled in the main dts.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Not all MSPM0L series socs seem to have MPU. After a glance at the TI
website for features, only MSPM0L222x class socs seem to have MPU.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
This commit adds support for the new cs-high-time devicetree property.
The QUADSPI_DCR_CSHT is now configured according to the value indicated
in the devicetree, for both single and dual flash modes.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
This commit set the value of the cs-high-time property for all
STM32-based boards defined in Zephyr and having a QSPI flash memory.
The value is chosen according to the flash memory requirements (often
named 'tSHSL' in the datasheets) and the maximum QSPI frequency.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
The STM32 QUADSPI peripheral allows to configure, in clock cycles, the
duration the chip select signal must stay high between each command sent
to the flash memory controller (QUADSPI_DCR_CSHT).
Currently, this value is set by the flash driver to 1 clock cycle in
single flash mode and 3 clock cycles in dual flash mode. However, the
minimal duration depends on the flash memory (typically 30-50 ns) and
the number of clock cycles on the QSPI's clock frequency. So, adding
this new property allows to select the value of CSHT to match the
requirement of the flash memory used. Also note that in single flash
mode, the current configuration is out-of-spec for most flash memories.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
The QSPI 1/2 sample shift (SSHIFT) was only enabled in dual flash mode.
This feature is useful to guarantee that data is ready at the sampling
moment, even if the signals are a bit delayed due to PCB constraints.
Therefore, it should be enabled when possible (only supported in STR
mode).
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
Workaround test failures due to Zephyr Controller scheduling
overlap causing Periodic Advertising Sync timeouts, ACL
connection failed to be established or Controller assertion
when having latency at the CIS setup instant.
Workaround by using `-start_offset` to ensure that the ACL
established does not overlap the sink being established.
Relates to commit 490da9ec96 ("tests: bsim: Bluetooth:
Workaround overlapping ACL in BAP broadcast sink").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Updated to test 250 ACL connections in the multiple
identity across nrf52_bsim, nrf5340bsim and nrf54l15bsim
targets.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix assertion on BIG terminate sync and due to not receiving
terminate control procedure when there are no free buffers.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
IUT works as a l2cap client with basic mode. The peer device,
l2cap server with basic mode, is a PC with running bumble on it.
This test only performs the function of L2CAP basic mode.
Support multiple l2cap enerties in new shell l2cap_br,
which may support more test function.
In the test suite , there are two groups in test cases.
Group 1 Including case1-case24 focuses on connection and
disconnection around l2cap. The impact of active and passive
acl connectivity, disconnectivity and authentication as well as
disconnection from ACL without l2cap disconnect is tested.
Group2 Including case25-case31 revolves around the basic
parameters of L2CAPserver configuration, data transfer.
Case 25: Test l2cap connection with max MTU(0xffff).But the max mtu
which the stack supports is (CONFIG_BT_BUF_ACL_RX_SIZE - 4U = 196).
Case 26: Test l2cap multi_channel connection and data tranfer.
Case 27: Test l2cap connection with invaild PSM.
Case 28: Test l2cap re_connect after disconnected.
Case 29: Test l2cap connection with min MTU(0x30).set server mtu = 48,
client mtu=48. l2cap connect successfully,
both server and client mtu should be 48.
Case 30: Test l2cap connection with min MTU(0x30). set server mtu = 48,
client mtu=0x27. l2cap connect fail.
Case 31: Test l2cap connection with min MTU(0x30).set server mtu = 30,
client mtu=48.l2cap connect successfully,
both server and client mtu should be 48.
test_l2cap_client.py is a file containing real test cases.
test_l2cap_common.py is a common file. It encapsulates some
test function functions that are commonly used for test cases.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Now that the timer kernel clocks are defined in device tree, use the
clock get API to fetch the clock frequency instead of calculating the
value in the driver.
Removes the now unused function get_tim_clk.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that the timer kernel clocks are defined in device tree, use the
clock get API to fetch the clock frequency instead of calculating the
value in the driver.
Removes the now unused function counter_stm32_get_tim_clk.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32U0.
Contrary to other series, on U0, TIMPCLK is always equal to PCLK, so no
need to define it, we can use PCLK directly.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32H7RS.
Define a new property for the timer prescaler in the RCC binding of H7RS.
Also fix the clock bus of TIM16 and TIM17 (they are on APB2 instead of 1)
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32H7.
Define a new property for the timer prescaler in the RCC binding of H7.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32H5.
Define a new RCC binding for H5 with the timer prescaler property (timpre).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32F7.
The STM32F7 RCC clock driver complies with st,stm32f4-rcc
driver variant.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32F4.
Define a new RCC binding to add the timer prescaler property (timpre).
This new binding is used for all STM32F4 except F405/F407/F415/F417 who do
not support it.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add support for timer kernel clock for STM32F3.
Also reorganizes the timer instances:
- TIM3 is not available on F301, F318, F302x6 or x8, but is available for
all others
- TIM4 is available on F302xB and higher, F303xB and higher, F358, F398,
F373 and F378
- TIM7 is not available on F301, F318, F302, but is available for all
others
- TIM8 is only available on F303xB and higher, F358 and F398
- TIM20 is only available on F303xD and xE,and on F398
Depending of the SoC version, some timers have access to one or two
distinct clock sources. Timers with NO_SEL selection only have access
to the base TIMPLCKx clock, those defined with TIMx_SEL(0) can use another
source clock: STM32_SRC_TIMPLLCLK. That's why some clocks are redefined.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add note for the new requirement for the GMAP BGS role. There is
no GMAP sample or any changes in-tree that need to be updated for
this, so the best we can do, without implement a whole new sample,
is to refer to the BAP broadcast assistant sample.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
add a missing doc + actually show up the utilities from the gpio_utils.h
header file in the doxygen documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Group the vendor headers into the doxygen group used for device-specific
GPIO API extensions as opposed to have them clutter top-level GPIO docs
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a new doxygen group for device-specific GPIO API extensions and
put vendor header files in it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update BAP unicast server samples to work with Google Pixel:
Fix sink/source location count to match actual sink/source count,
preventing "Codec channel setup fail" errors on phone
Increase ATT prepare count from 1 to 2 to handle phone sending
Codec Config for 3 ASEs simultaneously, avoiding Codec Config
failures during recording
Signed-off-by: Chang An <chang.an_1@nxp.com>
- Code optimization for platforms which don't use subscription feature
in the temperature service.
- Test adaptation to code changes
Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
Switch the selects on `LORAWAN_FRAG_TRANSPORT` to `depends on`. `select`
should only be used for simple symbols without dependencies themselves.
Mixing `depends on X` and `select X` on different symbols is the primary
cause of Kconfig dependency loops.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit sets the interrupt mode to high-level
triggered, as fifo mode is enabled by default
(CONFIG_SPI_ITE_IT51XXX_FIFO_MODE=y) and the fifo
mode only supports high-level triggered.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This commit disables spi clock during idle to reduce power
consumption.
Tested with: reduce current cons. by around 0.08mA on it515xx_evb
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Enable USB for the Nucleo U385RG-Q. Samples in samples/subsys/usb compile
and operate as expected.
Signed-off-by: Will McGloughlin <willem.mcg@gmail.com>
The loop condition is not the count of the actual tries since the
continue or breaks can occur on the loop and thus a failure count
can falsely match a loop count even when a query is outstanding.
This can be seen when a dual stack resolve is used for IPv4 and IPv6
that has two fds to be used and the interface has only gotten an
IPv6 address. The failures on the IPv4 will indicate a 1 and the break
on the tried attempt on the IPv6 will break the loop on a 1.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Add initial support for the ROC-RK3588-PC AArch64 board.
It features a quad-core Cortex-A55 CPU based on the ARMv8.2 architecture.
This commit also enables SMP, allowing all four cores to run the
synchronization sample.
Signed-off-by: Guowei Li <15035660024@163.com>
Add initial device tree support for the Rockchip RK3588 SoC.
The DTS describes:
- Four Cortex-A55 cores with PSCI enable-method
- GICv3 interrupt controller
- ARMv8 timer
- UART2 and UART3 (disabled by default)
Signed-off-by: Guowei Li <15035660024@163.com>
Add example configuration fir testing the retained memory driver using
STM32 backup SRAM as the backend.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Flush the data cache if cache management is enabled. Flushing the data
cache is required to ensure data retention across system resets.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Enable cache management by default on Cortex-M7 of the STM32H7x
series. Remove cache management enablement from the ST STM32H7B3I-DK
development board.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add CONFIG_STM32_BACKUP_SRAM_INIT_PRIORITY for configuring the
initialization priority of the STM32 Backup SRAM driver.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add nandojve in the list of hal_microchip maintainers. In addition,
update the microchip sam platform to support both atmel and mchp
SoC series.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Set CONFIG_LIBC_ALLOW_LESS_THAN_64BIT_TIME to default 'y' for
ARCMWDT_LIBC toolchain.
The ARCMWDT_LIBC uses a 32-bit time_t
which fails the 64-bit time_t validation introduced to prevent Y2038
issues. This change eliminates the need to manually configure this
option for every ARCMWDT test while maintaining the validation
for other toolchains that support 64-bit time_t.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
After 8495e30726 some display controller
drivers failed to start. Make the start optional and enabled by default if
there are frame buffers allocated by the driver.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Not all combinations of main mode and sub mode are valid, so to make it
harder to select incorrect parameters, the main mode and sub mode
enums are combined into one.
Now the user chooses any valid option in enum bt_conn_le_cs_mode.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Update the broadcast sink and source samples to use
bt_iso_chan_get_info to get the BIG handle and BIS number of a
BAP stream.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update the unicast client and server samples to use
bt_iso_chan_get_info to get the CIG and CIS IDs of a
BAP stream.
The samples show how it is possible to get the information early
as the unicast client (it is possible right after the stream
has been added to a group), and how the values are only
available to the server once the CIS is connected, which
is indicated by the stream_started callback.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the struct bt_bap_stream to have a direct reference to the
bt_iso_chan, rather than having a reference to the parent
bt_bap_iso.
This change will allow users to more easily and directly access
the bt_iso_chan, instead of getting the reference via
bt_bap_ep_get_info.
Additionally, this allows users to access the bt_iso_chan for
streams that are not codec configured, and thus not have a
bt_bap_ep reference.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Expose the IDs, handles and numbers of CIGs, BIGs, CISes and BISes
via the ISO info struct. This information may be needed by higher
layer (such as the Basic Audio Profile (BAP)) or used as indexes
for arrays in the application layer.
The location of the CIG_ID, CIS_ID, BIG_Handle and BIS_Number
are moved to the location struct inside of struct bt_conn_iso
instead of being stored directly in it.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the bis_id in struct bt_conn_iso to be bis_number
and correctly initialize it for both the broadcaster and
the sync receiver.
The field is currently unused and the term bis_id does not
exist in the core spec. The BIS Index was renamed to BIS
Number in Core 6.1, and thus the Zephyr code base will
reflect that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Snippets overlays are applied last and can revert DTS changes by
restoring definitions from the base DTSI. Remove only the `partitions`
node when customizing flash size and layout.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
The comment about which drive strength option is high or low was
wrong and this commit fixes it. For example, ESP32_GPIO_DS_ALT
results in GPIO_DRIVE_CAP_0 being used which is the weakest
option according to the HAL file espressif-esp32-gpio.h.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Proceed if the environment variables ZEPHYR_EXTRA_MODULES or
EXTRA_ZEPHYR_MODULES are set to an empty string. Handle same way as if
the variable is unset.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Adds a variable that has the path of the module directory, this
is supplied as an argument when running cmake normally but is
not supplied when running the check compliance script, this
addition allows checks to be ran that use such syntax in Kconfig
files. This is then removed from cmake as the python file handles
it instead
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add migration note with details to guide user to correct select the
clock reference.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The OTG_HS PHY from stm32u5a5xx device require the correct reference
clock frequency selction in SYSCFG_OTGHSPHYCR. The current default is
hard coded to 16Mhz (which matches the development board crystal).
However, a custom board my require a different crystal and then the
USB will not work. This add a required field in the
st,stm32u5-otghs-phy binding to force user to select the correct
clock reference. The current nucleo_u5a5zj_q baord was updated to
reflect the mandatory field.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Ensure the "Video Controls" do not show up as a top level device API
but are rather folded into the main video Doxygen group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The Locally Administered Address (LAA) bit should be set on the first
octet of the MAC address.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The IAR linker ilink does not have any optimization options, and
with the newly added linker optimization flags that default to
the compiler optimization flags, ilink will fail with an
"illegal command line option" error.
This temporary workaround will use a harmless option instead to
avoid errors, until we can update the linker.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Implementation should use a dedicated function to get OpenThread
instance instead of using the deprecated pointer from context.
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Add include of the stm32l4+ specific clock bindings in
stm32l4p5.dtsi in order to let all stm32l4+ benefit from it.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
On stm32l4+ series, the SAI1 and SAI2 clock source selection fields
are within a different register hence a different binding header
file is introduced to allow proper field usage on those platforms.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change 4e0e3c990d caused
a regression in that SPI_MCUX_FLEXCOMM_TX DMA
transfers weren't properly set to be a peripheral
transfer.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Sam4l use different TC_CMR_WAVEFORM_EEVT macro name.
Update these macro names to be consistent with other sam mcu.
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
The syntax was wrong for the chosen dtcm node. Also fixing build error
on 1180 by re-allowing the symbol on some tests.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
1.Enable dac_api test on mimxrt1180_evk
2.Reorganized the test_dac.c file so that the same
dac configuration items are placed under the one
conditional macro.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
extra_configs or extra_args can use additional filtering which was not
supported by the west build command. West is not aware of arch so that
filter type is not supported but platform (board) is known so it can
be used to apply expected configuration.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This oscillator has better accuracy and is available by default
on this board.
Disable this in the ethernet variant where XTAL32 is disconnected
so we can use the ethernet pins.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Do not clutter the "Device Drivers" documentation with emulation
headers.
Ensure each emulated device API appears both in the device group as
well as "Emulator interfaces" (e.g. bbram_emul is showing up in
both BBRAM docs as well as Emulator Interfaces docs)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Users were confused about which toolchain names to pass to
`west sdk install -t`, since the documentation did not list them.
Enhance the help text to suggest installing all toolchains if
unsure and point to the SDK release notes where the available
toolchains are listed.
ref: https://github.com/zephyrproject-rtos/zephyr/discussions/94572
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Fix an out of bounds access found by ASan.
Also remove mock_i2c_reg_error which seems to never be read.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Validate properties we receive, make sure warnings and errors are
printed, verify config register writes, run on native_sim_64 as well.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Fix issues found by ASan, log register writes for inspection using
console harness.
Fixes: 5f84be617e
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
The USB device samples do not build for the Nucleo L552ZE-Q because usb is
not enabled in the board DTS files. Fix it by enabling usb in the board DTS
files.
Signed-off-by: Will McGloughlin <willem.mcg@gmail.com>
There will be an compilation error if there is no interrupt GPIO defined
in the device tree file, as parts of the config and data structs
have #if that depends on the presence of interrupt GPIO.
Use the same #if constructs also on the functions that use those
structs.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
The sleep output configuration should be skipped for pins
22 to 28.
This was causing incorrect GPIO wakeups when entering
standby mode on RW612.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Reduce the spinlock scope in stepper_handle_timing_signal
2. perform a step each time the timing signal is called
3. Increment/Decrement actual_position and steps using atomics
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Clock ctimer if being used for PWM. Otherwise, it not only doesn't work
but makes the chip unable to be communicated to by the debugger.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The RTC counter that is used in Power Mode 3 to track
System time could overflow for large timeouts.
Add code to catch wakeup events due to this overflow and re-enter
Power Mode 3.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
The counter that is used in Power Mode 3 to track System time could
overflow for large timeouts.
Add an API that the power system could use to ignore wakeup events
from the timer.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Move MAX_WAIT define to the system timer header file
so system timer drivers can use this define.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Put every header defined in include/zephyr/drivers/usb_c/ into the same
doxygroup (`usb_type_c`) so as to not clutter the top-level
`io_interfaces` group with multiple USB-C related groups.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
new input_interface_ext group can be used for grouping device-specific
input API extensions together.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This helps anchoring the file to the proper section in the online
documentation when browsing by file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The MAC addressed derived from the device ID is not assigned by the
manufacturer and therefor the Locally Administered Address (LAA) bit should
be set.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Confirmed by section 3.7.2 in the datasheet (version 29 July 2025) and
running a sample piece of code exercising smuad, smladx and
other DSP intrinsics.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
The interrupt-driven UART API is emulated via polling on native_sim,
which introduces additional overhead. Defaulting to poll mode improves
performance by avoiding this emulation cost.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Suppress many LOG_ERR() messages from LwM2M registry
that are not necessary runtime errors.
Libraries and applications should be able to do following
without causing LOG_ERR to be produced:
* Checking existence of object, resource or resource instance
using lwm2m_engine_get_res(), lwm2m_engine_get_res_inst()
or path_to_objs(). These are only exposed in internal header.
* Delete object instance or resource instance without checking
if it exits.
As there is no public API to check existence of some path,
application is much easier to write in a way that it directly
calls just lwm2m_get...(), lwm2m_set...(), lwm2m_delete...()
and trust the return code of -ENOENT.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The STM32G4 variants g473, g474, g483, g484, g491 and g4a1 do support QSPI
interface. All mentioned variants include the stm32g491.dtsi.
Signed-off-by: Andreas Schmidt <andreas.schmidt@dormakaba.com>
It is now possible to enable CONFIG_UART_INTERRUPT_DRIVEN for mspm0
uart driver.
Signed-off-by: Jackson Farley <j-farley@ti.com>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
Minor cosmetic update so that the notes in the "Data Passing" summary
table are actual interactive footnotes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add alias for led1 in addition to led0.
The leds are present on the ST Nucleo H563zi board.
Tested with ST Nucleo H563zi board.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
This PR enabled pull down option for the user button
of the nucleo_u575zi_q board to enhance wake up performance
from standby and stop3 sleep modes.
Signed-off-by: Andreas Karner <andreas.karner@outlook.com>
Some header levels are incorrect, e.g. "API Reference" header
level was lower than individual header for each API group.
So fix them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add PyOCD as a runner for xiao_mg24. Document how to install
the flashloader from CMSIS-Pack. PyOCD can be used for flashing
and debugging.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
UDP multicast uploads did not produce zperf-compatible server stats,
so the client waited for and tried to decode a non-existent reply,
causing “Unexpected response flags” and misleading
“LAST PACKET NOT RECEIVED!!!” output.
This change treats multicast as client-only: after sending
the negative-id FIN it does not wait for or decode server stats,
Instead transmits the FIN a few times to help receivers detect test end.
The shell prints a clear “Statistics (client only)” summary for multicast
and suppresses the error when client stats are valid.
Unicast behavior is unchanged.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Enable FDCAN for Nucleo U385RG-Q board.
Sort properties in the board chosen node and the
supported features in the board description YAML file.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
bt_cap_initiator_started did not have a check for aborted like
all the other callbacks, which could cause the procedure to
continue even if it was aborted.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
With the dictionary feature enabled, the RTT backend would still print
the "messages dropped" message as a string instead of the binary format.
Fix that by calling the correct process function when dictionary mode
is enabled.
Signed-off-by: Tamás Kiss <tmik@demant.com>
When BT dedicated API was turning off the HF clock it was not resetting
status flags. When onoff API was attempting to request HF clock after
that it was detecting unexpected state as status flag was indicating
as if HF clock was on.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
PPR was using 1 kHz system clock frequency instead of default 31250 Hz
used on other cores with GRTC. Low frequency impacts system clock
accuracy. There is no reason to use different frequency for PPR.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The ADC driver API already supports ADC readings which can return signed
values, these are differential readings. In Nordic's datasheet, we have
a mode called "single ended", but its just a name. "Single ended" is a
differential reading, with the negative channel tied to GND. This is not
compatible with zephyrs definition of a single ended reading.
To support Nordic's "single ended" mode, the user must configure
a differential reading, with the negative input tied to ground, which
the saadc driver can then use to configure the reading as Nordic SAADC
"single ended", and return negative values as expected.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
The definition of the EM3 energy mode is that software switches
off the LFRCO and LFXO before entering deep sleep. On Series 2,
oscillators are clocked on-demand based on peripheral requests
from hardware. Requesting EM3 will result in EM2 if any active
peripheral uses one of the oscillators, and requesting EM2
will result in EM3 if no peripherals use the oscillators.
In version 2025.6 of the HAL, this was reflected in the API
of the power manager by making EM3 an alias of EM2. Reflect
this in Zephyr by removing the separate EM3 power state.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Create a new, generic parser, that is able to parse dictionary logs live
- showing the messages as they are received from the device.
This functionality previously existed only for reading the log from a UART.
With the new script, the functionality is extended to be able to also read
the log from a file or stdin.
Additionally, the script is written in an extend-able way, making it simple
to support more input sources in the future.
The new script contains a better version of the live functionality than the
old script of log_parser_uart script, therefore, the old script has been
deprecated.
The UART script is still available, and will work by invoking the new
implementation with relevant arguments translation, however, it should
ideally not be used any longer, and should be removed from a future
release.
Signed-off-by: Omri Sarig <omsi@demant.com>
The current implementation of the serial log parser is running in a loop -
every 2 seconds it checks if there is any information ready to be read, and
in this case, it reads this information and parses it.
In case the last packet of the information is not fully available, the
script will read only the first part of the packet, and will fail when
parsing, ending the run with an error.
This should not the be the case, as it is not an error to have only part
of the packet in the buffer.
This commit fixes this problem - now, instead of failing because the parser
does not have enough information, the parser will parse all the full
packets it have, and keep the last, partial packet in the queue, to be
parsed together with the next chunk of data.
This is done by updating the log parsers to return the amount of parsed
data when trying to parse the information, and updating the calling scripts
to correctly handle this new return value.
Additionally, the parser is now quietly failing in case of having a partial
message, and throw an exception for any other kind of error in the parsing
(instead of returning a boolean return code).
In addition to the partial packet handling, the current commit also do the
following, minor improvements:
* parserlib now fails by throwing an exception, instead of exiting - this
is done to make it possible to choose a different handling for the errors
from the calling code, if needed.
* The dictionary and parser are now created before the parse operation.
This makes the uart parser more efficient, and also removes the
previously duplicated messages of build id, target architecture and
endianess (which was printed every time new information was received from
the UART).
Signed-off-by: Omri Sarig <omsi@demant.com>
Python does not support values of long-long (ll) or short-short (hh) in
string-formatting. The current parser is correctly removing the first "h"
or "l" from the format, to make it possible to correctly parse these
strings when they are in the dictionary.
However, the current implementation does not correctly handle the case of
having a number before the "ll" or "hh" argument - which is supported by
both C and Python.
This commit updates the parser to correctly handle these cases, by changing
the simple replace operator with a regex replace, which is able to
correctly handle this case.
Before this commit, the string of:
"This is my long variable: %08llX"
will stay the same, which will throw a ValueError when parsing this
dictionary message:
"ValueError: unsupported format character 'h' (0x68) at index ".
After this commit, the string will be correctly fixed to
"This is my long variable: %08lX"
which is parsed correctly.
Signed-off-by: Omri Sarig <omsi@demant.com>
`tests/bsim/bluetooth/tester/` contains tests for
`tests/bluetooth/tester/` so it should belong to the same maintainer
area.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Properly use EUSART1 for the XIAO connector serial device, and switch XIAO
SPI to EUSART0 to allow simultaneous use.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Use the default -1 value for COMMON_LIBC_MALLOC_ARENA_SIZE, i.e. let the
heap expand to the remaining amount of memory.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Updated the PLL input frequency calculation to include
division by the HSI clock divider.
Enable HSI divider using LL_RCC_HSI_EnableDivider().
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Added support for selecting channels A, B, both together, and all channels
on the AD5686 DAC driver. This improves flexibility for multi-channel
DAC applications.
Signed-off-by: Aditya Ganesh <adga5133@colorado.edu>
The current driver has a few limitations:
1. The `ngpios` DT property is fixed at eight.
Since the SN74HC595 and kin are designed to be
easily daisychain-able, the upper bound on `ngpios`
should be limited only by the maximum number of pins
that Zephyr supports per GPIO port, which is 32.
2. In the case of having no control over the shift register's
reset input, the device tree node should accept a default
value to shift into the register(s) during init.
3. There seems to be an assumption that the serial clock
and load clock are tied together. While this is often the
case, the device tree node should be more flexible in
allowing the specification of a separate load clock GPIO pin.
4. The device tree node should also be able to accept a GPIO pin
to drive the enable input pin of the shift register(s).
This commit addresses all of these issues.
Signed-off-by: Pete Dietl <petedietl@gmail.com>
This change alignes HCI drivers behavior with Host expectation. That is:
if an HCI driver managed to send a packet to Controller, the HCI driver
also unreferences it. If the HCI driver didn't manage to send the
packet to Controller and returns an error code, it does not unreferences
buffer.
This change aligns the behavior of HCI drivers with the Host's
expectations. Specifically:
- If an HCI driver successfully sends a packet to the Controller, the
HCI driver also unreferences it.
- If the HCI driver fails to send the packet to the Controller and
returns an error code, it does not unreference the buffer.
Fixes#94445
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
GCC 14 takes a look these functions which are just 'return true' and
inlines them even though they has the noinline attribute set. This happens
because the compiler computes the possible range of values from the
function call, and as that is a single value (true), it replaces the call
with that value. So it's not strictly inlining the function?
Insist a bit harder by adding a compiler_barrier to the functions which
seems to solve the issue.
Signed-off-by: Keith Packard <keithp@keithp.com>
On arm64, GCC feels free to use floating point registers for essentially
anything unless we build with -mgeneral-regs-only. After the FPU gets used
in an interrupt handler, interrupts are disabled as there's no place to
save the registers during a nested exception. As the C library may be built
separately without this flag, we cannot use any of its functions or risk
having nested exceptions fail.
Switch printk usage to k_str_out and stick to (mostly) Zephyr internal
functions to ensure nested interrupts work correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
GCC 14.3 will happily delete any code that appears before
__builtin_unreachable that isn't separated with an obvious branch. That
includes __asm__ statements, even those which generate traps.
The failure case that I debugged was on x86 in
z_check_stack_sentinel. There is a store to restore the sentinel to the
correct value just before the ARCH_EXCEPT, and that macro emits 'int $32'
followed by CODE_UNREACHABLE. Because the compiler didn't understand that
ARCH_EXCEPT was changing execution flow, it decided that the sentinel
restoring store 'couldn't' be reached and elided it.
I added the "memory" clobber to the asm statement in ARCH_EXCEPT before
CODE_UNREACHABLE to enforce that all pending store operations be performed
before the asm statement occurs. This ensures that they are not deleted by
the compiler.
I think this might be a GCC bug. The GCC documentation explicitly documents
that asm statements which change the flow of control should be followed by
__builtin_unreachable.
Signed-off-by: Keith Packard <keithp@keithp.com>
Zephyr replaces the toolchain version of stdint.h to define uint32_t and
int32_t as int rather than long. This breaks the ARM MVE intrinics which
require uint32_t to be defined as unsigned long.
Define 'ZEPHYR_USE_TOOLCHAIN_STDINT_H_' as that causes zephyr_stdint.h to
be skipped, ensuring that the normal stdint.h types are used instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
The stm32u3x header files defines LL_ADC_SINGLE_ENDED but not
LL_ADC_DIFFERENTIAL as the device doesn't support differential mode. The
driver only checked for LL_ADC_SINGLE_ENDED and assumed that when that was
defined, LL_ADC_DIFFERENTIAL would also be defined.
Check for both when figuring out which calibration type will be required.
Signed-off-by: Keith Packard <keithp@keithp.com>
When the target has only a single CPU, this function cannot ever
succeed. Skip all of the drama and just return -EINVAL. This makes GCC 14
happy as it doesn't get confused about possible out of bounds access of the
soc_cpus_active array.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add zephyr,pm-device-runtime-auto; to uart135 which is the uart
used for logging to enable PM_DEVICE_RUNTIME for it, which is
required for its power domains.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Check if cqe is NULL before accessing cqe->result in
spi_rtio_transceive(). Prevents possible null pointer dereference
from rtio_cqe_consume() return value.
CID: 516229
Fixes: #90547
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
Adds an overlay to enable the GPIO api tests to run on the
kit_psc3m5_evk board. GPIO 3.0 is used as an output, 3.1 is used as an
input for the test. The test expects GPIO 3.0 and GPIO 3.1 to be
jumpered together.
Signed-off-by: John Batch <john.batch@infineon.com>
1. Renamed MCXA276 to MCXA266
2. NXP frdm_mcxa276 is renamed to frdm_mcxa266,
add this information to migration-guide-4.3.rst.
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
1. Renamed MCXA166 to MCXA346.
2. NXP frdm_mcxa166 is renamed to frdm_mcxa346,
add this information to migration-guide-4.3.rst.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Add core_id for RT685 HIFI4 core, this variable is
used in MCUX SDK cmake.
2. Set cmake variables 'CONFIG_MCUX_COMPONENT_driver.smartdma_mcxn'
and 'CONFIG_MCUX_COMPONENT_driver.smartdma_rt500' to "ON" as these
variables control the loading of source files in the latest driver
CMakeList.txt.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Now use the 5-parameter function "PINT_PinInterruptConfig"
deprecated in MCUX SDK, need to add compile definition
'PINT_USE_LEGACY_CALBACK' to make intc_nxp_pint compatible
with updated 'fsl_pint' driver.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
'MCUX_HW_CORE' and 'MCUX_HW_FPU_TYPE' are used in
modules/hal_nxp/device.cmake. It is a variable used
by MCUX SDK CMake.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
remove spi_cs_is_gpio checks before
spi_context_cs_control, as it is also done
inside and we don't need to check two times.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The uart_stm32 driver gives no way for a user to
tell if setting a new baud rate was successful.
Propagate error checks up to the API level.
Signed-off-by: Eden Frosst <edenfrosst@gmail.com>
The SAMPLERATE register can be used as a local timer instead
of triggering individual SAMPLE tasks. When SAMPLERATE.MODE is set
to Timers, it is sufficient to trigger SAMPLE task only once in order
to start the SAADC and triggering the STOP task will stop sampling.
The SAMPLERATE.CC field controls the sample rate.
The SAMPLERATE timer should not be combined with SCAN mode and
only one channel should be enabled when using the internal timer.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
The stm32n6 features an RNG block. The RNG is a true NIST SP800-90B
compliant entropy source according to the stm32n657x0 reference manual[1].
Per Table 3 in the reference manual, the RNG peripheral register boundary
address (secure) is 0x54020000 to 0x540203FF. That is, base address
0x54020000 and size 0x400.
Per Table 73 in the reference manual, the RNG peripheral has only a single
rng_clk option (hsis_osc_ck).
Per section 14.10.66 (and more) the RNG peripheral control is performed
through AHB3 using bit 0.
As such, the `clocks` property contains a single phandle to the RCC AHB3
bit 0 entries.
Per Table 135 in the reference manual, the RNG peripheral interrupt is
located at position 40 in the NVIC.
[1] RM0486 Rev 2: https://www.st.com/resource/en/reference_manual/rm0486-stm32n647657xx-armbased-32bit-mcus-stmicroelectronics.pdf
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
stm32 smbus driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 sdhc driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 i3c driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 dwmac_stm32h7x driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 mco clock driver is relying on the pinctrl framework
for configuring the MCO pin hence select CONFIG_PINCTRL
to allow proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 crypto driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 ltdc driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 mipi dsi driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 dcmi driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
stm32 dcmipp driver requires a reset control and pinctrl
(depending on the configuration) hence ensure that
CONFIG_RESET and CONFIG_PINCTRL are properly selected to allow
proper build.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Ensure NSBank values are validated at build time.
That helps to identify and fix incorrect bank values.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
Simplifies the driver code:
* Use existing FMC_NORSRAM_DEVICE and FMC_NORSRAM_EXTENDED_DEVICE
defines. No need to keep references to them in the driver's config.
* Refine initialization loop.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
Add support for the SDMMC clock bypass feature for those SoCs that have
it. This provides a SDMMC bus speed double that of `clk-div = <0>`.
Updated the `clk-div` documentation at the same time to be clearer on
how the bus clock speed is determined.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Explicitly initialise the SDMMC initialisation struct to make it clear
the configuration being applied.
Signed-off-by: Jordan Yates <jordan@embeint.com>
A public API call that sends ACL data — for example, `bt_gatt_notify` —
can be invoked from a preemptive thread context. This API, in turn,
calls the `raise_data_ready` function, which adds an L2CAP channel to
the `l2cap_data_ready` list.
The atomic variable used to create a critical section around
`l2cap_data_ready` did not work, because a preemptive thread can be
pre-empted at any time. This means that regardless of the `atomic_set`
result, we cannot trust it — the thread could be preempted after the
call, and the atomic variable state could be changed (specifically by
the TX processor in this case). The same issue applies to
`bt_conn_data_ready`, which is called next.
When making an L2CAP channel ready for sending data, we need to use a
critical section when appending a channel to the `l2cap_data_ready`
list. The same applies to the `conn_ready` list.
Since cooperative threads can only be rescheduled explicitly, we must
ensure there are no rescheduling points when accessing either the
`l2cap_data_ready` or `conn_ready` lists.
For `l2cap_data_ready`, this occurs in `get_ready_chan`, which is called
from `l2cap_data_pull`, which in turn is called by the TX processor. For
`conn_ready`, it occurs in `get_conn_ready`, which is also called from
the TX processor. Both functions have no rescheduling points when
working with their respective lists, so they do not require a critical
section.
This change removes the atomic variables previously used to create a
critical section for both lists, as they were ineffective. Instead,
`k_sched_lock`/`k_sched_unlock` are used where code may be executed from
a preemptive thread context. The `sys_slist_find` function is used to
check whether a channel or connection is already in the corresponding
list.
Fixes#89705
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add CONFIG_OPENTHREAD_ROUTER_SELECTION_JITTER_OVERRIDE
Kconfig option that enables setting the router selection
jitter to CONFIG_OPENTHREAD_ROUTER_SELECTION_JITTER at
startup.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
STM32G0x SoCs reference manuals say that for Shutdown mode (STM32G0x1)
or Standby mode (STM32G0x0) entry (used for Power OFF entry), that
"WUFx bits are cleared in Power status register 1 (PWR_SR1)".
Therefore call LL_PWR_ClearFlag_WU() unconditionally (regarding
CONFIG_STM32_WKUP_PINS) in z_sys_poweroff() sequence.
Reference manuals references:
- STM32G0x0: RM0454 Rev 5, Table 25.
- STM32G0x1: RM0444 Rev 6, Table 34.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32F4x SoCs reference manuals say that for Standby mode (aka Power OFF)
entry, "WUF bit is cleared in Power Control register (PWR_CR)" [1]
and "WUF bit is cleared in Power Control/Status register (PWR_CR)" [2].
Therefore call LL_PWR_ClearFlag_WU() unconditionally (regarding
CONFIG_STM32_WKUP_PINS) in z_sys_poweroff() sequence.
Reference manuals references:
- [1] STM32F401xx: RM0368 Rev 6, Table 20.
- [2] STM32F469xx/STM32F479xx: RM0386 Rev 6, Table 23.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
STM32C0x SoCs reference manual says the wakeup source status flags (from
register PWR_SR1) are not cleared by hardware and therefore should be
cleared by software before entering Standby or Shutdown power mode.
Therefore call LL_PWR_ClearFlag_WU() unconditionally (regarding
CONFIG_STM32_WKUP_PINS) in z_sys_poweroff() sequence.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Fix STM32G0x0 SoCs power off sequence that do not support Shutdown mode
and which deppest power mode state is Standby mode.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This commit updates I2C_DMA_DATA_INIT() macro to use
IF_ENABLED(DT_INST_DMAS_HAS_NAME(...), (...)),
so that the DMA configuration field is only generated if the
corresponding DMA property exists in the Device Tree.
This prevents macro expansion errors and allows a mix of I2C
peripherals with and without DMA support in the same build.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Remove CONFIG_SOC_SERIES_NSIM_ARC_V_RMX conditional check from
zephyr_compile_options_ifdef and apply all extensions
unconditionally when using arcmwdt compiler.
Since this CMakeLists.txt is already SoC-specific, the
additional config check is redundant.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Update the hardware configuration for the Synopsys nSIM ARC-V RMX100:
- Change CLINT base address from 0x2000000 to 0xa0010000. The CLINT
is now created by default in the RMX100 configuration, with its
MMIO base already configured to use this address.
- Update nSIM MMIO base address to 2560 to align with the new memory
map requirements.
- Remove PLIC support as the ARC-V RMX architecture only supports
APLIC (Advanced Platform-Level Interrupt Controller), not PLIC.
Note that APLIC support is not yet available in Zephyr, so
interrupt controller functionality will be limited until APLIC
is implemented.
- Replace legacy MPU configuration with PMP (Physical Memory Protection):
Remove mpu_version, mpu_regions, and mpu_granule properties and add
ARCV_PMP interface with 16 regions and granule=1. The MPU options
were legacy and PMP is the standard RISC-V memory protection mechanism.
These changes align with the latest ARC-V RMX100 hardware memory map
and architectural requirements.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Rename SOC configuration symbols from generic names to more specific
ones that include the vendor and platform information. This improves
clarity and prevents potential naming conflicts.
Changes:
- SOC_SERIES_RMX -> SOC_SERIES_NSIM_ARC_V_RMX
- SOC_RMX100 -> SOC_NSIM_ARC_V_RMX100
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Add the pyocd as runner for the stm32h7s3l8 nucleo or stm32h7s78 dk
so that debugging becomes possible if openocd is not available.
Check with 'pyocd list --target'
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Define SAI1 node for STM32H7xx series.
Add STM32H7xx related DMA configs.
Enable samples/drivers/i2s/output for nucleo_h745zi_q/m7
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Document the S32DS and S32Debug Probe OS supported version,
and guide to upgrade the OS of the S32DebugProbe.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
S32DS3.6 requires to use python 3.10, so update
PYTHONPATH for S32DS3.6 when debug on windows.
Update to verify new behavior of supported commands
with S32D3.6 on windows.
Update to find out the usb device connected by VID
and PID instead of class "NXP Probes" on windows
Because based on the S32 Debug probe OS version the
device class of USB is changed. Therefore a reliable
way to identify the probe is check the USB VID and PID.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
When a reset coccurs the sram1 where the m_state value is stored
is erased. Then the board indefinitely reboots.
Avoid this excluding the target board.
Or set the SRAM13_RST bit in the option byte in FLASH_OPTSR2_CUR.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Added helper Kcoinfig option USE_ISR_WRAPPER which can be used to
include isr_wrapper even if GEN_SW_ISR_TABLE is not enabled. This
is needed to enable configurations where only IRQ vector table is
used with multithreading (only direct isr used). This change is
backward compatibible with previous config.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
External flash memory is typically not used, so it should
be disabled by default. The GPIO6 port used by this device
should also be disabled.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Remove the reference to TrustZone for the stm32h7s3 nucleo and
the stm32h7s7 disco. They do not have the feature embedded.
Other fixes about non-applicable features.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Added support for the Adafruit Feather RP2040, based on existing board
definitions for the Qt Py RP2040 and others.
Board image (c) Kattni Rembor, CC-BY-SA-3.0 per licensing info at
https://learn.adafruit.com/assets/100345.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
The previous 1ms sleep introduced unnecessary latency
while waiting for the SUSPF flag.
Switching to a 750µs busy-wait provides a more responsive
and precise delay,improving performance in time-sensitive contexts.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
If st_stm32_fmc_sdram compatible is present, get base address and
external memory size. Add stm32f469i-disco overlay file
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
On stm32f469i-disco board, a 16MBytes SDRAM external memory
is connected via FMC to STM32F4 SoC.
Signed-off-by: Philippe Peurichard <p.peurichard@gmail.com>
In current implementation, the attribute of the registered SDP record
will not be included in responding packet if the attribute data length
is more than the MAX payload size(`MIN(SDP_MTU, sad->sdp->chan.tx.mtu)
- sizeof(struct bt_sdp_hdr)`). And it causes the failure of ssa or sa
discovery.
Improve the SDP server to support the case by extending the
continuation state length. A 4 bytes space is extended to store the
attribute offset.
In this way, the attribute can be transmitted in segments according
to the reaming space of the responding buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Clear the suspended status and submit the resume event once the remote
wakeup signaling is finished. Clear the suspended status on bus reset as
well.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Change the adc node's compatible of RZ/G3S to renesas,rz-adc-c
Fix ADC node register size for Renesas RZ/G3S
Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
This patch introduces a new board definition for embedsky’s
TQ‑H503A development board, based on the STM32H503CBT6 SoC.
Tested: successfully built, ran and debug
`hello_world` and `blinky` samples.
Signed-off-by: MA Junyi <mjysci@live.com>
To ensure the case can be compatible with different cameras,
we need customized setting for camera,
so add environment variable to control the configs
Signed-off-by: Hake Huang <hake.huang@oss.nxo.com>
RP2350 features a glitch detector which can be treated as a security
mitigation, and more ways debug adapters can reset CPUs, add those
as well.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
some platforms dont have these doze related symbols defined, and causes
a build error, fix with #ifdef bandaid.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add test that ensures that bt_cap_unicast_group_foreach_stream terminates
correctly if the callback returns true.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function should stop iterating if the callback provided to
bt_cap_unicast_group_foreach_stream returns true.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement the function bt_bap_broadcast_source_foreach_stream that
allows users to iterate on all BAP streams in a BAP broadcast source.
This can be used to easily get reference to other broadcast streams in
the same group as any other stream via the stream->group pointer
or a broadcast source pointer directly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add new API to save and restore SCB context. This is typically useful when
entering and exiting suspend-to-RAM low-power modes.
The scb_context_t and the backup/restore functions are designed to only
handle SCB registers that are:
- Mutable: Their values can be changed by software.
- Configurable: They control system behavior or features.
- Stateful: Their values represent a specific configuration that an
application might want to preserve and restore.
Registers excluded from backup/restore are:
1. CPU/feature identification registers
Motivation: These registers are fixed in hardware and read-only.
2. ICSR (Interrupt Control and State Register)
Motivation: Most bits of ICSR bits are read-only or write-only
and represent volatile system state. STTNS is the only read-write
field and could be considered part of the system state, but it is
only present on certain ARMv8-M CPUs, and Zephyr does not use it.
3. CFSR (Configurable Fault Status Register)
HFSR (HardFault Status Register)
DFSR (Debug Fault Status Register)
AFSR (Auxiliary Fault Status Register)
MMFAR (MemManage Fault Address Register)
BFAR (BusFault Address Register)
Motivation: These registers are read/write-one-to-clear and
contain only fault-related information (which is volatile).
Co-authored-by: Mathieu Choplain <mathieu.choplain@st.com>
Signed-off-by: Michele Sardo <msmttchr@gmail.com>
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Split the RX buffer into multiple sub-buffers aligned to DCACHE boundaries
to ensure proper operation during DMA transceive.
Signed-off-by: jacob kung <jacob.kung@egistec.com>
The Egis ET171 SPI controller was based on Andes ATCSPI200,
but has since been modified. In particular, the WrTranCnt and RdTranCnt
fields from the SPI Transfer Control Register have been moved to dedicated
Wr_Tran_Cnt and Rd_Tran_Cnt registers.
Signed-off-by: jacob kung <jacob.kung@egistec.com>
We already have bt_conn_tx for outgoing buffer user data, so name the
struct for incoming (rx) buffers similarly. Also, update ISO to use this
struct instead of a custom iso_data struct, since the content and purpose
is identical.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Let's assume that if a user sets the linker to be lld (likely with
CONFIG_LLVM_USE_LLD=y) that they also want the native simulator runner
to be linked with it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Allows the SDL display to be tinted in a specific color,
to allow the simulation of monochrome colored displays
like `R8` (`L8` + tint `0xff0000`)
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Keep AHB clock running when CM7 is sleeping and TCM is accessible.
Otherwise, NETC transmission will fail.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Run clang-format on tmp11x.c and tmp11x.h and change `DEFINE_TMP11X` to
prevent too long lines when clang-format is run.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Enable optional storage of sensor attribute values in EEPROM. On reset, the
device goes through a POR sequence that loads the values programmed in the
EEPROM into the respective register map locations.
The driver stores sample frequency, offset, oversampling, lower threshold,
upper threshold, alert pin polarity, alert mode and conversion mode if the
value is continuous or shutdown.
The functionality has been tested with sensor shell and power cycling
sensor:
Test (undocumented) temperature offset is stored:
```shell
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp offset 0
ti_tmp11x@48 channel=ambient_temp, attr=offset set to value=0
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (25.523436)
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp offset 50
ti_tmp11x@48 channel=ambient_temp, attr=offset set to value=50
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.617186)
uart:~$
[15:12:20.088] Disconnected
[15:12:36.106] Connected
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.554686)
uart:~$ sensor attr_get ti_tmp11x@48 ambient_temp offset
ti_tmp11x@48(channel=ambient_temp, attr=offset) value=50.000000
```
Test one-shot mode is not stored:
```shell
uart:~$ sensor attr_set ti_tmp11x@48 ambient_temp 18 1
ti_tmp11x@48 channel=ambient_temp, attr=accel_x set to value=1
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.562499)
uart:~$ sensor get ti_tmp11x@48 ambient_temp
Read failed
[00:00:21.332,000] <wrn> sensor_compat: Failed to fetch samples
uart:~$
[15:16:24.529] Disconnected
[15:16:33.540] Connected
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.406249)
uart:~$ sensor get ti_tmp11x@48 ambient_temp
[...] (75.351561)
```
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Commit increases IV index update testing time for subnet
bridge.
Due to change in startup time for external crystal, test
time expires earlier than test scenario reaches end.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If a project has enabled the clang-tidy check
readability-math-missing-parentheses,
then warnings are raised on usage of
some macros (e.g ARRAY_SIZE and K_MSEC).
Signed-off-by: Sandro Scherer <sand.scherer@gmail.com>
Disable the data interface when the device is disconnected or when the
CDC-NCM and CDC-ECM instances are disabled for any reason.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fixed setsockopt based on socket family and added correct cmsg_type for
parsing ancillary data.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Fix an issue where IPV6_RECVPKTINFO was used instead of IPV6_PKTINFO
when insert_pktinfo was called.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Add IP_RECVTTL or IPV6_RECVHOPLIMIT BSD socket options
that can be used to extract ttl/hop limit from ancillary data
in recvmsg() call.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Remove these legacy kconfig, not necessary.
The DT already has the bindings and nodes required to represent if there
is a FlexSPI and/or SEMC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This Kconfig does not belong in the ADC folder, because there is not
actually a zephyr ADC driver for this. Also, remove HAS_MCUX_ADC_ETC as
well because it is a useless config.
The cmake line to pull in this driver from the SDK in the zephyr repo is
totally unnecessary. If a user wants to use this SDK driver they can add
it to their build like any other SDK driver or any other
external code module. Zephyr should not be a cesspool of random build
glue for random pieces of code.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Only the k2x series socs seem to be pulling in this driver for some
reason, the kconfig is not needed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The only code change to remove this was a redundant usage in the rt1180
soc.c which was not needed because it was redundant, if you catch my
drift.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove the configs that are not actually used for anything anymore or
never were, or that are redundant with other configs, and don't have any
code changes outside of Kconfig to remove.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add verification of the CAP Unicast Audio Start callback parameters.
There was a missing part in the BAP Unicast Client mock that did not
set the ISO state correctly, which caused the procedures to fail, but
without the verification that was not caught.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The LVGL screen_transparency sample was refactored in two ways:
- Remove old obsolete display initialization code. LVGL does not even
react to this code because LVGL color format is determined during LVGL
initialization, which comes before main().
Further, the way it is written right now is incompatible with `AL_88`
color.
- Add some RGB color text for demonstration purposes.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
While both LVGL and Zephyr support AL_88 color, the glue to connect them
was still missing. Now AL_88 should be fully supported by Zephyr+LVGL.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Clear color for ARGB8888 was set to opaque white, which is an odd
choice.
This change makes the clear color "transparent".
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
When rendering an overlay on top of something like a video stream on a
monochrome display, the only way to achieve this right now is by using
ARGB8888 and discarding two of the colors, which is not ideal.
This introduces the new AL_88 pixel format, which is much more efficient
for this usecase.
This change is somewhat inspired by LVGL, which also supports AL_88
natively.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
There was actually three different types of configuration modes
happening here, and this function was getting extremely bulky and hard
to read due to the amount of nesting of conditionals. Split these into
separate functions and call them appropriately depending on the type of
transfer.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is two completely different types of reload modes happening here,
therefore we should split this function into two completely separate
functions because it was getting large and hard to read. Removes
one level of indentation.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Instead of having preprocessor code, make a hidden kconfig
to indicate this and be smarter about the C code (these are all powers
of two)
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The dependency on the chosen node for dtcm can be expressed in Kconfig
language.
Cache we care about is CPU DCACHE, not the meaningless "MCUX Cache"
The macros can be reordered to be simpler by having only one level of
conditional (no nesting) instead of three levels.
Move this code closer in the file to where this cache attribute macro is
actually going to be used (the init macro) instead of randomly splitting
up the struct definitions at the top.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Use a mutex to protect the I2C bus from concurrent access. Replace busy
waiting with a binary semaphore. Process the messages in the interrupt
handler state machine to generate a single transaction. In the
interrupt handler, process the states until nothing more is to do. This
prevents superfluous interrupt entry/exit pairs. Return error
conditions to the caller. Check the messages for consistency and return
an error for unsupported message lists.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Changed to use the raw reading rather than the scaled value, as that's
what the angle calculation is expecting. Added log messages that
communicate magnet sense state.
Signed-off-by: Russ Webber <russ@sentryrobotics.au>
Added tests to demonstrate a safe rollback when either TURN_ON or RESUME
fail. Note: before this PR, rollback would only be valid if TURN_ON
failed, not when RESUME failed.
Signed-off-by: Adrien Lessard <adrien.lessard@rbr-global.com>
In a call to pm_device_runtime_get, if the power domain is taken but
action_cb fails, the power domain is not released.
Signed-off-by: Adrien Lessard <adrien.lessard@rbr-global.com>
Removed the LOG_WRN if the started or stopped callback
for streams are not set. The reasoning is that there is also
the group-wide started and stopped callbacks, and an application
may want to use those instead of the per-stream callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Removed the LOG_WRN if the started or stopped callback
for streams are not set. The reasoning is that there is also
the group-wide started and stopped callbacks, and an application
may want to use those instead of the per-stream callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Test requires at least (2 * page_info.size) size for test area. Because
of that, this commit increases storage_partition size for max32690evkit
and max32690fthr boards.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
The bt_bap_unicast_client_ep_qos function attempts to access
ep->iso->chan.iso->iso, but where some of the pointers may be
invalid. Add an additional check for these.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Set the point-to-point flag because PPP is a point-to-point protocol. This
flag enables specific IPv6 neighbor discovery handling, to select the
correct sending interface. Without it set, a different interface might be
selected based on the destination address.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
GCC version 14.3 does more extensive checking for potentially uninitialized
values and warns about a couple of arrays. Initialize them to zero to make
the compiler happy.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fix compiler errors about variables potentially being used uninitialized.
These are false positives, as the compiler is confused by the
K_SPINLOCK() macro. Explicit initialization avoids these errors.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
gcovr runs gcov to generate temporary coverage files into the gcov
working directory. The working directory defaults to gcovr's -r
argument.
When running twister with the --coverage-per-instance argument, multiple
gcovr instances may run in parallel. Since they all share the same gcov
working directory, they may interfere with each other, resulting in
errors like this:
AssertionError: Sanity check failed, output file
spinlock.h##4167b923a06cc9590c8eef372f016a6d.gcov doesn't exist
but no error from GCOV detected.
To fix this, specify a separate gcov working directory for every test
through gcovr's --gcov-object-directory option.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
In the multiple_central.sh test, same Central bonds with Peripheral
multiple times. Because Peripheral uses different identity for the next
bond, Host by default sees the conflict with the old bond and rejects
the new one. For the test we don't care about security and can simply
replace the old bond.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Calling `bs_trace_silent_exit` after successful test completion of one of
devices causes termination of the entires tests suite without letting
other devices complete the test.
This commit move `bs_trace_silent_exit` call to `test_tick_f` handler,
which is triggered when time set by
`bst_ticker_set_next_tick_absolute` expires.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
In addition to aligning the destination address of all connection
objects during the identity resolution phase, we also need to update the
corresponding address field in the `struct bt_keys` structure for each
of these connection objects.
If we don't do this, `bt_keys_get_type` for that connection won't find
the `bt_keys` structure in the pool and will allocate a new one. This
will result in orphaned `bt_keys` structures in the pool.
This completes the change done in 637dabc3c9
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The event header is already accessed in `bt_recv_unsafe`. If length is
valid there, no point in checking it again in `hci_event` or
`hci_event_prio`.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
During debugging multiple.sh test, a race condition was observed where
advertiser state on Host and Controler was desynchronized.
Below is the sequence of actions led to this issue:
0. Host has queued few priority events at this moment.
1. Controller establishes a connection and stops the advertiser.
2. Controller sends to Host BT_HCI_EVT_LE_ENH_CONN_COMPLETE.
3. Host deprioritizes BT_HCI_EVT_LE_ENH_CONN_COMPLETE event and doesn't
process it immediately.
4. Controller sends to Host other priority events which are processed
immediately.
5. Host wants to disable the advertiser in order to update the Resolving
List (see `bt_id_add`).
6. Host sends to Controller BT_HCI_OP_LE_SET_ADV_ENABLE(Disable)
command.
7. Controller sends to Host BT_HCI_EVT_CMD_COMPLETE event on
BT_HCI_OP_LE_SET_ADV_ENABLE command.
8. Host prioritizes this BT_HCI_EVT_CMD_COMPLETE event, processes it
immediately and clears `BT_ADV_ENABLED` flag for the advertiser.
Note that Controller already has the advertiser disabled after
establishing connection on step 1.
9. Host sends few commands in a row and Controller sends
BT_HCI_EVT_CMD_COMPLETE events that are prioritized (see
`bt_id_add`).
10. Host wants to re-enable the advertiser after updating the Resolving
List.
11. Host sends to Controller BT_HCI_OP_LE_SET_ADV_ENABLE(Enable)
command.
12. Controller sends to Host BT_HCI_EVT_CMD_COMPLETE event on
BT_HCI_OP_LE_SET_ADV_ENABLE.
13. Host prioritizes this BT_HCI_EVT_CMD_COMPLETE, processes it
immediately and sets `BT_ADV_ENABLED` flag for the advertiser.
14. Controller has the advertiser enabled.
15. Host now processes the delayed BT_HCI_EVT_LE_ENH_CONN_COMPLETE
event.
16. Host resets the advertiser state, thinking the Controller's
advertiser is also stopped.
This commit prioritizes LE Connection Complete and LE Enhanced
Connection Complete events to drop advertiser state on Host immediately
once the corresponding event was received.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If connection is failed to establish, the sample will get stuck
eventually and won't do anything while it could re-start advertiser to
try establish a connection again.
This commit makes the sample restart the advertuser if such issue
happens.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When CONFIG_BT_PRIVACY is enabled, we cannot start an advertiser with an
RPA generated for a different identity than scanner role. Therefore, we
need to stop scanning.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds more logs to peripheral_identity sample improve clarity
of what the sample is currently doing.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds more logs to central_multilink sample improve clarity
of what the sample is currently doing.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
- "bt_tbs_set_uri_scheme_list()" function does not setting URI for
GTBS instance. Using "inst_lookup_index()" fixes issue to find
registered GTBS instance for provided bearer_index.
- "bt_tbs_set_uri_scheme_list()" function overrides URI scheme list
with latest provided list. But the expectation is that it should
keep previously added URI schemes and only update new scheme which
are not part existing list. Code is updated to fix this.
- The same function uses net-buf to combine all URI schems for all
TBS bearer if current request is not for GTBS instance. Currently,
the code only uses combined URI scheme list for logging purpose and
it is not used to send for URI Scheme notification to provide
updated GTBS URI scheme to remote. Code is now updated to add
dynamic buffer to add all TBS URI scheme list for GTBS instance
and notify it similar to other functions to optimise memory usage.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
If the chrc->uuid is somehow an invalid UUID, we log it and
terminate the discovery procedure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for executing the CM7 core directly from flash memory
(XIP - eXecute In Place) instead of copying to ITCM. This provides
the following benefits:
- Allows for larger code size than the 512KB ITCM limit
- Simplifies memory management for large applications
- Reduces boot time by eliminating the need to copy code to ITCM
The implementation includes:
1. A new Kconfig option CM7_BOOT_FROM_FLASH (default: n) to control
the execution mode
2. A device tree overlay (cm7_flash_boot.overlay) that configures
the flash memory for CM7 execution
3. Updates to soc.c to calculate the correct CM7 boot address
based on the flash partition
5. Documentation updates with instructions for both execution modes
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Some TBS API functions attempted to take the mutex
of an instance before the NULL check.
Reorder the checks of the functions, and also modify function
to be more similar (using the same terms and structure).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Improve reporting by introducing a configurable reporting interval
and make the report text more useful.
Change TX to always send the same size, as that is what is
expected/required by LE Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Make the reporting interval configurable to make it easier
to actually follow. Improve what gets reported.
Add check for SDU size to ensure correctness when not
using LIBLC3.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is temporary fix for SAADC power consumption. Need to be
removed after hal_nrfx version upgrade.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit introduces a new devicetree property, bits-per-symbol, to
allow the symbol width to be configured from 3 to 8 bits. This change
is particularly beneficial for MCUs that lack DMA for their SPI
peripheral and have a limited hardware FIFO.
This property provides flexibility by allowing developers to select a
slower SPI clock frequency and use the symbol width to scale the
timings to meet strict LED strip requirements, minimizing the risk of
FIFO underruns.
Additionally, using higher-density patterns (e.g., 3-bit or 4-bit
symbols) makes more efficient use of the pixel buffer, which reduces
the RAM footprint required for the LED strip data.
The implementation is optimized with a fast path for the common 8-bit
symbol case, while a generic bit-packing loop handles all other
widths.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Use the device in register accesses. This allows to use this code with
multiple controllers instead of only the "chosen" one.
Signed-off-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
The CI workflow runs on specific paths being touched, add the SDK_VERSION
as one of those paths.
Update to match the CI image with the actual SDK test
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
There are two main issues found with using DLC TX thread,
Issue 1, the RAM consumption. Every DLC will have a dedicated thread
and thread stack.
Issue 2, the thread stack overflow issue. There is no way to strike a
balance between stack size and RAM consumption. Since the deep of call
stack is depended on the upper layer, the thread stack needs to set by
application. Due to the thread stack of DLC is dedicated, RAM
consumption is the product of the added value and the number of DLCs.
Use a TX worker to replace DLC TX thread.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
When the `PTP_UDP_IPv6_PROTOCOL` configuration is enabled
the `mcast_addr` variable is defined as an IPv6 structure, which
doesn't have `s_addr` member.
To not introduce preprocessor guarded code blocks in functions
added union to represent both configurations: IPv4 and IPv6.
Fixes: #92975
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add a Kconfig `BT_L2CAP_CONNLESS` to enable the feature.
Add an API `bt_l2cap_br_connless_register()` to register the monitor
to receive the unicast connectionless data.
Add an API `bt_l2cap_br_connless_unregister()` to unregister the
registered callbacks.
Add an API `bt_l2cap_br_connless_send()` to send unicast
connectionless data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
With inclusion of the optimization flag into the multilib selection
process, we cannot compute the compiler library path when the compiler's
target.cmake is processed as LINKER_OPTIMIZATION_FLAG is not computed until
much later.
Instead, add a function (compiler_file_path) which can be used to locate
the appropriate crtbegin.o and crtend.o files.
Delay computation of lib_include_dir and rt_library until after all
compiler flags have been computed by adding compiler_set_linker_properties
and calling that just before toolchain_linker_finalize is invoked.
Place default implementations of both of these functions in a new file,
cmake/compiler/target_template.cmake, where we assume the compiler works
like gcc or clang and handlers the --print-file-name and
--print-libgcc-file-name options. Compilers needing alternate
implementations can override these functions in their target.cmake files.
These implementations require that no generator expressions are necessary
for the compiler to compute the right library paths.
This mechanism is also used to take any additional compiler options by
adding a new (optional) linker function,
toolchain_linker_add_compiler_options, which maps compiler options to
equivalent linker options, discarding any that aren't applicable.
Signed-off-by: Keith Packard <keithp@keithp.com>
The linker may want to know the desired optimization level as when
the multilib configuration includes -Os as a selector.
Adopt the same pattern as the assembler optimization flags by allowing
toolchains to specify linker optimization flags which default to the
compiler optimization flags and the apply those using add_link_options.
Signed-off-by: Keith Packard <keithp@keithp.com>
A pull-up should be described in hardware (device tree) instead of
software.
Also interrupt on edges instead of the level.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
In order for samples/boards/nxp/mimxrt1060_evk/system_off to work, a
soft-off power state is needed.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Adding overlays for Infineon kit_psc3m5_evk board to kernel/common,
kernel/timer/timer_error_case and kernel/timer/timer_api tests
when run in secure mode. These tests require more memory than
the board assigns to secure mode by default.
Signed-off-by: John Batch <john.batch@infineon.com>
This reverts commit 01ab719ed7.
This is no longer needed, as we now have a scalable solution
using a vendor-specific resource table, which allows each vendor
to define its own supported features.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Remove the FW_READY reply config, as it's not required for
the M7 core on i.MX8M Plus.
This setting triggers an interrupt to the host, which is
unnecessary in the case of M7 (check host-side imx_rproc
driver in Linux).
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Update for both 8QM and 8QXP, the nxp_openamp_imx8-adsp board
configuration to enable vendor-specific resource table features
instead of FW_READY reply config.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Update the imx8mp_evk_mimx8ml8_adsp board configuration to enable
vendor-specific resource table features instead of FW_READY reply
config.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
i.MX943 M33 supports multi-level interrupt with NUM_IRQS 405.
Current ram_context_for_isr test does not cover multi-level interrupt.
So exclude i.MX943 M33.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added tag protocol definition and binding. Also introduced
zephyr,dsa-port compatible for future tag protocol driver Kconfig
dependency checking.
Updated existed dts.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
A logging module named `tls_credentials` was being declared, but no
other source module was creating and registering it. Do the registration
in the file to fix the compiler error.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add docs about what main/sub mode combinations are considered valid
by spec.
In hindsight it would've been smarter to expose only one enum for both,
such that the user can't select invalid combinations.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Filter duplicate entries in `kconf.kconfig_filenames` before calling
`os.path.realpath`.
Before (current code), all entries in `kconf.kconfig_filenames` go
through `os.path.realpath`. Including all duplicate entries.
With the proposed change, the duplicate entries are removed before
calling `os.path.realpath`.
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Some applications may need to modify their code to account
for the changes to struct bt_audio_codec_cfg.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Wait acts as a boolean, make this clear to avoid implementations
interpreting this as a duration to wait for.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
The FUEL_GAUGE_BATTERY_CUTOFF enum property was never used and never tested
nor was it intended to be. This property unfortunately made it past review.
Remove it. This is unlikely to cause a breakage since no upstream driver
ever implemented it as a property.
Signed-off-by: Aaron Massey <aaronmassey@google.com>
The Holyiot YJ-17095 module provides Bluetooth low energy (BLE)
connectivity in a very small form factor of 9.4mm x 9.25mm.
Signed-off-by: Marc Lasch <mlasch@mailbox.org>
Use the Android Bluetooth SBC encoder and decoder.
The Android Bluetooth SBC is put as external library (libsbc).
sbc.c/sbc.h implement the interface that is compliant with
Zephyr style and can be used by Zephyr's other modules (
like A2DP).
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Correct the command line option from --coverage_basedir to
--coverage-basedir to match the actual twister argument syntax.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Implement Start Discovery command Accept Filter List filtering.
Add a flag to the command's flags field to enable filtering.
Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
current the dir-pin is getting set each and every time perform_step
is called, this is inefficient, since the direction pin shall be set
only once, when a motion command(move_by/move_to/run) is called.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
smp_client is automatically freeing all net_buf* given for it,
so testcase does not need to call smp_client_buf_free() for
buffers that are processed.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The SNVS RTC can act as a wakeup source, re-use pm.yaml properties and
remove the Kconfig symbol.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
If `bt_send` returns 0, the buffer will be unreferenced by an hci
driver. If it returns error, the buffer won't be unreferenced.
Since it is a test, simply check that `bt_send` always returns 0
otherwise fail the test.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This reverts commit 40f08428d3.
The PCNS and ICNS registers of the mimxrt798s's GPIO0 peripheral allow
accesses to be set up only with mutual exclusivity (either the
cm33_cpu0 or the hifi4), thus the access is reverted to the cm33_cpu0
domain.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Remove INPUTMUX interrupt assignments for PINT and GPIO peripherals.
Remove gpio0 DT node.
As the GPIO peripherals can be secured on the mimxrt798s, accesses from
the cm33_cpu0 and hifi4 are mutually exclusive, so the GPIO0 will stay
enabled in the cm33_cpu0 domain.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add a build error conditional for mimxrt700_evk/mimxrt798s/cm33_cpu0,
thus disabling build for the hifi4 domain. Remove that target from
platform_allow in sample.yaml.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
ARC MWDT C library does not have an implementation of the strnlen
function, so we have a wrapper over standard-compliant strnlen_s.
However, there is no declaration of the wrapper, so add one.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
The issue is caused by default stack size 1500 bytes of NET_RX_STACK_SIZE
is to small for ARM64 platform, then the stack of net_rx thread is
overflow and break the net_mgmt thread's stack, as a result net_mgmt thread
is crashed.
So this patch will enlarge all the stack size of net stack threads.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
There are multiple bugs related to continuous/circular mode.
Continuous/circular mode is where the DMA runs continuously
until the stop API is called, instead of auto-stopping on
completion on a single transfer. After a stop, the DMA
can then be reconfigured/restarted.
1. Fix bug where stop didn't actually stop. This can cause memory
corruption if the user thought the DMA stopped and repurposed
the dest memory, but in fact the DMA is still writing to it.
The bug was due the incorrect usage of the DMA controller busy
state. The DMA controller is busy only when a transfer is
actively in progress, but the driver needed to stop even if
the transfer is not active but is only enabled (and may become
active on a subsequent trigger event). Change so that data->busy
doesn't use the DMA controller busy state but tracks the enable
state. Also, to make it doubly safe, make stop function always stop
regardless of data->busy state because it is alway safe/correct
to do so.
2. Fix race condition where a stop request from another ISR might race
with a DMA completion interrupt, and the DMA completion callback
gets invoked after the DMA has already been stopped. The fix
is to unregister the callback with the sdk DMA driver, so the
ISR still runs and clear the interrupt without invoking the
callback. There is potentially still a race if the interrupt
is restarted before the ISR fires, so the callback might be
called too early. However, the Zephyr DMA driver doesn't
have the channel level details that the SDK driver does and
it cannot clear just the channel interrupt.
Also a couple of general fixes/improvements:
a. Use interrupt B for end of transfer (single transfer or end
of block list). Use interrupt A for interrupts of a block
in the middle of a transfer or for continuous/circular transfers.
This fixes the dma callback so it can properly report
DMA_STATUS_BLOCK vs DMA_STATUS_COMPLETE.
b. Reorder some fields in struct channel_data to pack a little
better in memory
Signed-off-by: Mike J. Chen <mjchen@google.com>
The dma driver was determining src_inc and dst_inc from the
config of the first block buffer and ignoring the config
flags for any additional buffers in the chain, which could
lead to incorrect transfers (e.g. in a multiple rx buffer
case, if the first buffer was to receive to NULL,
but the subsequent buffers were not NULL, the bug
would manifest as all transfers being made with
dst_inc of 0). Change the driver to setup
each dma descriptor according to the addr_adj flag
of each block_buffer.
Add check that peripheral transfers have addr_adj set to
NO_CHANGE instead of assuming it, to help catch errors.
Also now check for invalid addr_adj request of
decrement, which this controller doesn't support.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The spi_mcux_flexcomm driver uses a special last DMA blk_cfg
to trigger a release of the SPI chip select. This transfer
is always a 4-byte transfer, regardless of the width specified
during dma_configure().
The way the spi_mcux_flexcomm driver communicated this special
transfer was kind of a hack, where the dma_mcux_lpc driver would
assume that when a blk_cfg with source_addr_adj and dest_addr_adj
both set to NO_CHANGE was for this SPI_TX special case.
However, this is an unsafe hack since it is perfectly valid
to have dma use cases for both src/dest_addr_adj to be NO_CHANGE
that is not for SPI_TX. One example is when transmitting a
fixed/repeating value to a periperhal address (e.g. send 100
bytes of the same value from a single memory address over SPI).
This CL introduces a dma_mcux_lpc specific dma channel_direction
which the two drivers now use to cleary request this special
transfer case.
Signed-off-by: Mike J. Chen <mjchen@google.com>
In spi_mcux_transfer_next_packet(), if the next
transfer start fails, add calls to
spi_context_cs_control() to release cs and
spi_context_complete() with error code -EIO.
Signed-off-by: Mike J. Chen <mjchen@google.com>
The current driver implementation would block even when the async
API was invoked, so it wasn't really async.
This CL also fully chains the DMA transfer using multiple dma blocks
and makes the number of dma blocks available a config value. The
increase in number of dma blocks is needed so that a spi_buf_set
that has many entries can be converted into chained dma transfers
with the last transfer in a separate block that will set the EOT flag.
Also make some improvements:
1) When doing single cnt transfer, don't use the SDK driver but
use a new fucntion spi_mcux_transfer_single_word().
It's much more efficient and does not use an ISR
like the SDK function does just to send one word.
2) Fix calls to spi_context_update_tx/rx() so that the
correct word size is passed in, instead of previously
being hardcoded to 1. This only matters when word size
is two. Evaluate the word_size_bytes and word_size_bits
once and store the values in data instead of computing
it multiple times in various parts of the driver
3) When CONFIG_SPI_MCUX_FLEXCOMM_DMA is defined, we
do not use the IRQ handler, so add #ifdefs to compile
that code out. This reduces code size.
Signed-off-by: Mike J. Chen <mjchen@google.com>
This reverts commit a3530d6a43.
This change incorrect if chip-select is via a GPIO pin,
released by spi_context_cs_control(), and not the controller
default chip-select pin that can be released using a final
FIFOWR.
When GPIO is used for chip-select control, the chip-select could
be released too soon because the transfer callback is invoked
when the last byte is put into the TX FIFO but that byte might
not yet have clocked out yet on the SPI pins. The rx part of
the transfer is really what completes the transfer so ignoring
it is incorrect.
We could try to special case and use ignore only when
spi_context_cs_control() does nothing, but since it is a very
small optimization, it doesn't seem worth the extra
complexity.
Signed-off-by: Mike J. Chen <mjchen@google.com>
It might come in handy to filter the output of a device list
command, by adding a filter (auto-completion enabled as well).
Such as:
$ device list uart
devices:
- uart@2f8 (READY)
DT node labels: uart1
- uart@3f8 (READY)
DT node labels: uart0
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Co-authored-by: Dimitris Karnikis <dika@bang-olufsen.dk>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
It might come in handy to access non-initialized devices throuhg the
shell. I.e. devices which 'zephyr,deferred-init' DTS attribute was set.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
It is actually easy to have device name going beyond 20 characters.
There is a maximum defined internally, better using it.
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
wakeupmix keep power on state is essential for system
suspend mode, because of console uart locate in it.
temporarily set the M7 mix to power on,
further optimization will be carried out later
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Added scmi_cpu_pd_lpm_set api for nxp imx scmi interface
This api set the lpm setting for some peripherals applied
when cpu enter a low power mode, such as keep iMX95 wakeup mix
power on when M7 core enter suspend mode, scmi agent record and
deal with this request
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
SCMI processor interrupts from agent are enabled by default during the
`setup_chan` initialization phase. This is suitable for interrupt-driven
communication, where the agent triggers an interrupt to notify the platform
after completing a message transaction.
However, when using the polling model, interrupts are not required and may
cause unintended behavior or performance issues in PM.
To ensure correct operation under polling mode, the interrupt should
be explicitly disabled after channel setup.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
SCMI supports both polling and interrupt modes for message completion.
Previously, the scmi_send_message() API used a 'pre_kernel' flag to
determine which mode to use_polling during the pre-kernel phase and
interrupts post-kernel.
This approach tightly coupled the decision logic with kernel state,
limiting flexibility. In particular, certain power management (PM)
related SCMI APIs require polling mode even in post-kernel context
to avoid unintended CPU wakeups caused by interrupts.
This patch replaces the 'pre_kernel' with a more generic
'use_polling' parameter, allowing callers to explicitly specify
the desired behavior. Typical usage can still rely on k_is_pre_kernel()
to determine polling mode in higher level api, while PM related
calls can directly enforce polling regardless of kernel state.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
The ID of the sample is wrong, so it is not possible to link
to the sample documentation. I found this issue when working
on a shield for the VCNL4040 proximity sensor.
To my knowledge, there are no references to the invalid ID yet.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Unreferencing a buffer that has already been freed should trigger an
assertion as it indicates a critical logic error and potential security
concern.
Signed-off-by: Jordan Yates <jordan@embeint.com>
There is no need for a custom assert macro that is only used once, or
conditional compilation of the assert macro based on `__ASSERT_ON`. If
assertions are disabled the compiler should simply discard the code.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The new option is HAS_BT_CTLR, however since it's a promptless option,
disable the native link layer instead, which most likely was the intended
effect.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
support interrupts for rx_ready, so we can use the
time we are waiting for other stuff.
implement async spi transfers.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Error message HARNESS:Console:no regex patterns configured
is shown when sample.sensor.accel_trig sample is run.
The error occurs because harness configuration is changed
(a fixture is added) in the test case. When the configuration
is changed in a test case, common configuration is not
inherited and required properties need to be redefined.
Add console harness configuration for the test case.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
All pins are configured by default to be output low during sleep.
A device-tree property called "sleep-output" is provided for cases where
pins need to be configured differently.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
By default, all pins will be set to output low in sleep. The LED pins
should output high in sleep so that its stays inactive.
The RESET pin of the LCD display should be left high as well in sleep.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This property allows a user to specify the operation of a
pin in sleep mode.
By default, pins are configured to be output low in sleep mode.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
the commit adds sys_mm_drv_map_page_safe and sys_mm_drv_map_region_safe
functions, wrappers for sys_mm_drv_map_region and sys_mm_drv_map_region,
with additional check if a mapped region fits into given memory range
Using of those prevents collisions and/or hijacking of virtual memory
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
this marker is an address of the very first byte not used by the linker,
with alignment to cacheline
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
this commit removes creation of virtual memory regions from
Zephyr, allowing the application to create required regions
It is up the application to use virtual memory as needed,
zephyr however is keeping the table and ensures no memory
addresses overlaps
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Do not use the custom buildlib configuration for the RMX series as it
was replaced with several even more specific configurations in the
recent MWDT release. Pass the generic RMX option to the linker instead.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
The option -Hlld of the MWDT linker is relevant only for classic ARC.
It is incompatible with ARC-V platform options like -av5rmx.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Use channel 0 for RTC wrapping. Skip that channel when processing
channels.
Fix algorithm that prevents setting CC=0 when custom wrapping is used.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Allow changing delays via Kconfig values.
Use identical delay (`SHELL_MQTT_WORK_DELAY_MS`) for connect, subscribe and
process work instead of varying 1 or 2 second delay.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Update the net-tools revision to include support for managing host CAN
interfaces (e.g. zcan0 as used by the Zephyr native Linux SocketCAN
driver).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Implement the unicast to broadcast handover procedure,
as per the Bluetooth CAP specificiation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit adds changes which are necessary to support
the AES256 encryption algorithm in mcuboot.
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Changed the number of mandatory options of `rts threshold` to 1, so as
to allow no arguments for querying.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Currently the build assert checks the number of I2C instances as
the available I2C target mode, which is incorrect.
This patch updates the build assert to check the I2C port_num instead,
since IT51xxx only supports I2C target mode on ports 0 to 2.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This allows the software secure enclave to be changed to a
different implementation, which currently is not possible
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Drop the logic to use the generator "flash" target, that is using west
anyway, always call flash directly anyway so that those targets can be
deprecated.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
- There are linker file directives that must come at the
start of the noinit region. For example, the directive
that allow that section to not exist in RAM before a
certain address (. = MAX(ABSOLUTE(.), 0x34002000);).
- Before this update, those could only be added to the end
of that region. They will now have the option to be at the
beginning or the end.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Added mikrobus_serial, mikrobus_spi and mikrobus_header node
labels to EK-RA8D1 device tree board definition, allowing
compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.morris.vf@renesas.com>
Update the initializers to support platforms with multiple instances
of the DesignWare interrupt aggregator. Also ensure that the initialize
function calls irq_enable(). The calculation of the _sw_isr_table entry
also now takes CONFIG_GEN_IRQ_START_VECTOR into account.
Signed-off-by: Aaron Fong <afong@tenstorrent.com>
add a test case for display using display harness
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Co-authored-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Some NXP SoCs have dedicated interrupts for controller and target roles.
The i2c_mcux_lpi2c driver connects only one interrupt.
Add connection of the second interrupt, if enabled, to support SoCs with
split role interrupts.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
If webserver uses custom socket creation,
and it's family is AF_UNSPEC, net_sprint_addr will return NULL,
which leads to LOG_DBG crashing with busfault.
Add NULL check for that.
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
The NET_CONN_LOCAL/REMOTE_PORT_SPEC flags were set on the connection but
not really used. At the same time, when remote address was being
cleared, only the flag was unset, but the actual port number left
intact. This could lead to false port comparisons when remote address
was cleared from the connection context.
In order to avoid that, use the NET_CONN_*_PORT_SPEC flags to determine
whether to compare local/remote ports instead of checking the port value
right away (which may not be valid anymore if the flag is unset).
Also align with MISRA rules when comparing flags in other cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As per POSIX, for non-connection-mode sockets the peer address should be
reset if AF_UNSPEC family type is provided to the connect() call:
"If the sa_family member of address is AF_UNSPEC, the socket's peer
address shall be reset.""
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The legacy USB device stack configuration used in the board
configuration overlay files has been deprecated. It is not causing CI
failures because the board lacks a test feature 'video' and is filtered
out in CI.
Besides the deprecated configuration, the sample code does not enable
the USB device stack, so it is not used anyway. Even if it were needed,
the correct way to enable logging via USB CDC ACM would be to use the
cdc-acm-console snippet.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The `sysconf()` implementation in Zephyr can be macro-based or
library-based. Both approaches use the same set of runtime-invariant
definitions in `sys/sysconf.h`.
These were previously fine, as long as POSIX limits were
guaranteed to be defined. However, some C libraries omit definitions
for runtime-invariants values and instead force the application to
query values via `sysconf()`.
The specification formally supports that approach [1]. Normally,
definitions are allowed to do so "on specific implementations where the
corresponding value is equal to or greater than the stated minimum, but
is unspecified." In practice, that is not always the case, but we need
to be able to compile `sysconf()` anyway.
Notable constants that are missing in Picolibc or Newlib include:
- AIO_LISTIO_MAX
- AIO_MAX
- AIO_PRIO_DELTA_MAX
- CHILD_MAX
- DELAYTIMER_MAX
- HOST_NAME_MAX
- IOV_MAX
- LOGIN_NAME_MAX
- MQ_OPEN_MAX
- MQ_PRIO_MAX
- OPEN_MAX
- PAGESIZE
- PAGE_SIZE
- PTHREAD_DESTRUCTOR_ITERATIONS
- PTHREAD_KEYS_MAX
- PTHREAD_THREADS_MAX
- RTSIG_MAX
- SEM_NSEMS_MAX
- SEM_VALUE_MAX
- SIGQUEUE_MAX
- SS_REPL_MAX
- STREAM_MAX
- SYMLOOP_MAX
- TIMER_MAX
- TTY_NAME_MAX
For greater portability, define those values using
1. a Kconfig-derived definition,
2. a symbolic minimum value (required by the spec), or
3. a numeric minimum value (if the required symbolic minimum is missing).
[1]
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Use the native zephyr sys_clock_gettime() call instead of the XSI
gettimeofday(), since XSI is not required here and would normally
require CONFIG_XSI_SINGLE_PROCESS to be selected.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
- Seems most boards add the chosen property in the base devicetree as
well, so do the same.
- Tested on samples/subsys/mgmt/mcumgr/smp_svr
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- The fs layout for MCUboot on bcf has the following requirements:
- slot0 and slot1 are on different flash (say A and B).
- flash A and B have different sector sizes (8K and 4K).
- slot1 should be >= slot0. This is due to the fact that slot0 is in
the soc flash. Hence want to have as much usable space as possible.
- Taking all of the above into consideration, swap using scratch seems
to be the appropriate algorithm for bcf.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- MCUboot seems to work fine with 40K partition. However, it seems like
swap using scratch algorithm does not work when slot partition size is
not a multiple of scratch partition size. So made this partition 56K.
- Tested using samples/subsys/mgmt/mcumgr/smp_svr
- Only uses a bit over 32K. Since flash sector size is 8K, 40K partition
seems to be a good choice with decent headroom.
- The final partition is as follows:
- MCUboot: 56K
- slot0: 640K
- slot1: 640K
- scratch 128K
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Ensure that minimum values are numeric and align with the specification.
Define runtime invariant values using Kconfig options or constant
minimum values.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
- Adds JEDEC-ID check to the flash_mcux_flexspi driver
if it is defined in DTS.
- Avoids applying DTS settings to a different flash module.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Allows returning image information for the firmware loader image
slot, showing version of the application and flags
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
With the recent upgrade of the LDMA driver, these conf files are no
longer needed. (The LDMA driver now supports channel allocation and
large transfers)
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
We need to add CONFIG_DMA_MAX_DESCRIPTOR=16 for a lot of tests, then
this default value of this parameter need to be higher. It allows to
delete some overlay files.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The LDMA driver currently has a 1:1 mapping between hardware LDMA
descriptors and struct dma_block_config. This patch allows multiple
hardware descriptors to be allocated for a single struct dma_block_config
if the block size exceeds the transfer capacity of a single hardware
LDMA descriptor. This is beneficial for other peripheral drivers: it is
no longer necessary to split the payload by the transfer capacity of a
single hardware LDMA descriptor.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The Pico 2W board is similar to the Pico 2 apart from the addition of an
Infineon Wifi chip.
This commit is based on the Pico and Pico W setup.
A different sample application is shown as blinky is not yet supported
on the Pico 2W.
Signed-off-by: Magpie Embedded <magpieembedded@gmail.com>
This file is not referenced anywhere, and the operating systems that
would require it are EOL. Remove it from the tree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The nPM1300 datasheet featured wrong soft start current values which
were also used in the DTS bindings for its regulator driver. This fixes
the values aligning them with the next release of the document.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
The MWDT linker has a specific input section sorting mechanism,
designated as x$y. Some prebuilt ARC libraries actually use it,
causing a lot of warnings when the linker decides where to place
their symbols. Provide explicit instructions in the linker script
instead of making the linker guess.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Introduce the ACE 4.0 architecture, along with support for the NVL and
NVL-S platforms within the Intel ADSP framework in the Zephyr project.
This update includes:
- Addition of ACE 4.0 architecture configurations in Kconfig and
Kconfig.intel_adsp.
- Inclusion of device tree source files for NVL and NVL-S platforms,
defining CPU, memory, and peripheral configurations.
- Updates to driver files to support ACE 4.0 specific features,
including DMIC and SSP configurations.
- Introduction of new header files for ACE 4.0, detailing boot,
interrupt, IPC, power, and shim functionalities.
- Modifications to the CMakeLists.txt to include ACE 4.0 MMU support.
- Addition of default configurations for NVL and NVL-S platforms in
Kconfig.defconfig.ace40.
The NVL and NVL-S platforms are part of the Nova Lake series, targeting
advanced audio processing capabilities. ACE 4.0 introduces enhanced DSP
capabilities and advanced power management features, improving audio
stream handling and synchronization compared to ACE 3.0.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
When the kso[17:16] lines are enabled and `CONFIG_ASSERT` is
configured, the following error occurs: "Input cannot be
enabled for 'Open Drain', 'Open Source' modes without Output."
To address this, this commit configures kso16 and kso17 as
gpio output before applying the pinctrl settings.
Tested with: no abnormal keyscan occurs during
initialization
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
To reduce power consumption, the SPI clock is gated when no spi
transaction is in progress. With this mechanism, current
consumption is reduced by approximately 0.1mA when cpu idle.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This commit removes gpio-based cs support as it8xxx2 spi
only supports transactions using the dedicated cs pin.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
If LVGL uses a work queue thread, we can't call LVGL functions from the
main thread. Use a k_event variable to signal between threads.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add helper functions that can be used to lock/unlock the LVGL's internal
mutex before calling API funcions.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Commit f499ea0 made it so that the compiler optimization flags are also
passed to the assembler. However, this breaks for the IAR toolchain
since it uses the GNU assembler which does not have the same
optimization flags as the IAR compiler.
This commit separates the compiler and assembler optimizations to make
it possible to specify appropriate flags in a toolchains corresponding
`compiler_flags.cmake`
Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
Added ABB analog status lock read retries if needed.
After cpu idle ABB macro may need some time to initialize
and report status locked. Attempts cound can be configured
using Kconfig option.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
added Real-Time Clock driver support for Texas Instruments
MSPM0 Family, currently this driver supports rtc time keeping
and calendar alarms functionality
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
This commit brings a shell command to retreive the following application
version information:
- APP_VERSION_STRING
- APP_VERSION_EXTENDED_STRING
- APP_BUILD_VERSION
Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
A recent change triggered a warning in LLVM that was promoted to error
when run with twister.
```shell
goep.c:102:3: error: label followed by a declaration is a C23 extension
[-Werror,-Wc23-extensions]
102 | int err;
```
Add a scope to the switch case so that the declaration has proper scope.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A recent change caused tests to start failing for qemu_x86_tiny/atom .
Similarly to bda38f033a, reduce the number of
reserved pages so that the test suite can pass for this platform.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Use HAL functions, which also wait for reset to complete.
Remove unused register size and active-low DT props.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
After the #93703 PR was merged we get a possibility to remove _node field
from bt_conn_cb struct if the BT_CONN_DYNAMIC_CALLBACKS option is disabled.
The list conn_cbs can also be safely removed by more macro usage.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
CONFIG_BT_CTLR_DATA_LENGTH_MAX should set its default value up to
and including the maximum value supported by the Bluetooth spec
(251 bytes).
Signed-off-by: Sam Friedman <sam@golioth.io>
In most circumstances, GPIO pins identified in devicetree are
assigned to the SIO function at initialization. However, there
are cases where pin assignments change in alternate pinctrl
configurations. This commit adds the necessary definitions to
specify GPIO opration in pinctrl.
Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
Respect the newly introduced CONFIG_CAN_SAMPLE_POINT_MARGIN Kconfig option
when verifying if timing can be met.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add a Kconfig option for setting the maximum acceptable deviation in sample
point location (permille).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Clarify that the uart "attach commands" can be really anything
the shell can run.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's better refer to the board by the name "native_sim",
and leave the "native simulator" for the underlaying common
component which is shared with the nrf*bsim targets.
native_sim is the "plain vanilla" native simulator build with
some trivial HW models.
While the nrf*bsim targets use the native simulator (without those
trivial HW models), and expand it with the Nordic HW models.
Hopefully that helps people understand what is common and what
is not.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's update this west module/project collaborators:
wopu-ot & thoh-ot have been out of the picture for these HW models for
quite a while now, while rugeGerritsen has been much more active.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As discussed here[1], CONFIG_SOC should rely on CONFIG_SOC_* variables
while it currently rely on CONFIG_SOC_PART_NUMBER_*. These variable are in
fact misnamed since the migration to HWMv2. So "PART_NUMBER" has to be
removed from these names.
[1]: https://github.com/zephyrproject-rtos/ \
zephyr/pull/93285#discussion_r2221382981
Note, this patch has been generated with:
sed -i -e s/SOC_PART_NUMBER_MGM/SOC_MGM/ \
-e s/SOC_PART_NUMBER_EF/SOC_EF/ \
-e s/SOC_PART_NUMBER_SIM3/SOC_SIM3/ \
-e s/SOC_PART_NUMBER_SIWG/SOC_SIWG/ \
soc/**/*.soc boards/**/Kconfig.*
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Currently, the options related to the Rail library are just prefixed by
RAIL_. We prefer to keep all the options related to Simplicity SDK into the
same namespace.
So, just add the required prefix to these options.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Fix the case where multiple I2S channels are used at
the same time by using the fifo combine feature.
Signed-off-by: Davi Herculano <herculanodavi@gmail.com>
It's not very clear about the function of ptp_clock_rate_adjust in doc.
Previously, all device drivers used it to adjust rate ratio relatively
based on current frequency.
When PI servo was introduced in PTP and gPTP stacks, NXP ENET PTP driver
started to use it to adjust rate ratio based on its nominal frequency.
Rate ratio adjustment based on nominal frequency with PI servo could
get stable frequency control. So, let's clarify ptp_clock_rate_adjust
adjusting rate ratio based on nominal frequency, and convert other
device drivers.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Enable test for all channels on both cm33 and cm7 core.
This test covers following test cases:
- test_set_top_value_with_alarm
- test_valid_function_without_alarm
- test_set_top_value_without_alarm
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
1.Add dts bindings nxp,lpit-channel.yaml and nxp,lpit.yaml
2.Provide counter driver based on lpit driver from NXP mcux-sdk-ng
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Fix Coverity CID 529858 (CWE-252): Previously, the return value of
pm_device_runtime_get() was not checked during PM resume, which could
lead to missed error conditions.
This patch ensures proper error handling by checking and propagating
the return status of the call.
Fixes: #92608
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
According to the OBEX Version 1.5, the Name header could be a empty
string.
Update function `bt_obex_add_header_name` to support the case that the
length of name could be 0.
Update function `bt_obex_get_header_name` to support the case that the
name header is found but the name length is 0.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a TLV array `tlvs` to keep the pending TLV data.
Update `app_param`, `auth_challenge`, and `auth_rsp` to set the one
TLV information each time. When the optional argument `last` set,
write the all pending TLVs to the tx buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a structure `struct bt_obex_tlv` to pass/save the one TLV info.
Use a array of `struct bt_obex_tlv` as the set of all TLV-triplets.
Update the following functions to support the feature, including
`bt_obex_add_header_app_param`, `bt_obex_add_header_auth_challenge`,
and `bt_obex_add_header_auth_rsp`.
Add a function `bt_obex_tlv_parse` to parse the encoded TLV-triplets.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There are types of string can be added by using OBEX adding header
function bt_obex_add_header_*(). One is byte sequence. Another is null
terminated Unicode text.
Add a function bt_obex_string_is_valid() to check if the added string
is valid. And add a function bt_obex_unicode_is_valid() dedicated to
check Unicode string.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add commands for GOEP to test OBEX features.
Add command `alloc-buf` and `release-buf` to allocate and release TX
buffer.
Add command set `add-header` to add the OBEX headers to allocated TX
buffer.
Add command set `client` to send OBEX client requests with allocated
TX buffer.
Add command set `server` to send OBEX responses with allocated TX
buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add commands for GOEP to test transport features.
Add commands for transport over RFCOMM, including `register-rfcomm`,
`connect-rfcomm`, and `disconnect-rfcomm`.
Add commands for transport over L2CAP, including `register-l2cap`,
`connect-l2cap`, and `disconnect-l2cap`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The MTU of the GOEP should be not less than 255. So, if the transport
is RFCOMM, the CONFIG_BT_BUF_ACL_RX_SIZE should be not less than 264.
It includes,
- 255 bytes for the minimum MTU of GOEP,
- 4 bytes for L2CAP Header,
- 5 bytes for RFCOMM header and FCS.
And if the transport is L2CAP, the CONFIG_BT_BUF_ACL_RX_SIZE should
be not less than 259.
It includes,
- 255 bytes for the minimum MTU of GOEP,
- 4 bytes for L2CAP Header.
Add Kconfig `BT_GOEP_RFCOMM_MTU` to configure the maximum size for
RFCOMM transport. The range of `BT_GOEP_RFCOMM_MTU` is
`[264, BT_RFCOMM_L2CAP_MTU]`. And the GOEP MTU via RFCOMM transport
should be in the range `[255, (BT_GOEP_RFCOMM_MTU-9)]`.
Add Kconfig `BT_GOEP_L2CAP_MTU` to configure the maximum size for
L2CAP transport. The range of `BT_GOEP_L2CAP_MTU` is
`[259, BT_BUF_ACL_RX_SIZE]`. And the GOEP MTU via L2CAP transport
should be in the range `[255, (BT_GOEP_L2CAP_MTU-4)]`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a Kconfig BT_GOEP to control the GOEP feature.
Implement the GOEP protocol and transport, both for GOEP 1.1 and GOEP
2.x.
For GOEP transport, OBEX over RFCOMM, and OBEX over L2CAP are
supported.
For GOEP protocol, `put`, `get`, `abort`, `setpath`, and `action` are
supported. And only one operation can be processed at the same time.
The feature `Reliable Session` is unsupported.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
L2CAP channels will now, along with the ident, store the opcode of the
pending request. This commit expands the ident lookup function to also
compare received response types to this opcode, and will ignore
unsolicited responses.
Setting of idents for channels are moved after verification of buffer
allocation for the request to be sent. A TODO is added for improving
this functionality at a later time.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Modify mcxw7x_ewm.overlay name to app_ewm.overlay, make overlay
file more universal.
Record mimxrt1180_evk platform into testcase.yaml.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
emw clk designed on RT1180 can be chosen by CLKCTRL register,
add code to get sel from dts and configure it in driver.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add the extended operations to the Andes XIP flash driver.
The extended operations supports:
- reading status registers of the flash chip
- changing status registers of the flash chip
- software lock of the status registers
- modifying SPI read command used in memory-mapped mode
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Auto-format using clang-format, esp. for the aligning backslahes and a
couple of manual edits to fix checkpatch.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These are helpful for logging in data-path, not to overwhelm the
console but still keep the user informed about the issues.
This is similar to printk_ratelimited in Linux kernel.
Add only basic build tests for now.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add clock control driver with minimal functionality.
Implement basic on, off, get_status and get_rate API.
Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
Adds initial SoC-level support for the Microchip SAM D5x
and E5x series, including SoC definition files.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Adds common and SoC-specific .dtsi files for the Microchip
SAM D5x/E5x family. These files define core peripherals,
address maps, and interrupt controller structure shared
across the SAM D5x/E5x variants.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
- Update the variable type for R_ETHER_CallbackSet in
eth_renesas_ra.c
- Update HAL callback event handler to be compatible with FSP 6.0.0
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Signed-off-by: Ta Minh Nhat <nhat-minh.ta.yn@bp.renesas.com>
Midify to use ``p_phy_lsi_cfg_list`` in ``ether_phy_cfg.p_extend``
instead of using ``phy_lsi_type`` and ``phy_lsi_address``
in ``ether_phy_cfg``. Update for mdio_renesas_ra
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
The p_context no longer has the const type, so all
Renesas-supported drivers need to be updated accordingly.
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
This functionality is implemented in the HCI-facing side of the
controller and the ULL. LLL functionality is not implemented in this
commit.
Furthermore, this removes a dependency for LE Power Control, as the
features are related, but not necessarily required.
Signed-off-by: Tyler Joseph Huffman <tyhu@demant.com>
Set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=256 for COBS tests to ensure
malloc() succeeds during test fixture allocation in cobs_test_setup().
When using minimal libc, CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE defaults
to 0, causing malloc() to fail and the zassume_not_null(fixture)
assertion to trigger test setup failure.
Fixes test execution with minimal libc configurations.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
- CMSIS RTOS v1: link to the dedicated page in arm-software cmsis 5 docs
- the old link was forwarded to the overview page of CMSIS v6
- CMSIS RTOS v2: link to the dedicated page in arm-software cmsis 6 docs
- the old link was forwarded to the overview page of CMSIS v6
- CMake Cache: link to the mastering cmake - cmake cache section
- the old link was forwarded to the generic https://cmake.org/resources/
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add missing zephyr,pm-device-runtime-auto; property to spi130 of
nrf54h20/cpurad required for device pm runtime to work.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
For some nordic devices the LFRC peripheral is used to calibrate
the LFCLK clock instead of NRFX_CLOCK peripheral. This commit
adds support for the changes already made in nrfx drivers.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Updated the LPADC instance numbers in the
device tree to line up with the indexing
done in the RM.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Add board overlays and defines to the test sources files to execute
the dac_api and dac_loopback tests on xg23_rb4210a, xg24_dk2601b,
xg24_ek2703a and xg24_rb4187c.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
The xg24_dk2601b, xg24_ek2703a, xg23_rb4210a and
xg24_rb4187c board yaml files were updated
to support the DAC driver.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Defines a VDAC node for xg23 and xg24 parts, which are all
compatible with the silabs,vdac binding.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
This implements the DAC driver for silabs VDAC peripherals
using the silabs,vdac compatible binding.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Defines bindings that are compatible with Silabs VDAC.
Reference your part's design book when configuring
values for the properties.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Generates bindings that define VDAC auxiliary output.
These bindings can be used in devicetree sources to configure
the aux-output property.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
This enables Silabs Series 2 HAL source files for the Silabs
VDAC module to be compiled when the SOC_SILABS_ACMP
configuration is selected.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Updated CLOCK_BRANCH bindings to stay in sync with the enum
sl_clock_branch_t in the Silicon Labs HAL.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
Direct variant of this test disables intermediate buffer
in the nRF SPI driver and verifies whether devices like nRF54H20,
which can peform DMA transcations only from specific memory regions,
are handled properly.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Some nRF SoCs (i.e. nRF54H20) can peform DMA transfers
only from specific memory regions - `dmm` facilitates that.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This update makes the cellular-modem sample usable out-of-the-box on
SIMs that require different APNs, without rebuilding the firmware.
* Automatic APN selection
* New Kconfig options
* `CONFIG_SAMPLE_CELLULAR_MODEM_AUTO_APN` - enable logic
* `CONFIG_SAMPLE_CELLULAR_APN_X` - APN for profile X
* `CONFIG_SAMPLE_CELLULAR_IMSI_LIST_X` - IMSI list for profile X
* The application now subscribes to the new
`CELLULAR_EVENT_MODEM_INFO_CHANGED` event, waits for the IMSI, looks
up the matching MCC+MNC and calls `cellular_set_apn()`.
* DNS-server detection
* `NET_EVENT_DNS_SERVER_ADD` may fire together with
`NET_EVENT_L4_CONNECTED`; the previous wait timed out.
* Replaced the two consecutive waits with a single call that waits for
both events (`DNS_SERVER_ADD | L4_CONNECTED`) in any order.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
* Implement the new cellular_set_apn() driver hook.
The API validates the string, stores it in the driver’s
private data and raises an internal event so the state
machine can resume.
* Insert MODEM_CELLULAR_STATE_WAIT_FOR_APN between DLCI2 open
and the APN-script step.
– If CONFIG_MODEM_CELLULAR_APN is defined and non-empty the
driver skips WAIT_FOR_APN (behaves exactly as before).
– Otherwise the driver parks in WAIT_FOR_APN until the
application calls cellular_set_apn().
* Add event-callback support (CELLULAR_EVENT_MODEM_INFO_CHANGED)
so an app can subscribe to IMSI availability and kick its own
APN selection logic.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Introduces cellular_set_callback() and the first event
CELLULAR_EVENT_MODEM_INFO_CHANGED. Drivers call the registered
callback whenever any modem-info field is updated.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Add a driver-level hook that lets applications provide (or override)
the APN string at run-time instead of hard-coding it in individual
drivers.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
The modem_cellular implementation should suffice to handle the base
usage of generic BG9x family devices, so deprecate the quectel-bg9x.c
implementation.
Signed-off-by: Guilherme Costa <guilhermecosta@stratioautomotive.com>
Added support for compatible 'quectel,bg96' in modem_cellular.c
Renamed BG95-specific variables to BG9x, since the initialization
for BG95 and BG9x is similar.
Signed-off-by: Guilherme Costa <guilhermecosta@stratioautomotive.com>
Updated the nxp flexio pwm driver to account
for when the duty cycle is 100% or 0%.
We switch off the counter of the flexio and
manually set the GPIO High or Low. Otherwise
Flexio Peripheral with default to a 50% duty
cycle behavior.
Factored out timerOutput variable.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Fix multiple warnings detected by clang:
* implicit conversions back and forth from enumeration type
'enum ocpp_notify_reason' to 'enum ocpp_pdu_msg'
in ocpp_internal_handler()
* label followed by a declarations
* variable declared after one switch case and used in another
* mapping a int to uint and later using it in < 0 comparisons
and with negative values
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use CDC ACM serial backend from the new USB device stack.
It was surprising to find out that the porting layer does not only use
the UART API. The legacy USB device stack API used in the porting layer
has been deprecated and is causing CI failures.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Extended clock control driver to support new DVFS service
from IronSide secure domain. Added new compatible nrf-iron-hsfll-local
which can be used to enable new DVFS service support in local
domain.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Adds HaavardRei and PavelVPV as collaborators for BLE Host and HCI.
Both are working actively on the Zephyr BLE Host.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Added the xg29_rb4412a.overlay for GPIO API 1-pin
This overlay sets the configuration
needed to validate the GPIO driver on the
xg29_rb4412a board during test execution.
Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
Added the gpio driver for EFR series 2 devices.
The SILABS_SISDK_GPIO symbol is added to enable
support for the new GPIO driver.
The SOC_GECKO_GPIO symbol is retained for now to
maintain compatibility with existing drivers and
will be removed in a subsequent commit.
Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
Map definition of NRF_GPIOTE0 to NRF_RADIOCORE_GPIOTE when MDK
defines NRF_RADIOCORE_GPIOTE instead of NRF_GPIOTE0
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add return code checking for gpio_pin_interrupt_configure functions.
Add disabling pin interrupt at the end of the test to restore pin
state.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add support for special GPIOTE0 instance on nrf54h20/cpurad.
This instance requires special handling because:
- there is no support for PORT event (level interrupts)
- TE channels are fixed to the pin
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add NRFX_GPIOTE_VAR_FEATURE_SUPPORT feature flag to nrfx configuration.
It enables support for special GPIOTE0 instance in nrfx_gpiote driver.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add new feature flags to gpiote node.
Include pinctrl. Pins used by GPIOTE0 on nrf54h20/cpurad require CTRLSEL
configuration. Pins are listed using pinctrl and parsed by nrf-regtool
to prepare UICR configuration.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Espressif's interrupt controller drive should not build for
ESP32C6 LP Core since it's behavior is different.
Add proper condition for that.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
The original implementation select the port
as best_port when stepsRemoved is equal to
the one of best_vector.
When challenger is from announce message
set in GPTP_PA_INFO_SUPERIOR_MASTER_PORT,
its stepsRemoved is the same as in the message.
When challenger is from master_priority
copied in GPTP_PA_INFO_UPDATE,
its stepsRemoved is [stepsRemoved of bestVector]+1.
Thus, we should add one to the challenger's
stepsRemoved in comparsion to avoid useless
update of bestVector.
Signed-off-by: Yusuke Omae <s1413091@gmail.com>
J-Link runner could be used to flash and debug.
Updated board document to add J-Link runner support, and also update
spsdk runner command to specify the runner by using "-r" parameter.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
More complex suspend and resume scheme might require exactly defined
location of this variable due to platform peculiar SW and HW requirement.
DTS zephyr,memory-region node with nodelabel `pm_s2ram` shall be used to
automatic definition of linker section for such objective.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add check for the RX data buffer size. It should be atleast 400 bytes,
anthing less than that scan fails.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
The default integration platform for all test cases is native_sim, but
there has never been a USB device controller available for native_sim
platform. Since legacy device support has been deprecated and all tests
and samples now use the usbd test feature tag, this test cannot be
performed on native_sim.
Remove bluetooth.shell.cdc_acm to resolve CI failures.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Use DT_NODE_HAS_COMPAT_STATUS to skip disabled child nodes. This
avoids build errors when setting a RAM type to 0 banks.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
Correct the boad YAML files for the ADI boards, using the correct RAM size
based on the selected RAM bank, not the total RAM present on the given SoC.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
TXD_DRIVE_EDGE setting will typically be set to BAUDR/4 for DDR mode,
but this may not cover all cases. Add a configurable multiplier and
divisor to apply to the BAUDR value so the value's relation to BAUDR can
be customized.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Add support the host I/O over eSPI peripheral channel for private
channel2 and channel3.
The default port number of ESPI_PERIPHERAL_HOST_IO_PVT2_PORT_NUM and
ESPI_PERIPHERAL_HOST_IO_PVT3_PORT_NUM are 0x68 and 0x70.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/94000.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
The snippet for Zephyr as Xen Domain-0 was missing in the
Xen Platform section of MAINTAINERS.yml.
Add the missing entry to ensure that future pull requests
for this component are correctly tracked and assigned.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Add support for configuring the maximum TX power for STA and AP modes using
a Device Tree property (`max-tx-power`). If unspecified, the default value
is set to 31 dBm.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
The test requires two UARTs: one for console output and one for device
management. Use UART1 for device management instead of CDC ACM because
the legacy stack is deprecated and it will take some time for MCUboot to
adapt.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add Kconfig option BOOT_SERIAL_UART, defined in the MCUboot module but
needed to be used in tests, to the UNDEF_KCONFIG_ALLOWLIST.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add a sample that covers legacy CDC EEM/ECM and RNDIS functions.
Network functionality is limited to ICMP.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move the legacy code from the USB MSC sample to a separate sample in the
legacy directory. Make legacy sample very simple and drop all filesystem
dependencies.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move the legacy code from the HID mouse sample to a separate sample in
the legacy directory.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move Audio 1.0 headphones-microphone and headset samples that
demonstrate only legacy device stack functionality to the legacy
directory.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The driver for the last board, sam4l_wm400_cape, that uses the legacy
device stack was not ported in time, remove CDC ACM serial backend
configuration from this board.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Use new USB device stack (next) for CDC ACM serial backend. Keep the
legacy configuration for the boards whose drivers are not ported.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
A test sample for ocpp charge point with 2 connectors, central
system steve server is used with test setup (public available)
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Basic support for open charge point protocol v1.6 as native stack with
below functionality
1. Framework for ocpp stack and central system communication using RPC over
websocket according to occp-j.
2. Core profile with basic PDU
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Co-authored-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Update handling of fast instances to take into account whether
CONFIG_CLOCK_CONTROL is enabled or not.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Ensure event is not NULL before accessing its members in
nrf_wifi_parse_sband().
This adds a defensive check to avoid potential null dereference and ensures
the function returns early when event data is invalid (i.e., zero channels
or bitrates).
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
AICS gain mode does not prevent local nor remote operations from changing
the gain setting value. The gain setting value shall simply be ignored if
in the BT_AICS_MODE_AUTO_ONLY or BT_AICS_MODE_AUTO modes, but the local
application and remote devices can still modify the gain setting value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Currently this directive is not supported in EWARM 9.70.1,
it will be in future versions, but we want Zephyr 4.2
to work with IAR EWARM 9.70.1.
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
LVGL already provides an implementation wrapping a C standard library into
its own lv_* functions. Add them to the CMakeLists and set the appropriate
defines for them.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
The ztest stack size might be too small for the net.dns.resolve.hostname
tests that was added recently. Increase it to 1280 bytes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Clean up the comment around the zephyr_generated_headers CMake library
to make it more accurate, now that the library is an interface library
rather than a custom target.
This is a follow-up to non-blocking feedback from
https://github.com/zephyrproject-rtos/zephyr/pull/92927.
Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
This commit adds support for the frame space update feature
to the bluetooth host.
This is mainly just a wrapper around the frame space update
HCI command and event.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Fix BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE define, as this was
not working correctly without brackets around
CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE.
Also fix CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE help,
as this was talking about remote featues, where this only
applies for local features.
Also update for new CONFIG_BT_CONN_DYNAMIC_CALLBACKS kconfig
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Add Kconfig option to enable Periodic Transfer Interrupt mode for
isochronous endpoints. The tradeoff is reduced CPU usage in exchange for
not timing out isochronous transfers.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The LIBC_ALLOW_LESS_THAN_64BIT_TIME option disables a compile-time check
ensuring that time_t can hold 64-bit values. This check can prevent
accidental builds on targets with 32-bit time_t and the consequent 2038
issues.
This option is enabled when using the native C library as i386 glibc
uses 32-bit time_t.
A new file, validate_libc.c, is added to lib/libc to contain this and any
future libc tests. The check for CONFIG_EXTERNAL_LIBC is moved to
libc/CMakeLists.txt to ensure that this new file is always compiled.
Signed-off-by: Keith Packard <keithp@keithp.com>
The flash M1K driver supports read (up to 1K), write (1K), and
erase (4K) operations, which can be accessed via DLM.
Accessible flash regions include internal e-Flash or external SPI
flash via FSCE# or FSCE1#.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
To prevent FSPI pins from floating, which may cause internal leakage
and increase SoC power consumption, tri-state is enabled by default.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Providing a wrong address to the connect() call by the application is no
reason to assert, connect() should just return an error in such case.
Therefore remove the faulty assert and replace it with error log
instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The original code process causes the following two issues:
1. The first sample is always 0 because the `ctx` sequence in `data` is
assigned the input sequence until the `adc_context_start_read`. As a
result, the `while (channels) { ... }` loop is not executed, and
`adc_enable_measurement` is not called.
2. Since the `ctx` sequence in `data` is assigned in
`adc_context_start_read`, which occurs after the `while (channels) {
... }` loop, the ADC samples the previously set channel.
Signed-off-by: Yunshao Chiang <Yunshao.Chiang@ite.com.tw>
This commit raises the sspi clock from 24MHz to 48MHz and
corrects the clock divisor setting for it82xx2 chips.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
The struct bt_audio_codec_cfg recently got new fields that
previously defaulted to
BT_AUDIO_CODEC_CFG_TARGET_LATENCY_BALANCED and
BT_AUDIO_CODEC_CFG_TARGET_PHY_2M but was not set by the BTP
commands.
For now we restore the previous functionality by setting the
values to the same as we did before, until the BTP commands
are changed (if they are changed).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There's few samples with a struct addrinfo on the stack that only
initialize some of the fields, feeding whatever is on the stack for the
rest to the getaddrinfo() code. Bumped into an issue where that
sometimes happens to set the bit of the (ai_flags & AI_NUMERICHOST),
making host resolution failing.
Add a couple of memset on the affected samples so this does not happen.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a freeaddrinfo() call on a couple samples using getaddrinfo(). Not
really relevant since these execute once and exit but good to have in
case someone copy paste that in a loop.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The rest of the network (and generally Zephyr subsystem code) use the k_
prefixed variants for memory allocation, which results in data goin in
the _system_heap rather than the stdlib z_malloc_heap.
The code in getaddrinfo use the z_ ones as well apart from the actual
getaddrinfo implementation, which seems like an oversight, change it to
use k_calloc and k_free as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add initial support for the Cortex-M52 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Update a couple of lwm2m links
- LwM2M: update to the link the current forwards to
- OMA Specworks LwM2M: update to the link to the releases overview page
was redirected to the LwM2m overview page.
- LwM2M registry: link to OMA registries, where LwM2M registries are listed
was redirected to the OMA specifications page before.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
As clarified by the subsystem maintainers, wait should be treated as a
boolean, not a duration.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
checkpatch and clang-format have conflicting formatting requirements for
this file for whatever reason.
Since it is not possible to selectively disable checkpatch, but it is
possible to selectively disable clang-format, disable clang-format
surrounding some macros in `posix_features.h` and `sys/sysconf.h` in order
to eliminate linter noise.
The code is still checked by checkpatch, which should be sufficient.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Use `timespec_add()` to add to an absolute timespec. This is required
because the test was failing occasionally on some qemu platforms in CI
due to this assertion in `timespec_normalize()`, which could happen if
the number of fractional seconds was already close to `NSEC_PER_SEC`
before an offset was added.
```cpp
if (!overflow) {
__ASSERT_NO_MSG(timespec_is_valid(ts));
}
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Since an implementation may omit definitions of runtime invariant values
in limits.h if the corresponding value is equal to or greater than the
minimum, is unspecified, and must be queried at runtime [1], do not rely
on PAGE_SIZE being declared in limits.h .
[1]
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The kso_ignore_mask DTS property was not being fully applied in the
ITE IT8xxx2 keyboard driver:
1. The driver performed direct writes to the KBS_KSOH2 register,
which controls KSO[17:16]. This did not account for the
kso_ignore_mask and could overwrite bits in the register that
are used for other GPIO functions.
2. The driver would attempt to initialize the GPIOs for KSO16 and
KSO17 based solely on the col-size property. It ignored the
kso_ignore_mask, which could lead to reconfiguring a pin that
is intended for another purpose.
Signed-off-by: Wai-Hong Tam <waihong@google.com>
There are some drivers like NXP SDMA that need a NonCacheable
data region to put data like channel control or buffer descriptors.
So far, we haven't added such a section because the linker created
one default orphan section at the end of the data section.
But this generates a warning in the build system:
xtensa-nxp_imx8m_adsp_zephyr-elf/bin/ld.bfd: warning: orphan section
NonCacheable' from modules/hal_nxp/libmodules__hal_nxp.a(fsl_sdma.c.obj)'
being placed in section `NonCacheable'
So fix this by explicitly define a NonCacheable area at the end of data
section.
This works because imx8mp cache attributes are
_memmap_cacheattr_imx8_wt_allvalid = 0x22212222
and the area where the NonCacheable section is allocated is
write-through.
So all the configuration for the SDMA core is not-cached at write.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
When setting CONFIG_MCUX_ELCDIF_FB_NUM=0 we can't assign the active pointer
to any framebuffer.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Set `SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT` to `1` when Rail
Multiprotocol Kconfig is enabled.
This is required to run the Bluetooth multiprotocol initialization
code during `sl_btctrl_init`.
Signed-off-by: James Smith <james@loopj.com>
Enables RAIL Multiprotocol support by linking against the multiprotocol
RAIL library blob when `CONFIG_SILABS_GECKO_RAIL_MULTIPROTOCOL` or
`CONFIG_SILABS_SISDK_RAIL_MULTIPROTOCOL` are enabled.
Signed-off-by: James Smith <james@loopj.com>
RT series have LPSPI data input setup and hold requirements and CS lead/lag
requirements not being met on the current configuration for this
test, causing flaky data transfer on CPHA 0 and 2 tests.
Fix by adding delay properties.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The write_ct function calls bt_cts_send_notification and if
bt_cts_send_notification fails to send a notification (e.g.
if there are no clients subscribed), it would return an
error, and thus send a ATT error response to the client,
even if the value was actually written.
This commit changes the behavior so that the notification
does not affect the return value (as it is not directly
linked to the write itself), but rather just logs it if
it fails to send the notification.
The notification can failed to be send for 2 main reasons:
1) The application returns an error on fill_current_cts_time
2) bt_gatt_notify fails to notify due to missing buffers
The first we cannot do much about. For the latter we can
either just live with the missing notification, or implement
a retry if we run out of buffers. For this simple fix the
former was chosen, but can be revisited if it turns out
to be a significant problem.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The "test_late_alarm_error" test vector comes with an update that
should result in test failure when the target counter runs upwards.
That test vector attempts to set an alarm event that is passed the
current tick value. Therefore, counter's direction should be exercised
and then an appropriate alarm event should be defined.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Some of the logging was not very useful and missing info, some were the
wrong level. Such as routine drops of packets, this happens sometimes
and is not ideal but not going to cause things to fall apart, so demote
those messages. RX buffer underrun for example is pretty unavoidable
with enough traffic going on the local network.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Extract the RX underrun handle code to a separate function.
Named the function like "dma_rx_resume" to make it clear what the
function is really supposed to do.
Demote the error about not being a first descriptor to a warning.
Because most likely we already got an error about something else which
caused us to drop the packet in the first place. The rest of the frames
are expected to be dropped. And make the string shorter.
Also remove the debug message because the control bits do not tell us
any more information than we don't know already. They only tell us that
we own the descriptor (known since we are processing the frame), that it
is not a first descriptor (known since that is the reason we would drop
it at this point, as indicated by the warning).
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Instead of looping through only the amount of descriptors there are,
maybe it is possible to get some more things received in one work item
than even the max number of descriptors if RX is processed fast enough,
instead of waiting for work to be scheduled again.
So change to go around the ring until we actually hit a DMA owned
descriptor.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Don't enable interrupt until after init because there can be a interrupt
mistakenly happen during the init process which can cause various
problems.
Along similar lines, avoid issue for sporadic TX interrupt with no
packet in tx done handler.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There was a deadlock occurring, exposed by http server sample because of
situations like this caused by tx done work being blocked in deadlock:
1) The TX would be started by some thread and the driver TX sem would be
taken.
2) The http server socket would get scheduled on the system workqueue to
send something, claim the network TX interface mutex,
and be blocked taking the semaphore.
3) The RX traffic class handler would get blocked trying to claim the
network interface TX mutex, while trying to send an ACK in the TCP
callback. This means the RX packets would not be processed.
4) Lots of RX unable to allocate packets errors would happen, and all RX
would be dropped. This was the main symptom of the deadlock, which
made it look like a memory leak but actually had nothing to do with
the RX code nor any memory leak.
5) The TX DMA would finish and schedule the TX DMA done work onto the
system work queue, behind the http server socket which is blocked on
the waiting for the driver TX semaphore.
6) If the TX DMA done work would have ran, that's what gives the TX
driver semaphore. So this is the reason for the deadlock of all these
different threads and work items, the misqueue in the system
workqueue.
Fix by just calling the TX DMA done code directly from the ISR, it
should be ISR safe, and really not a lot of code to execute, just
freeing some net buffers and the packet and updating the stats.
An optimization can be made later if needed, but for now,
solving the deadlock is a more urgent priority.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
When building with CONFIG_DEBUG=y, there is a build warning about the
name being truncated due to integer size is larger than MAX_NAME_LEN.
So fix MAX_NAME_LEN to be large enough to handle 10 digit integer, which
is maximum.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There does not appear to be any reason or pattern for this
dtsi file to exist, so move everything to the dts file and delete it.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Adds CONFIG_FLASH_PAGE_LAYOUT check to the flash_mcux_flexspi
drivers.
- Saves some memory if FLASH_PAGE_LAYOUT is disabled.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Enable support for building and running the BIS ISO host test
on the nRF5340bsim board.
The purpose of this is to test the ISO fragmentation on both the
nRF52bsim and nRF5340bsim, as they use different drivers.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a test for broadcast ISO that uses fragmentation.
The host will attempt to send SDUs 3 times the HCI ISO
data buffer size, so that it will be fragmented into a
BT_ISO_START, BT_ISO_CONT and a BT_ISO_END HCI ISO data
packet.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the test to use the controller buffer size as the maximum
SDU size, so per default we can send up to the maximum size
the controller supports. This ensures that the tests will
never do fragmentation over HCI.
This also adds verification of the received data on the
ISO sync receiver.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Reduce the number of channels to 2, as higher numbers does
not really test anything worthwhile.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since the SDUs are now allocated by the application
and the host does not care about the SDU sizes, the check
is useless.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The DMA-based LPSPI is inherently going to have a high latency due to
the requirement for setting up the DMA transfer and the DMA driver may
be extremely bloated, this is no fault of the spi driver and not
relevant to the test. The driver we want to test for latency is the
CPU-based one, the DMA-based one is more prioritizing bandwidth over
latency.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit allows to the user to control the use or not of dynamic
connection callbacks.
The stack is not using the dynamic connection callbacks so they are
only needed if the applications want to use it.
Setting it to true for backwards compatibility.
With dynamic connection callbacks
FLASH: 176600 B 512 KB 33.68%
RAM: 27428 B 64 KB 41.85%
IDT_LIST: 0 GB 32 KB 0.00%
Without dynamic connection callbacks
FLASH: 176376 B 512 KB 33.64%
RAM: 27428 B 64 KB 41.85%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
This commit registers the connection callbacks using BT_CONN_CB_DEFINE,
which ensures they are set up at link time rather than runtime.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
This commit registers the connection callbacks using BT_CONN_CB_DEFINE,
which ensures they are set up at link time rather than runtime.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
Any PR affecting all Microchip MEC SoC's causes twister to run
the arm IRQ vector table test. Since all the MEC boards are
using the MEC 32 KHz timer instead of ARM SysTick we added all
the remaining boards to the test. Each overlay disables the MEC
32 KHz timer and enables SysTick as the kernel timer.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Fix the build error when hostapd enterprise is enabled, it should use
new wifi_set_enterprise_credentials API, instead of
wifi_set_enterprise_creds.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add a definition for an invalid secure tag value to be used
as a placeholder. Negative values are reserved for internal use,
but some of them should be considered valid.
To be able to check against a value, we need to define an invalid one.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
This change addresses an alignment problem reported by UBSAN by
using a copy of the address. This avoids the need for extensive
rework to support *_raw variants in the routing layer.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
LwM2M engine does not allow strings to be truncated as it would
lead to invalind UTF-8 strings.
However, some content formatters were truncating, so I fixed at least
these
* plain text
* TLV
* SenML CBOR
* SenML JSON
* JSON
* CBOR
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
lwm2m_get_string() and lwm2m_set_string() API does not allow
strings to be truncated and ensures NUL termination
regardles of using string or opaque resources to store the string.
Add tests to verify that is also true on multi-byte UTF-8
strings.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The IO_CONTROL_1 register is 3 bytes long according to the datasheet.
This fixes the register not being written to correctly.
Signed-off-by: Luna Pes <zephyr@orangemurker.com>
Shell functions targeting regulator parents used the auto-completion of
regulator devices instead.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The current code base is meant to use cmsis for Cortex A and R and
cmsis_6 for Cortex M, but the build system is configured to include the
path for both when Cortex M is selected. This leaves us exposed to PR
using the old headers, that would not get caught in CI but would fail
the build on a project using Cortex M that only has the cmsis_6 module.
Change the cmsis module setting to only include the module files in the
intended case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Always use the cmsis_6 version for DWT_LSR_Present_Msk and
DWT_LSR_Access_Msk, the old ones are not going to be available anymore
when Cortex-M is selected..
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Allowed use of counter bit width lower than hardware 24.
In that case, PPI connection is established to trigger
clear task once maximum value is reached.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
We should not block erasing pending images when using ramload with
revert mode, because uploading multiple confirmed images with the same
version would brick the device (preventing future FW updates). Update
the dependencies of img_mgmt_slot_in_use to account for this.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
boot_fetch_active_slot needs to map the slot number to a flash ID, as
this is what the DFU subsystem expects when interacting with the flash
partition.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Much like in RAMLOAD mode, RAMLOAD_WITH_REVERT requires that mcuboot
subsystem fetch bootloader information via the retention subsystem.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
CONFIG_FLASH_MCUX_FLEXSPI_XIP should also be disabled when using MCUBoot
ramload mode with revert support.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Prefer flashing the confirmed image when one is created with
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE. This way, the west runner will
flash this image over the signed image if it exists.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
When signing for ramload mode, respect the write alignment size setting.
This is required when creating a confirmed image, as the BOOT_MAGIC
value changes based on the alignment size in use.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Add Kconfigs for RAMLOAD_WITH_REVERT mode in MCUBoot. This mode works in
a manner similar to DIRECT_XIP_WITH_REVERT- namely, mcuboot will only
boot an image that is either confirmed or marked as pending. If both
images are confirmed, mcuboot will still select the one with the higher
version, so downgrading is not possible using this mode.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
MCUBoot RAMLOAD mode relies on CONFIG_XIP=n, but FLASH_MCUX_FLEXSPI_XIP
y-selects this symbol. Disable CONFIG_FLASH_MCUX_FLEXSPI_XIP for the
case where we are using MCUBoot ramload mode.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
MCUMgr ram load support was hardcoding the overlay file for the
nrf52840dk. To make this support generic, move the _ram_load overlay
file to the MCUBoot repository, as part of the mcuboot application.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
This provides default ethosu_flush_dcache and ethosu_invalidate_dcache
overrides. User application can disable it through Kconfig option if it
needs to provide its own.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The CPOL and CPHA mode handling logic in the SPI configuration was
corrected to ensure proper evaluation of the SPI mode bits.
Evaluate CPOL and CPHA bits using value of cpol_mode and cpha_mode:
`(SPI_MODE_GET(config->operation) & SPI_MODE_CPOL) != 0` and
`(SPI_MODE_GET(config->operation) & SPI_MODE_CPHA) != 0`.
This fix ensures that the SPI configuration is robust and adheres to
expected behavior when setting CPOL and CPHA modes.
Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
Implements HCI close support for the silabs efr32 HCI driver.
Calling `bt_disable()` now works as expected, which is particularly
important for multiprotocol applications.
Signed-off-by: James Smith <james@loopj.com>
- Setting IODEV_SQE to NULL to subsequent triggers are rejected.
- Channel all error-resolutions through handle_result_on_error().
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Update the bit offset of bit VCC_STS in the BKUP_STS register.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Currently, the STM32 TIM counter driver will always register itself as ISR
for interrupts[0] of the timer node. This works fine for timers which have
a single "global" interrupt but not for others (e.g., Advanced Timer) which
have separate IRQ lines for various events.
Borrow the pattern from PWM driver: use the "cc" interrupt if it exists on
timer node, otherwise use the "global" interrupt. If neither of those are
found, a build error is raised to ensure silent failures cannot occur.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Remove possibility to run tests on nrf54l09pdk as this is
an obsolete board that is going to be removed.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove possibility to run samples on nrf54l09pdk as this is
an obsolete board that is going to be removed.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Only RTC DRAM area is currently being loaded during segment loader.
It means that RTC_IRAM and RTC_DATA is missing, causing
issues when sleep-modes are needed.
This also re-format the segments logging output
to meet with MCUBoot/Simple boot cases.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Restore setting the ppp link-local address either to CONFIG_PPP_MAC_ADDR or
to a random value 00:00:5e:00:53:XX instead of leaving it uninitialized.
Recently the memory handling for the link-layer addresses was changed from
an approach of copying pointers to managing the memory as a member of the
`net_linkaddr` struct (ref ac3cb9dac0).
The piece of code this patch touches however, relied on the use of the
pointers to function properly.
With the recent change, the MAC address was copied to the new member
location before it was even set (either from Kconfig or selected randomly).
As a result, the link-layer address was kept initialized to zero, which
resulted in a IPv6 address of fe80::ff:fe00:0 which is exactly the
link-local EUI-64 representation of the MAC address 00:00:00:00:00:00
(without flipping the "universal/local" bit).
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
Add struct z_mpu_context_retained and parameterized functions
z_arm_save_mpu_context() and z_arm_restore_mpu_context() to allow
saving and restoring MPU configuration to/from retained RAM.
This enables preserving MPU state across deep sleep or power-down
modes on Cortex-M devices.
The API is exposed under include/zephyr/arch/arm/mpu/arm_mpu.h
and implemented in arch/arm/core/mpu/arm_mpu.c.
Signed-off-by: Michele Sardo <msmttchr@gmail.com>
Updated twister.yaml workflow to fetch esptool for the CI.
Fix format of the arguments used in the esptool-5.0.2.
Check that esptool is available on build time.
Update runners for esp32.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
* Brings changes in how esptool is istalled in the environment.
* Update bluetooth and C2 support files.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Updated peripheral_hr sample to use separate Zephyr
Controller overlay for minimal configuration.
For bbc_microbit:
Memory region Used Size Region Size %age Used
FLASH: 96268 B 256 KB 36.72%
RAM: 16296 B 16 KB 99.46%
IDT_LIST: 0 GB 32 KB 0.00%
For nrf54l15dk/nrf54l15/cpuapp:
Memory region Used Size Region Size %age Used
FLASH: 95012 B 1428 KB 6.50%
RAM: 17744 B 188 KB 9.22%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix default value of BT_TICKER_REMAINDER_GET, it will be
selected based on enabled Controller features. This is not
needed by minimal peripheral role.
Fix depends on for BT_CTLR_CONN_RANDOM_FORCE as it is
applicable when more than one simultaneous connections is
supported. Again, this is not needed by minimal peripheral
role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Shift ifx_cat1 clock_control driver to using pdl instead of hal calls
- add soc.c file containing call to SystemInit()
- Update board's dts files
- add binding for peri divs
- update system_clocks.dtsi for psc3
- add new peri clock_control driver
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
* Adding folder structure and first pass config for PCS3M5_EVK
* Adding dtsi, kconfig, and other files for KIT_PSC3M5_EVK
evaluation board.
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
This change makes the "Report an issue" button in the documentation
actually pre-fill the bug template as opposed to just opening a "plain"
issue.
The required "Describe the bug" field is not pre-filled at all, making it
mandatory for folks to put in effort into their report where before they
would have been able to just hit "Submit" :)
Fixeszephyrproject-rtos/zephyr#93654
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Instantiate the MU4 peripheral in SoC's DT. Enable it in board's DT.
Switch variant of the fsl_mu driver included.
The MU4 peripheral is used for IPC with the mimxrt798s/hifi4 domain.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Instantiate the nxp,rtxxx-dsp-ctl
driver (nxp,rt700-dsp-ctrl-hifi4 variant) in the mimxrt798s/cm33_cpu0's
DT. Enable it in mimxrt700_evk/mimxrt798s/cm33_cpu0.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Rework the driver so that it can cover multiple variants. Add variant DT
bindings. Change the compatible name for the mimxrt685s/cm33 DT.
This needed to be done because the hardware initialisation routines
(power, clocks, ...) are different from mimxrt685s/hifi4 to
mimxrt798s/hifi4. The same is expected for the /hifi1 domain.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Enable the GPIO0 peripheral regardless of DT status. Program the
peripheral to allow non-secured and non-privileged accesses.
This is to enable access to the GPIO0 peripheral (both port reads/writes
and interrupts) from the mimxrt798s/hifi4 domain, as that domain is
non-privileged.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Rename symbols so that they reflect purpose of defined memory regions.
Point region symbols to nodes in the DT. Move bogus IDT section before
DSP's ITCM. Move common ROM and RAM sections before the heap.
The move had to be done as these sections and the heap did overlap.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add dummy interrupt controller, clock control, pin control, Flexcomm 0,
Flexcomm 2, SAI0, SAI1, SAI2 into SoC's DT. Enable relevant nodes in
board's DT and include pinctrl definitions. Add default LED and button
nodes. Set /hifi4's real frequency. Add memory nodes for device's main
SRAM.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add desired Kconfig implications for the mimxrt798s/hifi4 domain. Add
pinctrl_soc.h and set up an include path for it.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
To follow with error-handling of multi-shot items, they won't be marked
as cancelled. Instead, we expect them to stop being submitted, hence we
dispose the handle upon finishing every shot.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
To follow with error-handling of multi-shot items, they won't be marked
as cancelled. Instead, we expect them to stop being submitted, hence we
dispose the handle upon finishing every shot.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Run-time errors can still be considered asserts if checkif is
configured as such, otherwise, prevent crashing.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Considering the app may have cancelled all the requests as an error
handling strategy, this driver needs to support recovering from such
case.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Whenever the data-ready callback is invoked, there's a common pattern
that needs to take place:
- Stop measurement timer (to stop on-coming samples), which could be
restored by the application re-submitting the request.
- Set iodev_sqe to NULL, so new requests can come in.
- Report the error on the SQE.
This has been refactored in handle_error_on_result() and now it's
invoked throughout the code.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The existing build-time asserts not only needs to cover dual-frequency
mode does no exceed high-speed settings, it needs to allow not using
dual-frequency mode settings at all, which is what this patch does.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
- Change netbuf buffer pool to use CONFIG_BT_CONN_TX_USER_DATA_SIZE to
avoid inconsistency and have enough buffer room when sending ISO data
Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
A recent commit inadvertently broke GDB stub on ACE. Revert that
part of the faulty commit.
Fixes: commit cfd6a0673c ("SoC: Intel: ACE: remove unused litelals
parts in interrupt vectors")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
With few APs we have seen unexplained disconnections and sending
keepalive often solves the problem, so, to fix interoperability reduce
the keepalive period to 30s.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Build fails when openthread diag module is enabled and HDLC/RCP is
enabled. The diag.c module should not be built when radio-spinel is
used as it has it's own diag code.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
Use K_USEC() to convert the timeout value in microseconds to a value in
ticks dropping the manual conversion from microseconds to milliseconds.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
According to the work queue API a queue object should be initialized
using the k_work_queue_init() call. This patch adds this missing call.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
MCUBoot currently always builds the image as confirmed,
but image confirmation should be explicitly handled by the application
or subsystems.
This change disables the default behavior to avoid premature confirmation
during build time.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit fixes the type of `irq_num` in the `fake_driver_config`
structure to `uint16_t`. This is to match the expected type for the case
where `TEST_IRQ_NUM = (CONFIG_NUM_IRQS - 1)`, on platforms with more
than 256 IRQs.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Update the HW models module to:
40403f5f2805cca210d2a47c8717d89c4e816cda
Including the following:
40403f5 TIMER: Bugfix: Be sure to not use more than BITMODE bits
e1a976c RTC: Bugfix: Be sure to not use more than 24bits of CC like the HW
bfb5309 doc: Add nRF54LM20 to table of supported HW
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
There are some issues with USERSPACE, so add an overlay to
disable CONFIG_TEST_USERSPACE, will drop it once it works.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This change enables GMAC_MULTIPLE_TX_PACKETS to allow multiple TX packets
to be pushed to the DMA engine, improving transmit performance. Previously,
older Zephyr versions (pre-v2.6.0) lacked thread-safe handling in net_pkt
and net_buf, making multiple TX enqueuing unreliable. Issue #32564
("net_buf reference count not protected") was fixed in v2.6.0, providing
proper thread safety. The changes have been tested on SAME54 Curiosity
Ultra with EVB-LAN8670-RMII and KSZ8061 PHY daughter card, and the
expected performance of 9.5Mbps at 10Mbps PHY link speed was observed.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
The many_conn l2cap test used a MTU lower than the minimum permitted
value. This commit bumps it to the minimum (23).
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Check whether the connection response parameters both with and without
ECRED are within the valid ranges from the Bluetooth Core Specification
(part 3.A.4 v6.0). Changes validation checks in requests to match the
same pattern.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Fix clock config logic of wm8962 and wm8904 drivers, so that both can be
properly configured for master (generating BCK and WS) and slave
(receiving those) operation.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
The sy1xx SoC enabled CONFIG_RISCV_SOC_EXCEPTION_FROM_IRQ and provided
its own __soc_is_irq implementation. However, the behavior matches the
default implementation, making the override unnecessary.
This commit removes the custom implementation and disables the config
option to remove unnecessary code.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
The __soc_is_irq function is only used when
CONFIG_RISCV_SOC_EXCEPTION_FROM_IRQ is enabled, which is not the case
for any WCH SoC. The implementation is therefore dead code.
Additionally, the implementation matches the default fallback behavior,
so no functional change would occur even if the config were enabled.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Add a padding section after the final read only data section
to avoid overlap between ROMABLE_REGION and RAMABLE_REGION.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
- The compatible name is the same as used in Linux kernel
- It is the watchdog timer used in K3 generation of processors.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Zephyr is swapping the definitions of RGB565 and BGR565. Swap the return
values provided by this driver for supported pixel formats to account
for this.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
This reverts the workaround made in the commit:
772fbfe9cc
as the proper fix has now been merged upstream.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Some systems (IE cores with bootloaders) may not disable the DW SPI
peripheral at boot time. Make sure the peripheral is disabled before we
try to configure it.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
The designware controller has an *interesting* implementation of the CS
signal- CS will be de-asserted whenever the TX FIFO is empty, so slower
cores may see CS de-assert prematurely if they cannot keep pace with
their SPI peripheral. To help reduce odds of de-assertion, implement the
following changes:
- don't write SER bit until directly before we enable interrupts, so
that transfers don't start early
- prefix the TX FIFO before writing SER, so the FIFO can drain a bit
before have to service an interrupt
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
The SSI DW peripheral supports an RX_SAMPLE_DLY register in some
instances- this register controls the number of clock cycles from the
default sample time before the RX input is actually sampled. This can be
used to improve reliability when operating the SSI at a higher clock
speed.
Add an implementation of the mspi_timing_cfg api, and header to define
the identifier so that users can configure this parameter
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Bitmask offsets for the MSPI_DW peripheral are incorrect for the
4.03a databook for the DW APB SSI. Add a "v2" compatible to handle these
changed offsets. The compatible does not define new binding properties,
just modifies the register offsets.
Additionally, handle writing the DFS32 mask for v2 of this compatible,
as newer IP supports a dataframe size up to 32 bits.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Multilevel interrupts require that the irq number be read with DT_IRQN,
so update the driver to use this macro.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
The remainder of this driver functions when pin control is disabled,
so make the include conditional as well to fully support this case.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Supply empty vendor specific macros for cases where vendor specific
functions are not needed by driver.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
USB support was previously introduced for the max32 soc family on the
max32690evkit board; this change extends that support to two additional
boards with the same soc: apard32690 and max32690fthr.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Fixes a flaw in implementations of arch_is_in_isr() that could manifest
on SMP systems. If the reading of the current CPU's nested interrupt
count is not fully atomic on an SMP system, then an ill-timed context
switch could occur leaving the caller reading the nested interrupt
count of a different CPU.
This also applies a little defensive programming to cortex_a_r's
arch_is_in_nested_exception(). Although this routine is presently
only called with interrupts locked (which will prevent the thread
from migrating), switching to use _current_cpu instead of
arch_curr_cpu() is safer as should the routine ever be called
without meeting the locking criteria, it can be detected and fixed.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fixes a flaw in the the xtensa implementation of arch_is_in_isr()
that could manifest on SMP systems. If the reading of the current
CPU's nested interrupt count is not fully atomic on an SMP system,
then an ill-timed context switch could occur leaving the caller
reading the nested interrupt of a different CPU.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add a simple sample that tests the functionality of the EXT2 automount
feature. The sample creates a ramdisk and writes some content and tries
to read it back after unmount and mount operation.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
Device tree and/or automount support was not present and might be useful
when for example the settings module needs early access to a filesystem.
This patch adds support to mount an EXT2 filesystem automatically. The
implementation chosen is to provide the drive name matching a disk
drive specified in the device tree ie on an (e)MMC or SD card.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
The CRC32 table only needs to be generated once, so prevent it from
regenerating every time as it only required once.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
The "spacecubics" entry was redundant as we use the "sc" prefix for Space
Cubics, Inc.
Removing this duplicate to avoid confusion and maintain consistency in
vendor naming.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
ZMS does not work without this and gives compilation errors, fix
this by adding the correct dependency
Signed-off-by: Jamie McCrae <spam@helper3000.net>
In the metadata, found that timer_status_sync_pending was missing the
timeout parameter. Noticed when tracing tests/kernel/common.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In a096b34835 which introduced tracing of k_sleep, the events in the
metadata file were missed causing issues when running with babeltrace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add details on series supported by Noritake Itron driver.
Upon reading datasheets, series CU-TE, CU-Y, GU-3000, GU-7000 and
GU-D have commands matching the driver, whereas series CU-U, CU-TW,
and GU-800 use different command sets.
Signed-off-by: Eve Redero <eve.redero@gmail.com>
Throughputs achieved by the sample are a bit better with timeslicing
disabled, therefore disable it for best out-of-the-box experience.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The codec configuration operation for unicast (ASCS) contain
both a target PHY and a target latency value that was previously
just hardcoded by the client and unavailable by the server.
This commit adds them to the bt_audio_codec_cfg struct so that
applications can both set and get these values.
The default values used by BT_AUDIO_CODEC_CFG use the same
values as the client would previously set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This enables applications to call timing configuration functions,
which enables more applications to work on native_sim.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Adds fixes to get LLEXT tests to work for NSIM VPX on MWDT.
Excludes prelocated extensions for MWDT for now.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Splits LLEXT static heap into an instruction heap placed in
instruction memory and a data heap placed in data memory.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Allow users to compile LLEXTs with the MetaWare Design Toolchain.
Provides utility to dramatically shrink bloated extensions by removing
unused section names left behind by MWDT strip. Test extensions will
not fit in NSIM VPX5 memory otherwise; each is reduced from ~16k to ~1k.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Adds a missing requirement from Core Spec V6.0 Vol 3.A chapters 10.1
and 10.2 to ignore L2CAP_FLOW_CONTROL_CREDIT_IND packets with the
credit value set to 0.
Matches existing credit-related functions by checking that the CID
is in the dynamic range (you can't add credits to fixed channels).
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Add overlay for arduino r3 for the CS testing enablement of the test.
Since I do not know the hardware range situations of all the vendors,
for now I just put this as a platform_allow for two different version
LPSPI platforms. RT1050 has LPSPI v1 and MCXN has LPSPI v2. On MCXN,
lower the SPI priority to let the GPIO interrupt process in time.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Update header with proper year and author.
Also fix indentation and minor formatting in scobc-a1.cfg.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Explain how to use CMSIS-DAP, FT2232D, or FT232R interfaces by setting the
OPENOCD_INTERFACE environment variable when flashing the SC-OBC Module A1.
This reflects the recent unification of OpenOCD configuration scripts and
the default selection of CMSIS-DAP as the standard interface.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The default OpenOCD interface for the SC-OBC Module A1 has changed to
CMSIS-DAP, with standard interfaces such as the Raspberry Pi Pico Debug
Probe.
To accommodate multiple debug interfaces, the OpenOCD scripts have been
cleaned up.
If you still wish to use FT2232D or FT232R interface,
please set the following environment variable before running
`west flash`:
$ export OPENOCD_INTERFACE=FT2232D
$ west flash
$ export OPENOCD_INTERFACE=FT232R
$ west flash
Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Reorganize and update soc folder files for SDK-independance
Reorganize and update hal_bouffalolab files for SDK-independance
Reorganize and update soc dts files for SDK-independance
Update serial and pinctrl driver files for SDK-independance
Update ai_wb2_12f, bl604e_iot_dvk, and dt_bl10_dvk
to new bl60x support
and fixup openocd config of ai_wb2_12f
Signed-off-by: Camille BAUD <mail@massdriver.space>
Add check for supp->current being NULL before accessing num_params in
error log.
Prevent potential NULL pointer dereference and crash when invalid
parameter count
Improve error messages for better debugging in cases with no current
request or wrong param count.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
litex supports little CSR ordering, also support
it in zephyr. historical the default is big ordering.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
now no-detailed-test-id is enabled by default, so switch the logic so we
do not require the extra parameter when reruning.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Build this test also with clang to increase coverage. This test is
selected because it had some issues with clang, however, there is
nothing special about this tests when it comes to clang, it will be one
of many to come to increase coverage.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update the TX data API to support distinguishing if this packet is from
net stack or from internal packet forwarding case.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add tests based on QSPI command register, this is the entry point even
before we test nRF70 internal memories.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Since #75677, it has not been possible to build with
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_DWT enabled since there was no
declaration of z_arm_debug_enable_null_pointer_detection before its use
in arch/arm/core/cortex_m/prep_c.c.
This change creates an arch/arm/include/cortex_m/debug.h header that
contains declarations for the functions in
arch/arm/core/cortex_m/debug.c.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Move it to a separate Kconfig file and move it under the net/lib/shell.
When using menuconfig, it helps to reduce the confusion of network
configuration options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
When building with user space and LLEXT support, syscall helpers need
to be exported.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Help text here adds the symbols to and pollutes the Kconfig search
with options that should not be visible and have no use to anyone
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
- Add uart1 and uart2 nodes to intel_ish5.dtsi with all required
properties.
- Consistently place properties for all nodes.
- Add #interrupt-cells to the soc node.
- Update intel_ish5_8.dtsi: overrides interrupt and status for
uart1, uart2, and dma0.
These changes add missing peripherals, unify property layout, and
improve clarity for Intel ISH platforms.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
The LwM2M RD client state machine have no knowledge of ongoing
observations or any other CoAP traffic and might trigger
QUEUE_RX_OFF state while engine is still waiting for Ack.
This can happen if CoAP Ack timeout is longer than
CONFIG_LWM2M_QUEUE_MODE_UPTIME and response is lost or taking
longer than QUEUE_MODE_UPTIME.
When observation is lost, CoAP Ack may be send, but socket is not
listening anymore if its closed or not polled while in RX_OFF and this
stops observation.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Due to the hardware transmission limitation of SPI in adp_xc7k_ae350
(maximum of 512 bytes per transfer), CONFIG_SPI_LARGE_BUFFER_SIZE is
specified in the board configuration in the spi_loopback test.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
XIP may indicate that the program is executed either in local memory
or flash. However, the SPI node is only used as a flash controller
when the program is executed in flash.
Therefore, optimize the related checks to ensure that when XIP is
enabled but the program is executed in local memory, the SPI node
can still be used.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
1. Due to the hardware limitations of the ATCSPI200 IP, the transmission
and reception counts must be consistent. If there is a mismatch in
length, dummy data needs to be transmitted or received.
Under this limitation, using the spi_context_xx related APIs to
determine whether the transmission is complete may cause issues in
certain situations.
Therefore, additional variables are set to record the exact number of
bytes need to be transmitted or received.
2. Also, fix some inaccuracies in configuring DMA transfers.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Query the configured data sources for capacity and soc information
before falling back to the composite fuel gauge configuration. This
means the battery properties are no longer required.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Choose whether the data sources should be queried by the generic sensor
channels (`SENSOR_CHAN_VOLTAGE`, etc), or the fuel guage specific
channels (`SENSOR_CHAN_GAUGE_*`).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Instead of explicitly specifying the source for the voltage and current
channels, specify primary and secondary data sources. If the requested
sensor channel does not exist on the primary source, the secondary
source will be tried.
Signed-off-by: Jordan Yates <jordan@embeint.com>
To ensure that data is consistent across multiple sequential calls to
`fuel_gauge_get_prop`, sensor_fetch is only called if a certain time
period has passed since the previous sampling. This emulates the
tick-based sampling of most dedicated fuel-gauge devices.
Signed-off-by: Jordan Yates <jordan@embeint.com>
tick
This commit added support for Apollo510 SDIO host driver and
ambiq board configuration in fs_sample and disk_performance
Signed-off-by: Fan Wang <fan.wang@ambiq.com>
BIS termination as broadcaster is handled different
than ACL and CIS, and in rare chances the
tx_complete for BIS may not have been completed in
the system workqueue before iso_new was called for the
same bt_conn struct (e.g. via bt_iso_cig_create), which
would perform
k_work_init(&conn->tx_complete_work, tx_complete_work);
but where conn->tx_complete_work still existed in
the system workqueue, which would cause the list
of pending items on the system workqueue to be removed
as the `next` pointer would be NULL.
This also adds an assert in bt_conn_new to prevent this
issue from appearing again.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Create Kconfig variable NXP_INPUTMUX, which selects the fsl_inputmux
driver. Imply the MCUX component symbol from it. Imply that variable
from the NXP PINT, SmartDMA and LPC DMA drivers and from the mimxrt685s
SoC.
This needed to be done for the mimxrt700_evk/mimxrt798s/hifi4 domain, as
the INPUTMUX peripheral handles IRQ assginments and its driver
(fsl_inputmux) is used directly by the domain's soc.c. Instantiating the
currently dependent drivers (for PINT and SmartDMA) isn's possible nor
reasonable on the said target.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Remove cache invalidation after flash write,
cpu should automatically invalidate cache but
for HW erase invalidation needed due to erase
from different bus.
Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
The minimum 1 sec timeout for getaddrinfo() call is too long
when executing queries from network tests. So allow test to override
the minimum and set it to very low value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allow user to query localhost name and get a localhost address
127.0.0.1 or ::1 back. This is only enabled if loopback driver
is used as the use case does not make much sense otherwise.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that if user has enabled hostname support, we are
able to query it and get a local IP address back.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
* Remove `RTIO_WORKQ_STACK_SIZE` as it is no longer used.
* Fix description of `RTIO_WORKQ_THREADS_POOL_STACK_SIZE`.
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
Adjusted drivers to include sources into a single library
to allow for the use of zephyr_library_amend when extending
with out of tree drivers in workspace projects inline with other
driver groups structure
Signed-off-by: Matt Wood <matt.wood@corintech.com>
This commit modifies the IRQ number and priority definitions in the
fake_driver.c file to accommodate different platform configurations.
The condition are based on nested_irq test file.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Configure the CTRLSEL value and the clock pin so that the TRACE pins
work when the TDD gets used.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Added support for the IronSide TDD service which allows configuring and
powering the trace and debug domain of the nrf54h20.
Also provide option to start the trace and debug domain in the soc start
sequence.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
The Adafruit Featherwing 128x32 OLED board supports a SSD1306 compatible
OLED display with a resolution of 128 x 32 and three user buttons. It has
been tested with the Adafruit Feather nRF52840 and the sample
samples/subsys/display/lvgl.
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
Fix confusing sentence in api docs of function 'zms_get_data_length'. There
is no 'history counter' assosiated with the api of that function.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
In order to bring consistency in-tree, migrate all dts code to the new
prefix <zephyr/...>. Refer to #45388 for more details.
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Update signing script to use proper arguments for imgtool when SHA512
or pure signature is needed.
Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
With this changes, device will check if AP support Neighbor Report or
not before trigger roaming. No need to issue 11k command to enable 11k,
if AP supports Neighbor Report, device will trigger 11k roaming with
priority.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Add remote target selection. Explicitly enable GPIO support in
amp_blinky. Disable peripherals driven from the hifi4 domain in the
cm33_cpu0 domain to overcome resource conflicts. Select mailboxes for
amp_mbox. Set CONFIG_DMA_TCD_QUEUE_SIZE for amp_audio_output and
amp_audio_loopback. Select i2s devices for amp_audio_loopback.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Decrease the sample frequency to 16 kHz to accomodate memory
constraints. As the SAI driver in RX mode requires more than a certain
amount of blocks to be free, change count of those prefilled.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
By forcing IODEV test to throw errors and verifying no more CQE's are
coming through after the forced error.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
It appears this had not been exposed as the testsuite does not
exercise forcing errors for the IODEV. However, in the upcoming
testcase for error-handling of multi-shot items, it will be required.
Placed as standalone patch for the sake of clarity.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As an error-handling strategy. The client then can recover from this
depending on the error and the number of occurrences.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As their handling is not that similar and mixing them both affects
code readability. This patch does not affect functionality and does
not break any testsuite under rtio API.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
There's no use-case covering this case and enforcing it will allow
simplify the logic for processing items with each of these items when
mutually exclusive.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Define `zephyr_generated_headers` as an interface library rather than a
custom target. This allows CMake libraries to depend on this target
AND propagate the dependency if needed using target_link_libraries.
Example:
If some user header includes offsets.h, even transitively, then
offsets.h must be generated before any source file that includes that
header is compiled. This can be captured by defining a library `foo` for
the header with a public link dependency on zephyr_generated_headers
using `target_link_libraries(foo zephyr_generated_headers)`. The
ordering dependency on the generated offsets.h header will then
propagate to `foo` and any libraries that link against `foo`, even
transitively. This was not possible before this CL because one cannot
use custom targets as public link dependencies with
target_link_libraries.
Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
Add a variant for builds that use debugger to flash the dongle,
effectively overwriting the stock nRF5 SDK bootloader.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Updated linker scripts no longer necessitate that.
Users who employ a bootloader in their design should be able to adjust
partitioning more easily, removing IMAGE_DEF with a Kconfig if needed.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Use this approach for a simpler flow and to make relocation of images
into RAM easier.
Also do not force-select CONFIG_XIP (which is a default anyway), since
RP2350 can boot from SRAM.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Add needed backtrace helpders routines and enable
backtrace for the Xtensa Fusion F1 DSP in the
IMXRT595S.
Signed-off-by: Mike J. Chen <mjchen@google.com>
This commit introduces the new test ram_context_for_isr that shows
how to configure an application (prj.conf, CMakeLists.txt, etc.) in
order to enable full ISR execution with a RAM context.
It resolves the issue of flash latency affecting real-time constraints
during ISR execution.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit introduces the SRAM_SW_ISR_TABLE option which is selected by
DYNAMIC_INTERRUPT. It allows splitting the DYNAMIC_INTERRUPT option into
two parts:
- One for the relocation of the ISR vector table in RAM
- One for the inclusion of functions needed to install ISRs dynamically
The goal is to later only select the relocation of the ISR vector table in
RAM and not all the associated functions from the dynamic interrupt
mechanism.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This adds frontend of arm ethos-u core driver for nuvoton numaker m55m1x.
Special notes include:
1. Leaving application overriding dcache flush/invalidate weak functions
for cacheable NPU buffer
2. Configuring macs_per_cc to 256 in arm ethos-u core driver to match
m55m1x ethos-u RTL config
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This option allows board configurations to specify how to set the SDIO
pull ups when the SPI bus goes to sleep, using the Infineon WHD.
This is a board specific value.
Signed-off-by: Magpie Embedded <magpieembedded@gmail.com>
For TCP socket, this fixes AT+CIPSEND command with too short timeout.
ESP modem replies SEND OK/SEND FAIL dependent on network traffic
condition, so this timeout config changes as Kconfig option for being
configurable by user.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Merging in DTS_ROOT from sysbuild allows applications to specify a custom
DTS_ROOT path for the application via sysbuild.
Signed-off-by: Nick Brook <nrbrook@gmail.com>
Update the HTTP service API to allow setting per-service configuration,
currently it is only custom socket creation callback,
but in the future it can be extended with other parameter
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Allows to configure the alert or therm mode for triggers
based on the low/high temperature treshholds
Also adding simple PM
Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
Depending on clock config init, some devices might be initialized
with RC_FAST clock enabled but not calibrated. Logic to detect if
clock is calibrated was fixed for this reason. Also, logic to set
RC_FAST and REF_TICK for devices with timer specific clocks (ESP32
and ESP32-S2) was also fixed.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Use Wake-Up Timer which has a higher resolution than RTC as the sleep
timer for MAX32655 boards.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Device goes to deep-sleep after tests finish so bytes in UART FIFO are
not transmitted. As a consequence, twister cannot receive project
success string and misinterprets the test result. Enable deferred
logging so that logs are flushed after tests.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Not needed to disable MAX32_ON_ENTER_CPU_IDLE_HOOK flag anymore
It is not set if CONFIG_PM been defiend
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Set wake-up timers' clock source to INRO as EVKIT does not have an XTAL
soldered by default.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Some instances of timers such as wakeup timer are not tied to a clock
bus so make this property optional.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Set MAX32657 cpu power states as idle, standby and powerdown. Power down
mode is disabled by default and can only be entered by calling
pm_state_force. Note that residency durations may need to be updated
depending on the resolution of chosen sleep timer.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Add basic power management states of MAX32657.
After UG/DS has been finalized the values and states
might be need to be updated.
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
The default 'near' mode results in zero exit latency ticks, which
prevents `sys_clock_set_timeout` from being called. This causes
the system to remain stuck in deep sleep modes. Use ceiling method
to obtain a nonzero exit latency tick count.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
This diagram was superseded by layering_natsim.svg
When the native_posix related documentation was removed
this diagram stopped being used.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Improve corss-channel test by setting different
duty cycle on channels. This modification will enable
detection of inter-channel effects like crosstalk.
Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
In Single IO mode, where the clock stretching feature is not available,
the RX FIFO could get overflowed if the TX FIFO was filled with more
dummy bytes than the RX FIFO could receive data items at a given moment.
Such problem could be quite easy hit on nRF54H20, for example for longer
RX transfers (like 8 kB) at 8 MHz.
This commit limits accordingly the number of dummy bytes that can be
enqueued in the TX FIFO.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Before this commit, building llext packages with a `POST_BUILD` step added
via `add_llext_command()` only worked for from-scratch builds (tested with
Ninja).
When the client CMake script called `add_llext_command()` to add a custom
`POST_BUILD` step, `has_post_build_cmds` was set to 1, and a `true` (do
nothing) command was executed instead of `copy` for the `llext_pkg_input`
target. Consequently, the timestamp of `llext_pkg_input` was not updated.
Before executing `llext_proc_target`, Ninja seems to check the timestamp
of `llext_pkg_input`. When the custom command added by
`add_llext_command()` generated a new `llext_pkg_input`, Ninja was unaware
that `llext_pkg_input` had been updated, and the dependent
`llext_pkg_output` was not executed. Building only worked if
`llext_pkg_input` was missing, i.e., only for from-scratch builds.
The fix replaces dependencies so the command for `llext_pkg_input` is
executed after `llext_proc_target` (after `llext_proc_target` may generate
a new `llext_pkg_input`).
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Adding additional mainteners - Scott Worley and Mohamed Azhar
for Microchip Hal repo since mulitple groups in Microchip
are working on this repo
Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
to be able to choose c++23 dialect
deprecates c++2b, but we should keep the option c++2b for legacy
Signed-off-by: Adrian Bieri <adrian.bieri@loepfe.com>
Fixed build fail since 4c93fcd35b.
Fixed test run fail on Ambiq platforms.
Added Ambiq section in the test.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Issue: the alarm 1 do not generate interrupt
There are three compare registers in a SAM TC channel:
RA --> alarm 0
RB --> alarm 1
RC --> top_value
By default the RB/TOIB was configured as an input and no longer
generates interrupt.
Set the direction of TIOB to output for alarm 1 interrupt.
Fixeszephyrproject-rtos/zephyr#85018
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
Clarify the identification and matching of bindings to devicetree
node compats. The previous definition implicitly hinted at two
bindings with the same compat being allowed, but did not state this
clearly. The updated wording should make it clear exactly how
bindings may be defined, and how they are matched.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This swapping method is more efficient than swap using move and
has been available for some time, remove experimental flag and
set it as the default except for stm32 devices which have
partition alignment for swap using move
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The elf file needs to be closed after done being used, otherwise sys
module will generate resource leak warnings.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The files should be closed after done being used, otherwise python
warnings are generated from the sys module
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit modifies the 'west build' command to display the closest
matching boards when an invalid board is specified, making it easier
for users to find a typo in the used board name.
The user is also instructed to run 'west boards' if he wants to get
the full list of available boards.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
- Add lux conversion to APDS-9306 driver
- Change settings of gain, resolution and
frequency to index-based settings
- Add Device Tree overlay sample for APDS-9306
- Fix wrong board name in light_polling README
- Add value checks for the attribute set API call
- Remove the reading of the sensor attributes
from the sensor and use buffered values instead
- Rename `frequency` property to `measurement period`
Closes#91104
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
This commit expands the SDIO subsystem test
suite by adding support for write test.
Also this commit adds needed conf/overlay
files for arduino portenta h7, nicla vision
and giga r1 for wifi_nm tests
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
This commit introduces support for the SDHC driver on STM32, enabling
functionality APIs for SDHC host controllers.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
- Specify "Device" Power Management Support in sections covering
CONFIG_PM_DEVICE=y or n
- Extend the enum pm_device_state docstrings to define and detail
expectations of devices in each enum pm_device_state state.
- Extend pm device driver code example with more concise comments
and include pm_device_driver_init, pm_device_driver_deinit, and
DEVICE_DT_INST_DEINIT_DEFINE() (device deinit feature)
- Describe the device driver PM states used if PM_DEVICE is not
enabled.
- Note which states a device driver is initialized from and can
be deinitialized in and why.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Extend test suite to cover pm_device_driver_deinit() resulting
from call to device_deinit().
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce pm_device_driver_deinit() which is required to fully
support device_deinit(). This function shall be called by drivers
when device_deinit() is called.
If PM_DEVICE is enabled, it will
simply check whether the device is either SUSPENDED or OFF, this
will prevent device_deinit() on a device which is currently in
use, and ensure the device is in the correct state if device_init()
is called later.
If PM_DEVICE is not enabled, it will invoke the SUSPEND action which
mirrors the pm_device_driver_init() behavior. Note that TURN_OFF
action is not called since the device is deinitialized after this
call.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Rewrite the docstring for pm_device_driver_init() to align with
documentation, especially covering the case where CONFIG_PM_DEVICE=n
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Matches with on-board ICM42688, complying with right-hand rule.
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Changed the REDIRECTS variable from a list to a tuple in the
redirects.py scripts since it's an immutable sequence.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Since the old configuration set a sensor initialization priority to 60,
we faced a conflict between sensor and regulator initialization priorities.
I think the best approach is to always use a lower priority if the
component has dependencies. If this is a specific case, maybe a .conf file
is needed for the board. The new .conf file will then be more generic.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Increase the sched_userspace timeout from the default of 60 seconds
to 300 seconds to account for variations in execution time caused
by host system load.
(Variation observed on the qemu_cortex_a53/qemu_cortex_a53 platform.)
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
GICC_IAR (GICv2) includes the source processor for SGIs in bits 12-10.
Mask them away otherwise IPIs sent from any CPU other than CPU0 will be
considered out of bounds.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Introduce CONFIG_RISCV_NO_MTVAL_ON_FP_TRAP to handle implementations
where the mtval CSR does not provide useful information during
floating-point illegal instruction exceptions.
The RISC-V specification states that mtval is "either set to zero or
written with exception-specific information" on traps. Some
implementations, including QEMU, do not populate mtval with the
faulting instruction value during FP-related illegal instruction
exceptions, making it unusable for FP exception handling.
Previously, this behavior was hardcoded for QEMU targets only, but
other CPU implementations may also lack useful mtval content for FP
traps. Decoupling this from CONFIG_QEMU_TARGET and allows other
platforms to properly declare this limitation.
The new Kconfig option defaults to enabled for QEMU targets to
maintain backward compatibility.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Even though it's not listed in the options of
icm45686_get_shift(), for completeness sake,
do not leave an unhandled range.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Make the common SPI CS delay property configurable from devicetree. This
can be required for using a nRF54L as a Bluetooth controller, since it
has an additional delay after waking up from the CS assertion until it
is ready to accept and transmit data (see OPS t_START_HFINT).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Although the value currently hard-coded in the driver (10 ms) is quite
high, it may turn out to be insufficient when there is a need to use
some very low SCK frequency, like 250 kHz.
Make the timeout value configurable per-instance, via devicetree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Configure KSZ8081 phy drivers to set strapping mode override
for RMII mode without setting reference clock to 50MHz when
"RMII 25MHz" operation is selected in device tree node.
Signed-off-by: Daniel Coffey <danielcoffey@carallon.com>
Supplicant sends keepalive on timer expiry but due to driver + nRF70
delays it is delayed to the AP, meanwhile some APs disconnect due to
lack of keepalive.
Set the processing delay to 700ms (based on tests) to fix.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Pull the feature to add driver processing delay to the driver
capabilities. Useful to customize for sending keepalive.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Commit 5e25283821a("drivers: wifi: Create dedicated mem pool for Wi-Fi
driver") introduced OSAL dependecy in the Zephyr QSPI driver for HL
read, but in bustest we don't enable nrf_wifi OS module, so, it crashes
here. And we should not be using OSAL APIs in Zephyr code anyway.
And in this case we don't even need to use the heap, so, move the rx
buffer to stack.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In eth_cyclonev_send(), add a guard to detect if the net_pkt has no data
buffer (i.e., pkt->buffer is NULL) before starting the TX descriptor loop.
This prevents a potential null pointer dereference on frag->data in the
first iteration of the do-while loop.
The previous in-loop check for frag was redundant and misleading: it still
allowed access to frag->data even when frag could be NULL, making the code
both unnecessary and potentially unsafe.
The new check ensures frag is valid before entering the loop, covering the
rare case where net_pkt has no associated buffer.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
If reading the status register fails, the register
`sts` will contain meaningless data.
In such cases, the function should return an error
and not attempt to clear any pending interrupts
with invalid data.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
Before this commit size of rx and tx queues was set to 1, which is out of
spec. This commit adds queue logic, ability to set their size and exposes
configuration options w.r.t rx queue interrupts
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Add support the host I/O over eSPI peripheral channel for private
channel.
The default port number of ESPI_PERIPHERAL_HOST_IO_PVT_PORT_NUM
for ITE SoC is 0x68.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.
The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce the NRF GPIO Pad Group device driver and binding. The
pad group device represents the GPIO pads (pins), contrary to a
GPIO controller, which is one of the many devices which can be
muxed to pads in the pad group.
The pad group belong to a power domain, which is not neccesarily the
same power domain as devices being muxed to the pads, like GPIO or
UART. If no ACTIVE device is using any of the pads in the pad
group, the pad groups power domain may be SUSPENDED. Before the pad
groups power domain is SUSPENDED, pad config retention must be
enabled to prevent the pads from loosing their state. That's what
this device driver manages. Once retained, the pad configs and
outputs are locked, even when their power domain is SUSPENDED.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Multi-function PMIC AXP2101 now has a fuel gauge driver. Add the
corresponding node to all boards with such a PMIC (also checked their
datasheets and confirmed these actually have a battery correctly
connected to the PMIC).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The use of timer3 seems to be some legacy leftover from when the
overlay was specific to esp32s3_devkitm originally (commit cf3b2643).
Using timer0 instead.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Incomplete iso IN/OUT is just informative and its occurrence does not
prevent the endpoint from actually transmitting/receiving data. Such
"late" isochronous transfers, which are perfectly fine according to USB
specification, were observed on Windows host with nRF54H20 running
explicit feedback sample operating at High-Speed.
The incorrect handling manifested itself with "ISO RX buffer too small"
error message. The faulty scenario was:
* incompISOIN handler does not find any matching endpoint
* incompISOOUT handler disables endpoint, discards buffer and sets
rearm flag
* next DWC2 interrupt handler iteration after reading GINTSTS
* XferCompl interrupt on iso IN endpoint
* XferCompl interrupt on iso OUT endpoint
- transfer was actually happening to the buffer discarded in
incompISOOUT handler
- XferCompl handler modified the next buffer
* GOUTNakEff interrupt, iso OUT endpoint EPDIS bit is set
* EPDisbld interrupt, rearm flag set
- the buffer modified by XferCompl is used and fails because it is
not large enough
Modify the sequence so it accounts for host actions and the above faulty
scenario no longer causes any problems.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Rearm isochronous endpoints when handling incomplete iso out interrupt
to make it possible to rearm the endpoint in time (before SOF),
especially when operating at High-Speed.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add Seeed Studio as a platform initially unmaintained with rules to match
boards and sheilds.
This should make it easier if someone (ideally from Seeed Studio) would
like to step up to maintain that platform.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Remove build warning when building the posix_arch_console driver with
CONFIG_PRINTK=n and CONFIG_STDOUT_CONSOLE=n.
Fixes: #93790
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The client list is filled from the bonding table at registration
but this should only be done once like the callback registration
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
In current implementation, the UUID 128 is not well supported. The
found issue includes,
Issue 1: No clear byte order of the UUID 128 in local SDP record.
Issue 2: No clear byte order of the UUID 128 of the SDP discover
parameter.
For issue 1,
Add the description to note that if the SDP attribute type is
`BT_SDP_UINT128`, `BT_SDP_INT128`, and `BT_SDP_UUID128`, the byte
order should be little-endian.
And swap the 128bit from little-endian to big-endian when responding
the peer SDP discovery request.
For issue 2,
Add the description to note that if the SDP discovery type is
`Service Search` and `Service Search Attribute`, and UUID is UUID 128,
the passed UUID data of the discovery request parameter should be
represented as the little-endian byte-order sequence.
And swap the 128bit from little-endian to big-endian when packing the
SDP discovery packet.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new shared_heap section. Update the xtensa_soc_mmu_ranges structure
to include a new memory range for the shared heap.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Enable double buffering on isochronous feedback endpoint to avoid
sending ZLP instead of feedback information.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Enable double buffering on data OUT endpoints to allow USB stack to
enqueue next transfer as soon as possible. This is especially useful
when operating at High-Speed where there is significantly less time
between subsequent SOF packets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Change the macros to have only one plus operator per term. This is
purely stylistic change, no functional changes.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Removed overlay and enabled these nodes in board dts directly as it is
not be valid unless CONFIG_NETWORKING is enabled.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Update NETC device nodes according to NETC driver update:
1. Added "nxp,imx-netc" compatible for netc driver.
2. Added all memory region in MMIO reg propertiy to let driver to handle
MMIO mapping for all memory region.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Update NETC device nodes according to NETC driver update:
1. Added "nxp,imx-netc" compatible.
2. Added all memory region in MMIO reg propertiy to let driver to handle
MMIO mapping for all memory region.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Update NETC device nodes according to NETC driver update:
1. Added NETC block control device node to handle block control
initialization in netc block driver.
2. Added "nxp,imx-netc" compatible for netc driver.
3. Added all memory region in MMIO reg propertiy to let driver to handle
MMIO mapping for all memory region.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
As reg property is not used by the driver and there is no proper address
could be assigned to it, so remove it.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add NETC block driver, it could do some block memory region MMIO mapping
and also so dome block initialization, moved some netc related
configuration form board_init() to block driver so that it could be reused
between different platforms, although some configuration is different for
different platform, but put all NETC related code in the same driver to
make it easier to be maintained.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
GIC ITS depends on kernel heap, so move GIC initialize to be behind of
heap which initialization priority is CONFIG_KERNEL_INIT_PRIORITY_OBJECTS
(it is 30 by default).
MU mailbox and SCMI objects depend on GIC, so set their init priority
to be same with GIC, the initialization sequence decided by the dts
dependency although they use the same init priority.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
GIC redistribute and ITS on i.MX 95 is DMA noncoherent, so enable
CONFIG_GIC_V3_RDIST_DMA_NONCOHERENT and CONFIG_GIC_V3_GIC_DMA_NONCOHERENT.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
GIC v3 ITS is initialized in pre-kernel stage in which sleep function
can't work yet, so use busy delay in pre-kernel stage and use sleep
delay in post-kernel stage.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
For RDbase used by its command, When GITS_TYPER.PTA = 1, physicall address
is used, the RDbase field consist of bits[51:16] of the address, so need
to left shift the address by 16 bits. But when GITS_TYPER.PTA = 0, PE
number is used, no need to shit anymore.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
GIC redistributor on Some platform are connected to a non-coherent
downstream interconnect, it need to use Non-cahable and Non-shareable
access atttributes to access external memory. And also flush the
data cache after CPU update related memory.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
In case of fatal network error (i.e. when the LwM2M client runs out of
retries), call lwm2m_engine_stop() to cleanup any allocated resources
for the client. The engine is dead at that point anyway so the
application needs to recover.
If this isn't done, it is theoretically possible to restart the LwM2M
client (with lwm2m_rd_client_start() which does not report an error in
such case), which in turn could lead to resource leaks (like for
example the observer list is reinitialized) if the application
didn't call lwm2m_rd_client_stop() first. Calling lwm2m_engine_stop()
ensures that all resources are freed even if the application doesn't
call stop before restarting.
Stopping the engine is also needed when the network error occurs when
de-registering - in such case the engine goes straight into the IDLE
state, where it's possible to restart the client and thus reinitialize
the observer lists.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Move control endpoint enable/disable calls to udc_enable()/udc_disable().
It does not change much during USB device support initialization, but
it seems to resolve an issue when starting from RAM, though the real
cause is unknown.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Add I3C node to MAX32657EVKIT board devicetree and add I3C to the list
of supported drivers.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
test_smp_boot_delay sometimes fails due to thread started by IPI
not having started or not finished running:
* Using CPU mask to explicitly state which CPU to start the thread
seems to fix the issue where the thread is not started quickly
enough.
* When the host system is under heavy load (e.g. twister-ing),
emulators may not get enough CPU time to run the newly created
thread. So extend the IPI delay a bit more to allow for this.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The default supported format in these LCD is RGB565, not BGR565. It is
set to BGR565 because a wrong assumption about "byte swap" in Zephyr.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The RGB565 and BGR565 formats are interchanged in the sample. This leads
to wrong assumptions about "byte swap" in Zephyr and make display
drivers, shields and video sample follow it for a long time. Fix it.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Formats should be coherently set between camera and display. Forcing
RGB565 to BGR565 will break some platforms.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add missing error checks for mutex locks after the mutexes
were changed to not use K_FOREVER which should not be done in
the BT RX thread.
A larger overhaul of how mutexes are using within the scan delegator
should be considered, as there are a lot of locks and unlocks when
handling the callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update the driver to support DMA operations on L4 series devices, with
a shared DMA channel. Split channels do not work on these chips, since
there is no dedicated TX and RX channels on the DMA, so configuring two
channels with SDMMC as the peripheral results in a non-functional
configuration.
Fixes#91216.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a helper function that constructs a rtio SQE chain with the purpose
to perform a bus read operation on a list of registers.
Usage:
struct rtio_regs regs;
struct rtio_reg_list regs_list[] = {{regs_addr1, mem_addr_1, mem_len_1},
{regs_addr2, mem_addr_2, mem_len_2},
...
};
regs.rtio_regs_list = regs_list;
regs.rtio_regs_num = ARRAY_SIZE(regs_list);
rtio_read_regs_async(rtio,
iodev,
RTIO_BUS_SPI,
®s,
sqe,
dev,
op_cb);
Signed-off-by: Armando Visconti <armando.visconti@st.com>
PCA9533 is added to the overlay so the new driver
is compiled by the automated “build all LED drivers” test
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
• Supports led_on/off, led_set_brightness (0–100 %, 152 Hz default),
and led_blink (7 ms – 1.685 s) with automatic sharing of the two
on-chip PWM engines; returns –EBUSY when a third distinct pair is
requested.
• Includes basic runtime-PM boilerplate to honour power-domain control;
the device itself has no dedicated low-power states.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Error codes fall into two main categories:
case 1: NOT_SUPPORT_XXX. This means that the configuration of the
parameter is not supported locally.
case 2: INVALID_XXX. This means that the parameter is not configured or
duplicated in the set_config_req command.
Currently the protocol only supports SBC, so it is only checked for SBC
parameters.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
1. Update nxp irtc driver to fix issue in init and alarm function.
2. Update RTC device tree binding to support "share-counter".
3. Update RT700 dtsi to support rtc0 for cpu0 and rtc1 for cpu1.
4. Update readme.
5. Update unit test project conf for RT700.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The helper function should have the flexibility to have different
expected CS counts. Namely, the test cases where the transfer is
essentially empty should not need to assert CS and many platforms are
failing on CS testing currently due to expecting CS assert and deassert
despite it being a 0 clock/bit transfer being specified.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Use an atomic_t instead of semaphore for counting the CS, semaphore is
too heavy and wrong choice for this variable.
Also, print what the actual value gotten was in case of error.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Add sink PACS register for PBP public broadcast sink example to make
it work with PBP broadcast source
Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
The driver gets FMC bank address using
`FMC_BANK1_<parent_register_value>` define.
This approach has some flaws:
- The parent (bank) register's value might not correspond
sequentially to the expected bank number.
For example: `STM32_FMC_NOSRAM_BANK3` maps to `FMC_BANK1_4`,
instead of `FMC_BANK1_3`.
- Some families don't even define the necessary `FMC_BANK1_x` macros.
To address this, the commit adds an optional `bank-address` property,
providing a direct way to define the FMC bank address for the driver.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
Made some order in the Kconfig's for silabs series 2 socs.
Made a distinction between silabs "generic family" (e.g. xg21) and silabs
"device family" (e.g. efr32mg21).
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
In 4c93fcd35b, the default use case has been changed to support setting
a custom handler, but it's written in a way to only support MCUX and
SYSTICK based platforms. For any other platform the build break because
of undefined TIMER_IRQ_HANDLER and TIMER_IRQ_NUM.
Fix the conditional so that the custom timer line is only entered if a
custom handler is defined. The test would probably stil not run on those
platforms until a custom case is defined pointing at the custom timer
interrput handler, but at least it won't break CI.
Also drop a closing endif comment as that clearly became misleading.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Otherwise, a previous firmware build could have run into the chip and
keep led control enabled in spite of disabling it through
dts-property.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Corrected a typo in the project name within the Bluetooth
samples directory. The incorrect name was causing confusion
in documentation and build processes. This change updates
the relevant file(s) to use the correct project name, ensuring
consistency across the Zephyr repository.
Signed-off-by: Gomaa Mohammed Eldebaby <gomaaeldebaby2211@gmail.com>
LTDC interrupt routine is used to reload frame buffer pointer
once full frame is finished flushing. As long as there is no
need to change buffer - there is no need to disturb CPU.
Thus: Enable LTDC interrupt only when new buffer is pending
Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
Update all nodes located in the MAIN domain and add the
main_ prefix. This is required because the am64x_main.dtsi
now has this prefix.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This files can be used by the 32-bit as well as 64-bit ARM
architectures. Move them into the dts/vendor/ti directory to
make the ISA independant.
All nodes located in the AM64x MAIN domain should have the main_
prefix. This makes it more clear where those pins are actually
located in the chip.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Add tests to make sure that if neighbor cache does not contain
info for neighbor link layer address, we can queue packets
and re-send them when the neighbor cache contains the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If we do not know the neighbor link address, we need to send
neighbor solicitation message to net. While waiting neighbor
advertisement, there might be other packets that we want to
send to that neighbor. Queue those packets so that all of them
can be sent when NA message is received.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that we will never access ICMP handler struct
that is allocated from stack.
Without this change, there was mysterious crashes if using
native_sim board where the handler function was pointing to
stack data which contained garbage when the test was run.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit adds support for the extended feature set
feature. This includes:
- hci boilerplate
- kconfigs, including one for a max local feature page
- reading remote features is done by a command and callback
- this is not linked into the auto feature request on
connection as this procedure can take quite a few connection
events, and we do not want to delay the user
- added the commands to the bt shell
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Previously, the version complete event had to come after
the remote feature complete event for the notify_remote_info
function to be called.
This becomes less practical when adding the read all remote
features complete event, as this can take some time. Meaning
the order of events is not predictable.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Add an nPM1304 EK shield, update samples/shields/npm1300_ek to support
both shields, improve the sample description.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Add missing ranges to nrf54h20.dtsi reserved-memory. No translation
is required so ranges is set to <empty>.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add missing ranges to global_peripherals to explicitly translate
child addresses of global_peripherals in ram (0x2f000000).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
- Added "wifi config" command.
- Add OKC parameter to "wifi config" command.
Set okc to 1 to enable opportunistic key caching.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Fix assertion in ull_conn under race between connection
termination and processing of HCI Reset command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ULL Tx Ack FIFO's first index being advanced beyond a
recorded ack_last value in a node_rx when under race.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Keep IW610 kconfig same as RW612, as it has similar Wi-Fi FW.
Remove NXP_WIFI_CAU_TEMPERATURE as it's not used.
NXP_WIFI_MEM_ACCESS, NXP_WIFI_REG_ACCESS and NXP_WIFI_OWE should not be
enabled by default.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Added the below config to overide default calibration data and
select 2Ant Isolation.
NXP_OVERRIDE_CALIBRATION_DATA
WLAN_CALDATA_2ANT_HI_ISO
WLAN_CALDATA_2ANT_LO_ISO
Signed-off-by: Kavita Sharma <kavita.sharma_1@nxp.com>
When using DMA for SPI communication, the WS2812 SPI buffer should be
placed in the __nocache section to ensure it resides in uncached memory,
which is typically required for DMA operations.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Keep-alive probes have seq number set to SND.NXT - 1 and may or may not
contain an octet of data. The latter case was not handled properly
therefore add a special case when validating seq number to response to
keep-alive probes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The UUID library utilities require dynamic memory allocation for certain
operations, but MINIMAL_LIBC provides no malloc heap by default. This
causes test failures when UUID functions attempt to allocate memory.
Add CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=256 to provide a minimal heap
arena sufficient for UUID operations which typically
require small heap allocations.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Support the case that 11k parameter can be set before wifi connection.
This field should not be cleared by connection.
Neighbor report will be cleared before start_roaming.
So wifi_connect don't need to clear 11k params.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Add guard of supplicant state condition.
Not send neighbor request in auth procedures.
Add process for null pointer params.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Initially phy_link_callback_set got called before iface init got set.
Moving to iface_init, fixes an issue that mac would set interface to up
even though it was down because startup phy down callback didn't got
through.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
This commit adds a cellular modem overlay to the zperf sample, enabling
the use of zperf with a cellular modem.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
Since the change to HWmv2 we do not need to have this options in the
top level anymore. Let's move them into the top level Nordic SOC
Kconfig file.
(Note they moving into into each individual soc Kconfig would
add a dependency on SOC_FAMILY_NORDIC_NRF which is not set for
bsim targets)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These CONFIG_SOC_NRF5* are set when the corresponding
CONFIG_SOC_COMPATIBLE_NRF* option is set. There is no need to have both
conditions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In case of a busy environment and if STA is far, then we see many
retries for the frames that cause the RPU to be awake though host has
de-asserted wakeup_now signal, this leads to WDT interrupt and host
thinks that it has given sleep opportunity to RPU and initiates a
recovery.
To handle this, increase the sleep opportunity window to 5s to cover all
the retries, this solves the false recovery problem. While at it, also
increase the range, no reason to limit to lower window. And update the
help text with the warning about power consumption.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add missing "memory-regions" property which is required for UART
on NRF54H20 to clock_control sample overlay file.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
Add build asserts for "memory-regions" property in nrf drivers which is
required on targets with DMM for saadc, pdm, pwm, twim, twim_rtio, twis,
tdm, uarte, spim and spis. On targets where the property is not required
the assertion macro expands to nothing.
Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
Add a test for check_init_priorities --initlevels in addition to the
normal error output, this validates that the function names are printed
correctly.
The current case covers sys_init, device with no init functions and
device with init function so it should be all cases.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Device init pointers have been moved off struct init_entry and into
struct device in 766bfe7b2e, but check_init_priorities.py have not been
modified to check the new pointer so it's been showing NULL for all
devices since.
Fix it by searching down the right pointer for device init entries.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Cleaned up the flash_rpi_pico driver to improve code readability and
compliance with Zephyr coding standards. Fixed inconsistent indentation
across the file and removed variables that were declared but not used.
A few improvements are credited to Manu3l0us.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
The Raspberry Pi Pico 2 uses a QMI flash controller, which differs from the
SSI controller used in the original Pico. Zephyr already has support for
the SSI controller, but lacked support for QMI.
This change adds the QMI flash controller implementation in the
flash_rpi_pico.c driver file. Additionally, the RP2350 SoC devicetree file
(rp2350.dtsi) has been updated to enable and describe the flash controller
for Pico 2.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
This commit resolves a bug where the USB Endpoint
provided by the HID driver was incorrect when in
High Speed mode.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
The project root was set unconditionally as the variable ZEPHYR_BASE,
but users developing a Zephyr application may wish to override the project
root used by ECLAIR as the base directory of their projects, so that
all paths processed by the tool are relative to that directory.
- A new cmake variable ECLAIR_PROJECT_ROOT is introduced;
- additional messages to output this information before the build starts.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
When compiling with -Werror=missing-field-initializers and the
differential is disabled, we get a compilation error for the ADC
drivers. We should still initialize the value to false.
Signed-off-by: Yuval Peress <yuval.peress@gmail.com>
When the gpio-leds and pwm-leds nodes are enabled,
the pin gets reconfigured to the driver that is
initialized later as both nodes were using the same
LED.
Use the Red LED that was unused for gpio-leds node.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Remove extra-parentheses when operator precedence is implicit.
Eliminate implicit integer to boolean conversions.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Usually, drivers failing to initialize throw a message in the log,
signaling the cause of failure. Add it to this driver so the user
isn't confused by no message yet the device being marked as disabled.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Replaces the check-then-create pattern for symlinks with
opportunistic creation. Instead of checking for existence
before creating the symlink, the code now attempts to
create it directly and gracefully handles the case
where it already exists.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Introduce a 1000 ms delay between consecutive sensor readings to prevent
logging overflow and reduce console clutter.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Most pressure sensors provide temperature and pressure data, but only a
few support altitude readings. This change adds a check to ensure
altitude is logged only when the sensor supports it.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Running twister with plaform Microchip mec_assy6941/<variant_name>
builds the arm_irq_vector_table test. Microchip mec_assy6941 boards
all use a 32-bit 32 KHz timer for the kernel. The test build fails
due to any board using a custom kernel timer driver requires the
test to include a chip specific interrupt table. We don't want to
exclude the test. The MEC chips include Cortex-M4 SysTick. We added
board overlays to the test turning off the 32KHz timer and enabling
ARM SysTick. The test now builds.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Fix condition in which alarm stops working after a certain amount
of time. Hardware timer is 54-bit, yet it is treated as 32-bit by
the counter driver. To allow alarm event by hardware comparators,
counter high word must be loaded into the register along with
the lower word managed by the driver.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This allows tracing any application and stores the data in RAM. Using
gdb, the ram_tracing variable contents can then be saved and viewed
using babeltrace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix Coverity issue CID 363738 (CWE-120): A potential buffer overflow could
occur in fcx_mldx5_uart_send() due to unchecked memcpy() when copying
command data into a fixed-size frame buffer.
This patch ensures that the length of the data being copied validated
against the remaining buffer size to prevent overruns. Also replaces a
redundant strlen() call with the precomputed cmd_data_len.
Fixes: #92634
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
Addressing low-hanging fruits.
Put in a separate commit in order to make it easier to keep track of
changes.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As a first step to enable the similar variants (e.g: ICM42686),
refactor common functionality into icm4268x files. As a result,
applications using the icm42688 will need to have both compatible
properties: "invensense,icm42688" and "invensense,icm4268x" defined.
In-tree boards have been modified to comply with this pattern.
This patch does not contain functional changes. The driver should
work the same as before.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Some display controllers allow to work with BGR888 directly, a significant
reduction in CPU load is gained this way.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This board was introduced concurrently with the STM32_CLOCK macro, so the
board's DTS uses the old method instead of the macro to specify clocks.
Update the DTS to use the STM32_CLOCK macro as other places do now.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This board was introduced concurrently with the STM32_CLOCK macro, so the
board's DTS uses the old method instead of the macro to specify clocks.
Update the DTS to use the STM32_CLOCK macro as other places do now.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Commit 3b8e1fa8df updated the documentation
to mention explicitly that ZLI must be registered using IRQ_DIRECT_CONNECT.
Update the ARM IRQ macros such that attempts to register a ZLI using
IRQ_CONNECT becomes a build failure instead of silently succeeding.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Add CONFIG_WIFI_NM_WPA_SUPPLICANT_DEBUG_SHOW_KEYS option to control
whether key material (passwords, encryption keys, etc.) is included
in debug output. This is equivalent to the -K command line flag in
wpa_supplicant.
The option:
- Defaults to disabled (n) for security reasons
- Includes clear warning about security risks
- Should only be enabled during development/debugging
- Provides compile-time control over key material logging
This allows developers to enable key material debugging when needed
while maintaining security by default.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Firmware needs to know the connection type to be established.
use the wpa_proto field to derive the connection type.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Refactor certificate processing code to eliminate duplication and
enable reuse across modules that require enterprise support.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
The Tx rate was previously stored as an integer, which caused loss of
precision for rates like 8.6 Mbps or 34.4 Mbps due to integer division.
The change will update data type to float.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
SPI(M/S)20 and SPIM(M/S)21 instances enable usage of pins on different
port, but require request for constant latency mode. Added
handling of such scenario in the driver. Added testcase
to cover it.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
UARTE20 and UARTE21 instances enable usage of pins on different
port, but require request for constant latency mode. Added
handling of such scenario in the driver. Added testcase
to cover it.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
The sh->ctx->uninit_cb needs to be set before posting the
SHELL_SIGNAL_KILL to the event, like the k_poll based code did prior to
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Some SoCs might not have any VDD reference available.
Use internal 1.2V reference derived from VDD in this case.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
update exti num-lines to depict total number of lines
add clocks entry to exti nodes of certain series
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
add nucleo_h745zi_q_stm32h745xx_m7 overlay and config
add nucleo_h745zi_q_stm32h745xx_m4 overlay and config
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
rename intc_exti_stm32.c to intc_gpio_stm32.c
rename EXTI_STM32 to GPIO_INTC_STM32 in Kconfig.stm32
update CMakeLists.txt
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
Add initial support for i.MX 95 15x15 LPDDR4x EVK board. This board
uses the i.MX 95 15x15 SoC that shares many similarities to the
already supported i.MX 95 19x19 SoC used for the i.MX 95 19x19
LPDDR5 EVK.
This enables Zephyr to boot and run on the i.MX 95 15x15 EVK and
provides a foundation for further peripheral enablement and
application development.
Signed-off-by: Aziz Sellami <aziz.sellami@nxp.com>
As i.MX 95 19x19 and i.MX 95 15x15 have different pinmux definitions,
keep common part in nxp_mimx95_a55.dtsi, and define separate dts file
for each variants. These include the common part and their respective
pinmux definitions.
Signed-off-by: Aziz Sellami <aziz.sellami@nxp.com>
The GPIO block instance is based on the instance number during the
device driver initialization. This is not correct as instance numbers
in now way reflect any numbering scheme. Therefore, a DTS property
is introduced so that the block instance numbering is indicated
explicitly.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Commit extends existing persistent provisioning bsim mesh test that
checks that mesh removes gotten stuck persisted key if key is reused.
Correct key is imported normally after that.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit adds destruction of the persisted in PSA ITS key if
mesh does not own it (zero bit in the bitmap of persisted keys).
This is not standard mesh behavior, but might happen
if something happens between removing key data in mesh and
in the crypto library (for example power off in bettwen).
Previously, mesh wasn't able to import key with gotten stuck
key id. The current fix reproduces more robust behavior.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit adds the tracing macros and functions related
specifically to the k_msgq_put_front API.
Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
this commit adds a sample code to illustrate the base usage
of message queues. a producer and a consumer thread work
together, exchanging messages in a FIFO (for normal payloads)
and LIFO (for higher priority payloads) schemes.
Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
This commit introduces the k_msgq_put_front API for sending
messages to a queue in a LIFO scheme.
Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
Add an overlay to the st specific power_mgmt wkup_pins sample
for the nucleo_c092rc board.
The user_button on pc13 is used as the wakeup-src.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add a overlay to the counter_basic_api test to enable the counter node
of TIM2, TIM3, and TIM14 to TIM17.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add a overlay for the nucleo_c092 testing usart4 and dma
channels 6 and 7. These are all not available in smaller STM32C0 SoCs.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Adds definitions for the nucleo_c092rc supporting
the STM32C092RC entry-level MCU with CAN-FD support.
The series does not have a pll, so with the given 48MHz
CAN core clock frequency the internal timing calculation
can't find parameters for 5MHz data bitrate,
and for 8MHz they have an error of 84/1000.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add dts support for the STM32C091 and STM32C092 SoCs,
that are part of the STM32C0 series.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
On STM32C092 variants CAN-FD is supported, and the clock
source can be chosen in the CCIPR1 register.
This commit adds the helper to prepare that choice for the register.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Adds SoC support for the STM32C091, and the STM32C092 SoCs
which are part of the STM32C0 series.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Fix Max Chunk reporting during Block_Information_Get:
If friendship is established, then max possible chunk size for transfer
is reported according to friend's queue size.
ChunkSize = (FndQ sz * Bytes per seg (12)) - Opcode(1) - Chunk_Num (2)-
8 byte MIC (max)
= (FndQ sz * 12) - 11
This allows all segments of Chunk_Transfer messages to fit in a friend
queue. If this is not done, friend queue keeps overflowing
systematically causing unstable PULL_MODE transfers.
Fix Chunk requests:
Adapt number of requested chunks according to current friend queue size.
If friend queue is too small, at least 1 chunk is requested.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Fix interrupt level for acmp0 in the dts for xg21 device.
Only radio interrupts are critical and should have priority 0.
Signed-off-by: Bastien Beauchamp <bastien.beauchamp@silabs.com>
The wdt_basic_api test uses retained memory. Currently,
uses sram0 for the ram space. This mostly does not retain
memory. Since the test variables are unable to retain
their value this platform test fails and should be excluded
for now.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
The icm45686-xxx example nodes have incorrect node labels.
The current node labels are for the icm42688.
Signed-off-by: Alden Haase <aldenhaase@gmail.com>
The Network Coprocessor on SiWx91x owns a large part of the flash. Zephyr
is not expected to access to theses areas.
However, it is still technically possible to access these. In addition, we
prefer the DTS contains a comprehensive and transparent description of the
hardware. So update the DTS with the real partitioning of the SoC.
Reference documentation is available here[1].
[1]: https://www.silabs.com/documents/public/application-notes/
an1416-siwx917-soc-memory-map.pdf
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
MISRA-C says the right hand of a logical and should not contain side
effect operations. Instead nest the branches to get the same logic
without the MISRA-C rule breakage.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The concurrency and switching tests take quite some time to
finish (relatively speaking). When running in emulator and
under a heavily loaded system (e.g. twister-ing), it may
time out as the emulator is not getting much CPU time. So
make the base timeout longer, which can then be further
adjusted by the board timeout multiplier.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since the netstats handler calls on functions which reach deep into the
networking stack, there is a lot of points actually at which it can be
blocked, even forever. So having this handler on the system workqueue is
not a good idea and can even cause a deadlock in some cases if it's
blocked waiting on a synchronization primitive that would be given by a
work item scheduled later in the queue. Therefore, make a workqueue
specifically for this http server socket instead of using the system
one.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Otherwise, calls to rtio_cqe_consume_block will bypass the semaphore
and held back in a Z_SPIN_DELAY(1) indefinitely.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Ignore duplicate 11v and legacy roaming requests if roaming is in
progress. This fix can avoid multiple auth or reassociate, which are
triggered by duplicate roaming requests.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Zephyr's openOCD works just fine. Also make sure to actually enable
openocd runner in the board.cmake file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
With commit d280d89 the gpiof port got moved from file stm32u5.dtsi to
file stm32u5_extra.dtsi. stm32u5_extra.dtsi is not included for
STM32U535/545. In same file stm32u5.dtsi still node wkup-pin@8 references
non-existent port gpiof.
Fixes#93445
Signed-off-by: Andreas Schmidt <andreas.schmidt@dormakaba.com>
Change init priority from '55' to 'CONFIG_SERIAL_INIT_PRIORITY' to align
with how other serial devices are initialized.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
This reverts commit a90a47b1c9.
This commit was written with CMSIS 5 in mind, where some Cortex-M cores
have "SHP" in the SCB_Type, and some have "SHPR". This is not correct as
Zephyr is *supposed* to be using CMSIS 6 for Cortex-M... but CI actually
picks up CMSIS 5 instead (it includes both with CMSIS 5 taking priority).
The end result is that Zephyr's CI builds this happily but it causes build
failures on downstream users (e.g., example-application).
Revert the commit now, as it is not used yet by anyone. The revised version
using only "SHPR" shall be reintroduced once the CI issue has been fixed.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
If `desired_delay_ns` is `0`, it is much saner to set the delay to `0x00`
than to underflow and set it to `0xff`, which is the current behavior.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
When building with CONFIG_OPENTHREAD_INTERFACE_EARLY_UP enabled,
`is_up` is undefined (since 596844a).
Signed-off-by: Lorenz Clijnen <github@lorc.be>
Signed-off-by: Lorenz Clijnen <l.clijnen@edna.eu>
Stop processing microphone data on error or when streaming ends. This
avoids I2S read timeouts due to audio data not being available while
streaming.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
As lwm2m_notify_observer_path() now reads attributes for the updated
resource, value_conditions_satisfied() does not need to read the
attributes again, it can just reuse the already available data.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When updating a resource, the LwM2M library verified pmin attribute on
all resources/objects in the observer path list and chose the smallest
value. While this make sense for determining the lower-boundary for the
next notification time, it could lead to unnecessary notifications being
generated too early if the updated resource had a higher pmin value
configured on it.
Therefore, when checking notification criteria for an updated resource,
check the pmin value for that resource path and if set and higher than
the lowest pmin value evaluated for the observer list, use it instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When running Zperf traffic + scan in the background eventual we hit a
deadlock:
* sysworkq: recovery->stop_zep->vif_lock->hal_disable->wait lock_rx
* nrf70_bh_wq: event_tasklet->lock_rx->disp_scan_done->
disp_scan_res_get_zep-> waiting on vif_lock
The traffic triggers recovery (another bug) and conflicts with display
scan.
Fix by moving scan results processing to system workqueue instead of
doing it in the FMAC event callback context, this is how supplicant scan
also works.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The mutex is being used as a simple binary semaphore. It is not
recursed so we don't need to track thread ownership nor lock count.
Exchange the mutex for a binary semaphore to save resources and
speed up shell.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add two API to save SCB context and restore it, typically
used in suspend to RAM use case.
The scb_context_t and the backup/restore functions are designed to only
handle SCB registers that are:
- Mutable: Their values can be changed by software.
- Configurable: They control system behavior or features.
- Stateful: Their values represent a specific configuration that an
application might want to preserve and restore.
Register excluded from backup/restore are:
1. CPUID (CPUID Base Register)
Motivation for Exclusion: This is a read-only identification register.
2. ICSR (Interrupt Control and State Register)
Motivation for Exclusion (from restoration): While its current value
can be read, directly restoring a saved ICSR value is highly
dangerous and generally unsafe in an RTOS context.
Contains Read-Only Status Bits: A significant portion of ICSR
consists of read-only bits (VECTACTIVE, VECTPENDING, ISRPREEMPT,
TSRUNPEND). These bits reflect the current state of the exception
system (e.g., which exception is active, which are pending) and are
managed dynamically by the CPU and the RTOS.
Forcing a previous state onto these bits would corrupt the live
system's interrupt handling.
Contains Write-Only Set/Clear Bits: Some bits are write-only to set
or clear a pending interrupt (PENDSVSET, PENDSVCLR, SYSTICKSET,
SYSTICKCLR). If these bits were set in the saved context, restoring
them might immediately trigger an interrupt or change its pending state
unexpectedly, outside the RTOS's control.
RTOS Management: In Zephyr (and other RTOSes), the kernel tightly
manages the interrupt and exception state.
Direct manipulation of ICSR's volatile bits could conflict with the
RTOS's internal state machine, leading to crashes or unpredictable
behavior.
3. CFSR (Configurable Fault Status Register)
Motivation for Exclusion: This is a read-only status register that
reports the current state of Memory Management, Bus Fault, and Usage
Faults. It's used by fault handlers to determine the cause of a fault.
4. HFSR (HardFault Status Register)
Motivation for Exclusion: Similar to CFSR, this is a read-only status
register that reports the current state of HardFaults. It's for
reporting, not for configuration or restoration.
5. DFSR (Debug Fault Status Register)
Motivation for Exclusion: This is a read-only status register that
reports debug-related faults. It's primarily used by debuggers and
is not part of the application's runtime context to be saved/restored.
6. MMFAR (MemManage Fault Address Register)
Motivation for Exclusion: This is a read-only register that stores the
address that caused a Memory Management fault. It's a diagnostic
register, not a configurable parameter.
7. BFAR (BusFault Address Register)
Motivation for Exclusion: Similar to MMFAR, this is a read-only
register that stores the address that caused a BusFault. It's a
diagnostic register.
8. AFSR (Auxiliary Fault Status Register)
Motivation for Exclusion: This register is implementation-defined and
read-only.
Signed-off-by: Michele Sardo <msmttchr@gmail.com>
Update DTS settings to add DMA configuration to devices which
support GDMA peripheral, in order to perform operations via DMA
driver instead of HAL functions.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Remove unused DMA clock property from device tree. Clock will
be managed by DMA driver for devices with GDMA peripheral.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Perform DMA operations using GDMA driver instead of relying on
HAL functions. Prevents eventual conflicts between SPI and GDMA
drivers when other peripherals also use DMA.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Due to the alignment and granularity requirements of memory allocation,
setup->wLength is shorter than the allocated buffer size.
This lead to responses larger than what the host requested, which it
rejected. Fix it by using the minimum between the allocated size, the
struct size, and the wLength requested.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Some OSes like MacOS use shorter UVC 1.1 probe/commit messages even when
UVC 1.5 is supported, without bUsage, bBitDepthLuma, bmSettings,
bMaxNumberOfRefFramesPlus1, bmRateControlModes bmLayoutPerStream.
Accept messages of arbitrary size to safely be processed, ignoring all
missing fields, improving standard compliance.
Signed-off-by: Josuah Demangeon <me@josuah.net>
LwM2M client context was defined on stack in the test function, however
it could still be in use when the test ended, as the actual LwM2M
teardown took place in a common "after" test function. In result, the
Lwm2M context content could be corrupted.
Additionally, increase the system work queue stack size, as the stack
overflowed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Check if there actually is data to copy before calling memcpy() to
prevent potentially calling memcpy() with NULL value pointer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
* Simplify the logic of the get_number() function to address the corner
cases reported by UBSAN regarding byte-swapping signed integer values.
The existing logic was actually only valid for little-endian systems,
as it expected that the bytes written from the packet buffer will be
stored at the beginning of the int64_t memory, plus the actual
byte-swapping with signed integer casts inside was hard to follow.
Switch to a plain uint8_t buffer for integer readout, and use
dedicated system function to convert the big-endian data in the buffer
into unsigned integer in the system endianness, followed by the final
cast to a signed value.
* Add explicit cast to uint32_t in put_objlnk() to prevent warning about
not-fitting integer after byte shift, and update the result type to
uint32_t as well.
* Switch to buffer with sys_put_be16/32/64 when writing integers due to
similar warnings about byte-swapping signed values.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify if the integer value being parsed does not overflow int64_t type
and report an error in such cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify if the integer value being parsed does not overflow int64_t type
and report an error in such cases.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Check if value pointer is not NULL before passing it to memcmp() inside
lwm2m_engine_set(). As the function actually expects that the value
pointer can be NULL in case resource value is cleared (there is a test
case for such behavior), validate that len value is actually 0 if NULL
value is provided, to avoid unexpected behavior in other parts of the
function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Booting the radio core when it is not programmed will typically
cause a reset loop. This can happen when programming multiple
images to a device, and the app core image is programmed before
the radio core.
With this change we avoid the reset loop in that case.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Update the recover mechanism for nrf54h to only call recover
once. Using nrfutil device recover with both --core Network and
--core Application is redundant with IronSide SE as both of these
map to the same operation which does a full erase of the device MRAM.
Additionally, recovering twice in a row specifically in a nrfutil
batch file (which is used by this runner implementation) triggers some
odd behavior with the current latest version of
nrfutil device + IronSide SE, which can cause the device to enter a
reset loop and appear unresponsive and preventing 'west flash --recover'
from working properly.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Program the new UICR and PERIPHCONF artifacts if they are generated.
These are required for the application to operate properly if they
are in use.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add support for generating UICR and associated artifacts in a
format compatible with IronSide SE, to be used for Nordic SoCs
in the Haltium family.
The main feature added with this is the ability to configure certain
global domain peripherals that are managed by the secure domain
through setting UICR.PERIPHCONF. This register points at a blob of
(register address, register value) pairs which are loaded
into the peripherals by IronSide SE ahead of the application boot.
The added helper macros in uicr.h can be used to add register
configurations to the PERIPHCONF. Entries added through these macros
are then extracted by a script, post-processed and placed in a blob
located at specific part of MRAM.
A default PERIPHCONF configuration has been added for the nrf54h20
soc to support the standard BLE use case (matching the configuration
in the soc devicetree).
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
With IronSide SE there is only one defined UICR which is at
the location of the APPLICATION UICR. Update the devicetree
definition accordingly, and use the "nordic,nrf-uicr" compatible
on the node since the domain distinction added by the v2 compatible
is no longer relevant.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Refactor the default RAM memory map on nrf54h20dk:
Removes use of "nordic,owned-memory" which is no longer needed on
nrf54h20. Reserved memory nodes that were under "nordic,owned-memory"
have been moved directly under reserved-memory.
The memory shared between cpuapp-cpusec and cpurad-cpusec in RAM0x
is no longer used with IronSide, since IPC buffers toward the secure
domain are at new fixed locations. The cpuapp_data region
has been expanded to fill the available space in RAM0x when removing
these shared memory regions.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
nrf-regtool will not be used as part of IronSide SE compatible builds.
It will remain in use for the nRF92 series, until that too undergoes a
switch from SDFW to IronSide SE.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
CONFIG_USE_DT_CODE_PARTITION had to be disabled to add MCUboot support.
As a result, CONFIG_FLASH_LOAD_SIZE was left at zero, which means that
the linker would claim all available MRAM for the app core.
For now, we can't allow that, because the default nRF54H20 DK memory map
divides MRAM between multiple cores in order to support various samples.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This replaces the legacy SDFW compatible board configuration with the
IronSide SE compatible one, thus removing support for running samples
and tests on nRF54H20 devices with the old firmware.
All applications are expected to work on `nrf54h20dk/nrf54h20/cpuapp`
out of the box. For other board targets, all applications are expected
to boot, but may require additional peripheral configuration in UICR.
Build system support for the new UICR format is to be added separately.
Co-authored-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Update this multi-core test to always run the `main` and `remote` images
on cpuapp and cpurad respectively.
This is to prepare the test for running with IronSide SE, in which case
keeping cpurad as the main board target wouldn't make as much sense,
because cpurad would have to be started by cpuapp.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Switch which board is the remote in the test case for
mbox communication between nrf54h20dk/nrf54h20/cpuapp and
nrf54h20dk/nrf54h20/cpurad, making cpurad the remote instead.
This is done to prepare the sample for executing with IronSide SE,
where using cpurad as the main board doesn't make as much sense,
since cpuapp has to start cpurad.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
remove the use of phy_configure_link() in the ethernet drivers.
The user can now select the default speeds via DT prop, doing
another phy_configure_link() in the eth driver would overwrite
that.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
fixed link mode is a mode where we don't comunicate with the phy,
therefore we don't need it in other phys as the generic phy_mii one.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
move adi,adin1110.yaml adi,adin2111.yaml
from the phy subdir back into the ethernet dir.
They are ethernet controller bindings, not phy bindings.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1. Supported ACMP case on mimxrt700_evk
2. Fixed the issue of using the same address for
different trigger sources. This bug would cause the
examples to run in a way that did not match the theory.
3. Removed some redundant descriptions in the README.rst.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Fixed the bug that DAC value was set incorrectly.
2. The MIMXRT700 does not have windowed mode and
'enableSample' controls, code added for compatibility
on this platform.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
As packets need to be forwarded between Wi-Fi/Eth interface and
OpenThread interface, routing support has to be re-enabled and
configurable through prj.conf file.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Don't automatically enable device runtime PM on the SPI port just
because `PM_DEVICE_RUNTIME` is enabled. Require the user to explicitly
call `pm_device_runtime_enable` on the port, or add
`zephyr,pm-device-runtime-auto` to the devicetree node.
Through the usage of `pm_device_driver_init`, the default clock control
and pinctrl handling can all be contained in `spi_stm32_pm_action`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Board overlay was moved from downstream to upstream.
By mistake, License was left unchanged.
Change License type to match with the upstream.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Board overlays were moved from downstream to upstream.
By mistake, License was left unchanged.
Change License type to match with the upstream.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Added a new 'Board variants' section to the board documentation
to describe supported flash and PSRAM configurations for Espressif
boards using snippet-based build-time selection.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Fix FS shell using fixed 'storage_partition' nodelabel instead of
accessing the DT defined partition from the zephyr,fstab,littlefs
node partition property.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
This commit adds config_get support for native_tty. This is helpful as
some driver code (e.g. u_blox m8) will error out if they can't read the
current configuration.
Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
Threads must not attempt to context switch if they are holding a spinlock.
Add this information to the documentation for k_spin_lock().
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Upon context switch, the virtual "interrupt lock" acquired by irq_lock()
must not be "held". However, the current documentation for irq_lock() says
that it is perfectly valid to hold it (!), and that a suspended thread will
hold the "interrupt lock" upon being scheduled again (!!).
Update the documentation to remove the outdated section and indicate that
context switching while holding the interrupt lock is not allowed.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
The do_swap() routine used when CONFIG_USE_SWITCH=y asserts that caller
thread does not hold any spinlock when CONFIG_SPIN_VALIDATE is enabled.
However, there is no similar check in place when CONFIG_USE_SWITCH=n.
Copy this assertion in the USE_SWITCH=n implementation of z_swap_irqlock().
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This reverts commit 3e9dffbe25.
Though this works fine, when CONFIG_ASSERT=y the spinlock validation
fails as the underlying code though uses OSAL spinlock APIs is not ready
* sleeping with spinlock held
* multiple threads taking the same spinlock (might work on UP, but not
on SMP on the same CPU)
Revert this for now, till the underyling is robust.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
the nRF connect device tree extension shows below warning:
'Property not mentioned in "nordic,nrf-pinctrl:child"'.
Fix this by applying the property to both groups separately.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Image files for ADI shield boards were introduced in commit
25c7fa4e63, but they weren't referenced
anywhere in the documentation source and thus were deadstripped from the
build, resulting in broken image references in the board catalog card
view.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Also increase regulator init priority so that ethernet vdd is
turned before PHY initialization
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Re-use the workqueue instead of having dedicated thread for handling
interrupts. This reduces memory usage and complexity.
Furthermore adds an auto mode for 100BASE-T1 negotiation.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
The modem modules cmux module is currently directly coupled to the
presence of specific modems, rather than being selected by drivers
for whatever hardware wants to request the default MTU of 127 bytes.
This commit the makes the device drivers (for now, modem_cellular)
select the symbol, thus decoupling the modem modules from the
presence of any specific device.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add declaration of the HSE and HSI frequency that will be used to compute
the SystemCoreClock.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add declarations for High-Speed External (HSE) and High-Speed Internal
(HSI) clocks.
These clocks, based on oscillators, can be used to generate the system
clocks.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add soc_early_init_hook() function to update the SystemCoreClock variable,
which represents the reference clock.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Use wrapper function for read operations to allow using the new HAL
function that handles ECC checks and erased page detection.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Update hal_adi to include the new flash read function that checks for
false-positive ECC failures and applies a workaround if needed.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
To fix MAX32690 flash problems, I created a wrap version of
MXC_FLC_Write(...) function which disables ICC before calling write
function and enables ICC after this function.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Disable interrupts during flash operations to prevent unintended jumps.
Interrupts are now disabled before read, erase, and write operations to
avoid accidental jumps to other flash sections while working on a
specific section.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Default MPU configuration marks whole flash area as cacheable. When
reading from an erased section of flash, cache controller may fill cache
lines with ECC corrected data. To prevent this, disable caching on
storage section so that ECC workaround can be applied during reads and
correct data is returned.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The Kconfig CONFIG_HS20 was undefined in zephyr hostap.
Need to add config for Hotspot 2.0 feature.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Avoid entering low-power state during I2C host transfers in PIO mode.
Entering a low-power state during an active PIO transfer may prevent
the peripheral from generating the clock signal correctly,
resulting in transmission errors.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Adds support for checking module samples and tests for additional
Kconfigs, as well as logging Kconfigs, so that this check can be
reused more easily with out of tree manifest repos
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Allows enabling the Clock Recovery System (CRS) for HSI48 to achieve
the expected accuracy for USB transfers. Uses USB SOF packet by default.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
This commit adds sections to the virtio docs with the currently
supported transfer methods, drivers and samples
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
This commit adds virtiofs functions implementing fuse operations required
to enable zephyr filesystem support
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
A simple sample showing how an interrupt (or thread) could produce data
a thread (potentially a user mode thread) could then consume.
Some great suggestions added thanks to Luis Ubieda
<luisf@croxel.com> to show multishot in use which avoids extra
syscalls in the tight processing loop of the consumer.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The Zperf sample application was chosen to demonstrate basic network
functionality and high-performance use cases. This application serves
as a reference for users who wish to enable other network sample
applications.
In addition to the essential configurations for the Intel i226 Ethernet
controller, stack-specific configurations were added to ensure stability
under heavy network loads. These configurations include adjustments to
buffer sizes, interrupt handling, and DMA descriptor management.
Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
Foxville LM (0x125B) i226 variant and Intel Alder Lake platform was
used for developing and stabilizing the i226 Ethernet device driver.
However, users can reuse the provided device tree models as a reference
when enabling the support for other i226 variants and platforms.
This device-tree model include essential configurations for the i226
Ethernet controller, such as PCIe settings, interrupt mappings, Phy
MDIO, and DMA descriptor configurations.
Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
The Intel i226 Ethernet Controller is a PCIe Gen 2 one-lane modular
endpoint device that integrates a GbE Media Access Control (MAC) and
Physical Layer (PHY) port. This driver provides support for MAC and
DMA-specific initialization and runtime TX/RX operations.
Key features:
- MSI-X interrupts for TX/RX DMA channels.
- Multiple TX/RX DMA channel support with exclusive bottom-half.
- Implements a circular descriptor ring architechture with
producer-consumer semantics for high performance pkt processing.
- Full duplex support for 10/100/1000 Mbps.
- Half duplex support for 10/100 Mbps.
- Auto-negotiation for 10/100/1000 Mbps.
- MTU customization for flexible packet sizes.
- MAC address filtering based on:
- Random MAC generation.
- Local-mac-address mentioned in device tree.
- EEPROM pre-programmed mac address.
- Setting mac address via net shell.
- Support for multiple Ethernet interface instances.
Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
Signed-off-by: Ling Pei Lee <pei.lee.ling@intel.com>
Intel i226 MAC supports MDIO C22 and MDIO C45. Standard PHY registers
are accessible through MDIO C22, whereas PMAPMD and PCS are accssible
through MDIO C45.
Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
The Ethernet device model consists of multiple subsystem components, such
as MDIO, PHY, MAC and PTP_CLOCK. These components are mapped into a single
PCIe BAR location with same base address.
This platform driver retrieves the MMIO mapping details and provides a
framework to share it with all the child subsystem components. This
approach avoid the duplicate remapping, ensures efficient re-use of
MMIO mappings across related devices.
Example device tree structure for first ethernet instance:
parent0: parent0 {
compatible = "intel,eth-plat";
interrupt-parent = <&intc>;
vendor-id = <0x8086>;
device-id = <0xXXXX>;
igc0: igc0 {
compatible = "intel,igc-mac";
/*
* MAC specific properties.
*/
status = "okay";
};
mdio0: mdio0 {
compatible = "intel,igc-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
compatible = "ethernet-phy";
/*
* PHY specific properties.
*/
reg = <0x0>;
};
};
};
This framework is modular and re-usable for other PCIe based Ethernet
devices. It can also be extended to support additional platform specific
information shared across child nodes.
Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
This reverts commit fd88386a9f, it breaks
uart support on ITE platforms when PM is enabled but PM_RUNTIME is not,
possibly others as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This is a follow-up of commit 9a9ae6ffdb,
specifically for the nRF54LM20 DK, which was not included in the
previous commit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move handling of write-to-clear status and stop detect to the
beginning of the ISR for PIO mode to reduce unnecessary clock
stretching and improve responsiveness during transfers.
This patch also separates status clearing for shared FIFO mode,
ensuring it is done at the appropriate point after data handling
completes, maintaining correct transfer behavior.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
According to the datasheet the flash erase timing is
typically 2ms, and max 10ms.
H503: DS14053 Rev 4: section 5.3.10, table 45, t_erase_max=10ms
H562/H563: DS14258 Rev 6: section 5.3.11, table 51, t_erase_max=10ms
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The ISO C function time() is not specified to set the global
errno variable, so remove that in case there are side-effects.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
- migration guide entry for renaming zephyr,gpio-stepper to
zephyr,h-bridge-stepper
- rename zephyr,gpio-stepper to zephyr,h-bridge-stepper in stepper.rst
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
To reduce the SEMC clock to a usable speed we had to divide down
the output clock of System PLL2 PFD1. To do this I had to override
the hardcoded defaults. This commit adds the flexibility to
override them in your board files.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
Errata ERR050396 causes data corruption if writes happen to TCM memory
so work around it by not marking AXI transaction cacheable. Workaround
taken from NXP SDK example.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
When preparing LLEXT ELF sections only invalidate instruction cache
of executable sections. Also skip the step on platforms, managing
cache at the application level.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When a board contains two identical flash memories configured in
parallel dual-flash mode, the actual sector size is twice the sector
size of a single flash memory. So, assuming 4-KiB sectors for each flash
memory, any erase operation must be 8-KiB aligned.
This commit updates the start offset and sector size in the spi_flash
sample to be properly aligned when a dual-flash configuration is used.
At the moment, this is only supported for STM32-based boards and QSPI
flash memories.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
When dual-flash mode is enabled, any erase operation is executed on both
flash memories in parallel. This means from the flash driver's point of
view, the size of a given sector/block is twice the size of a
sector/block on a single flash memory.
For example, assuming 4-KiB sectors for each flash memory, if the flash
driver is asked to erase at address 0x0000, the erase size must be a
multiple of 8 KiB since each sector erase operation will cause a 4-KiB
sector to erased in each flash memory.
Before this commit, the doubled erase size was only considered in
'setup_pages_layout'. Now, the actual sizes of the erase operations are
properly set in the flash driver's data and are used everywhere in the
driver.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
When dual-flash mode is enabled, even bytes are written to the first
flash memory and odd bytes to the second flash memory. This means, from
the flash driver's point of view, the size of a flash page is twice the
size of a single flash memory's page.
So if each flash memory has 256-byte pages, 512 bytes should be used as
page size by the flash driver. Using 256 bytes was working fine but is
suboptimal.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
When dual-flash mode is enabled, two identical flash memories are
connected to the QUADSPI peripheral, each having its own set of
registers. This means that when reading or writing a flash register,
this has to be made for both flash memories.
For example, when reading a status register (1 byte), the QUADSPI
peripheral must be configured to read two bytes of data, which
correspond respectively to the value of the register in the first and
second flash memory. Same thing when writing.
Before this commit, when dual-flash mode was enabled, only the register
of the first flash memory was considered, which means the second flash
memory could be incorrectly configured and that any write/erase
operation could be considered as completed too early, if the operation
takes more time to complete for the second flash memory.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
The 'qspi_read_status_register' routine implements the reading of a
flash memory's status register. This routine is used anytime reading a
status register is needed, except in 'qspi_wait_until_ready'. This
commit moves the read routine to be able to use it in
'qspi_wait_until_ready'. The 'qspi_write_status_register' is also moved
to keep it close to the read routine.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
In multiple places, "#if DT_PROP(DT_NODELABEL(quadspi), dual_flash) &&
defined(QUADSPI_CR_DFM)" was used to guard sections specific to
the dual-flash feature. This is quite long and "#ifdef
STM32_QSPI_DOUBLE_FLASH" is now used instead.
Note the presence of QUADSPI_CR_DFM is no more checked. This is not
considered as an issue since when QUADSPI_CR_DFM is not available, the
QSPI hardware doesn't support dual-flash mode so this mode must not be
enabled in the devicetree. With that change, enabling dual-flash mode
when not available causes a compile-time error.
Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
Apparently the simple python HTTPS server the sample is interfacing,
cannot handle parallel TLS sessions (just one at a time), hence
establishing both IPv4/6 connections before sending request doesn't work
well, half of the requests are dropped. Therefore, modify the sample a
little to run only one TLS (or TCP if no TLS is used) connection at a
time.
Additionally, add a log in case HTTP client request fails, as it could
easily be overlooked if something went wrong.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Python HTTPS server counterpart for the sample now seems to enforce
ECDHE key exchange, so enable it in the sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
No more users of lxml in the tree so drop the 3rd party dependency (it
might still be pulled in by other projects, ex. gcovr).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove an old workaround requiring lxml to be present as junitparser was
not working with xml.etree.ElementTree until version 3.0.0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Using the third party lxml library for the very simple parsing task this
script performs in unnecessary, so switch to Python's built-in
HTMLParser.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add support for disabling autonegotiation to the cfg_link callback, as
with the phy_mii driver.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The driver previously could enter an infinite loop if the PHY software
reset failed to complete, which could happen due to hardware reset
issues or MDIO bus problems. Add a timeout of 1000 iterations so we
report an error in this scenario rather than causing a lockup.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
For GPIOs driving active-low signals, such as the VSC8541's reset pin,
they are supposed to be declared as active low in the device tree, and
set to 1 to assert and 0 to clear. Change the driver as such so that it
does not leave the PHY stuck in reset when so configured.
Also changed all in-tree board DTS files for this PHY to properly
declare the reset GPIO as active low.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The internal register read/write functions used uint32_t for the values
even though the registers are only 16 bits wide, resulting in a bunch of
casting. Change the internal functions to use uint16_t and wrap them for
the external read/write API which uses uint32_t.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The driver was not enabling the MDIO bus before trying to access
registers. Added enabling and disabling the bus around PHY register
accesses.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Fixed some build warnings in the driver from previous changes by
removing an unused variable and hooking up the cfg_link function. Also
removes some implicit boolean conversions.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
use mutex to protect page register
phy_mc_vsc8541_get_link got removed from
phy_mc_vsc8541_link_cb_set so, that
phy_mc_vsc8541_link_monitor (own thread)
is the only one to change data->state
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
M4F can use uarts from main domain of AM62. However, interrupts are not
supported.
The common main peripheral dts is kept in dts/venodor/ti to allow
sharing between arm targets (m4, r5) and arm64 targets (a53).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Add a flash driver that is used to perform flash operations on a flash
chip that is connected to an Andes QSPI controller and is used for XIP
mode.
The driver is as small as possible, because necessary code has to be
placed in RAM. It is not possible to fetch code from flash while
performing erase/write operations.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Add stm32l1_disco and nucleo_l152re overlays for testing
sleep/stop/standby modes:
- samples/boards/st/power_mgmt/blinky;
- samples/boards/st/power_mgmt/wkup_pins;
I've measured consumption for each low-power mode:
- low-power sleep ~1.72mA;
- stop mode ~324uA;
- standby mode ~2.2 uA;
It's possible to use RTC as idle timer to exit from stop mode.
Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
The rtk7eka6m3b00001bu need addtional ek_ra8d1_rtk7eka6m3b00001bu shield
to build with ek_ra8d1/r7fa8d1bhecbd platform. This commit to update
extra args to select it when build with twister
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add EK-RA8D1 to RTK7EKA6M3B00001BU Display Adapter.
This is a converter from EK-RA8D1 J57 port to RTK7EKA6M3B00001BU
Display CN1 pin signal.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This commit adds a new driver for the MaxBotix MB7040 ultrasonic
rangefinder. The driver uses I2C communication to read range data
from the sensor and exposes it via the Zephyr sensor API.
Tested on an esp32-s3 board using I2C bus. Verified readings at multiple
distances to confirm accuracy.
Signed-off-by: Sabrina Simkhovich <sabrinasimkhovich@gmail.com>
- Add pinmux for main_uart0 (P1.30 and P1.32).
- This is the UART in techlab cape and is great for m4 development.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Monitor mode doesn't require station mode. Disabling station mode
require necessary changes to work monitor mode.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Adds additional MPU memory permissions to userspace applications by
default. This change addresses an MPU fault encountered when running
tests/kernel/common and tests/drivers/adc/adc_api.
This approach opens additional memory locations up to user space access.
This assumes that end users of applications will tune the MPU regions for
the needs of that application.
Signed-off-by: John Batch <john.batch@infineon.com>
The shell subsystem currently uses k_poll for signalling. However,
k_poll is only used for simple event signals, results are not used.
Replacing the k_poll with k_event greatly simplifies the code, and
saves 4 struct k_poll_signal and 4 struct k_poll_event (one of which
was entirely unused) while costing a single struct k_event, for
every shell instance. It also allows us to not select POLL,
as we are using the simpler EVENTS instead.
A quick test build of the shell test suite on an nrf54l15 produces
the following build info:
using EVENTS:
FLASH: 71592 B 1428 KB 4.90%
RAM: 9872 B 188 KB 5.13%
IDT_LIST: 0 GB 32 KB 0.00%
using POLL
FLASH: 75524 B 1428 KB 5.16%
RAM: 11224 B 188 KB 5.83%
IDT_LIST: 0 GB 32 KB 0.00%
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
HCI RESET done in common_init() function in
the zephyr\subsys\bluetooth\host\hci_core.c file erase settings done
before in the zephyr\drivers\bluetooth\hci\ipm_stm32wb.c
in the bt_ipm_setup() function.
HCI RESET can be avoided by set a default "no-reset"
in the zephyr\dts\bindings\bluetooth\st,stm32wb-ble-rf.yaml
Signed-off-by: Eric Mechin <eric.mechin@st.com>
Previously, the clock_frequency property defined in the Device Tree was
not applied to the I2C controller, causing the controller to ignore the
specified bitrate configuration if no other config for speed. When using
default hardware settings, the lack of an explicit timing or frequency
config may result in the controller ignoring bitrate settings. This change
ensures that the clock_frequency value from DTS is now correctly mapped
and set during controller initialization, allowing the bitrate to take
effect as intended. This improves hardware configurability and ensures
the I2C bus operates at the desired speed specified in the Device Tree.
Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
max_stddev calculation was previously patched to be more at least
1 system clock cycle to cover for platforms that use higher frequency
system clock (32kHz). On that platform (nRF52) system clock frequency
was the same as tick frequency but on nRF54x that is no longer true.
Initially, the intention was to use 1 system tick and not cycle.
Fixing it now.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Get rid of this warning:
WARNING: I4 - ignore-by-author-name: gitlint will be switching from
using Python regex 'match' (match beginning) to 'search' (match
anywhere) semantics. Please review your ignore-by-author-name.regex
option accordingly. To remove this warning, set
general.regex-style-search=True. More details:
https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Separate CON responses do no have a reply callback registered (as no
response is expected), however are still registered for retransmission
on the pending list. Therefore, we not only need to check for empty
ACKs for such case but for RESET packets as well. However, this cannot
be done before "reply" processing, as some of the reply handlers
(notifications namely) check for RESET replies.
Therefore, add a final check for the RESET response after the existing
"reply" logic. In such case, just remove the pending response packet
from the retransmission queue, and release resources.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When using a separate response mechanism in LwM2M client, the
acknowledged flag is used to notify the engine that the request has been
acknowledged already with an empty ack and a separate CON response
should be sent. The same flag however is used by the retransmission
mechanism, to check if the CON request sent by the client has been
acknowledged by the peer.
As separate responses use the flag both ways, it has to be cleared
before sending the separate CON reply. Otherwise, the retransmission
logic assumes the reply has already been acknowledged and skips the
retransmission.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
when CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC set to 960M
and CONFIG_SYS_CLOCK_TICKS_PER_SEC set to 100
the MAX_TICKS will be zero or even negative value, which is not
expected.
so need add a protection here downgrading the accuracy to
its as high as possible
also add build message to show that tickless has no effect
fixes: #36766
there used to be a workaround, not a fix,
either change the CONFIG_SYS_CLOCK_TICKS_PER_SEC=200
or
CONFIG_PM to set the CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
to 32678
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Interrupt vectors for lpuart1 and lpuart2 are swapped according to the
reference manual RM0503 table 54.
Fixes the usage of the interrupt-driven uart API.
Signed-off-by: Axel Utech <utech@sofiha.de>
The current sample was always trying to enable trigger mode in the
driver no matter what, causing issues for instances where the sensor
simply has no interrupt pin configured in Devicetree.
Cleaned things up so that enabling trigger mode is done via the
driver's Kconfig option, and cleaned up the Twister testcases
accordingly (plus, made sure they are actually built by setting
min_ram to a value compatibel with the nucleo_f334r8).
README has also been updated to clearly document how to enable
either mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
paj7620 log module was being registered twice ; use LOG_MODULE_DECLARE
instead in paj7620_trigger.c
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Previously, phy_monitor_work_handler() would return early without
rescheduling the delayed work if the callback (cb) was not set,
causing the periodic monitoring to stop. This change ensures that
k_work_reschedule() is always called, even when cb is NULL, so
monitoring of the PHY state continues.
This prevents the monitor from being inadvertently stopped and
ensures consistent behavior regardless of callback registration.
This issue was observed during testing with the evb-lan8670-rmii
(an external LAN8670 PHY) connected to the SAME54 Curiosity Ultra
platform.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Call mdio_bus_enable() and mdio_bus_disable() during clause 22 register
read/write operations. Previously, these APIs were not invoked, which
could lead to improper MDIO bus handling.
This issue was observed during testing with the evb-lan8670-rmii
(an external LAN8670 PHY) connected to the SAME54 Curiosity Ultra
platform.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
C45 direct registers access is only supported by the LAN865x internal PHY,
not by the LAN867x external PHY, even though the MAC supports it. Restrict
C45 direct register access to the LAN865x internal PHY. The LAN867x
external PHY supports C45 registers only via indirect access through C22
registers.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Align the LAN865x driver module initialization priority with the default
priorities of MDIO and PHY drivers. The microchip_t1s PHY driver supports
both LAN865x internal PHY and LAN867x external PHY. It was observed that
the microchip_t1s driver initialization priority did not match the
priority sequence used by the GMAC driver when the evb-lan8670-rmii (an
external LAN8670 PHY) was connected to the SAME54 Curiosity Ultra
platform, leading to potential initialization order issues. This change
ensures the correct initialization sequence for reliable operation.
The initialization priorities of the microchip_t1s and mdio_lan865x
drivers are now set to the default values used in Zephyr. The LAN865x
driver init priority is updated to the most appropriate value so that the
microchip_t1s init priority aligns with all MAC drivers, maintaining the
correct initialization sequence.
Since the microchip_t1s driver can be used by many MAC drivers, keeping
the default priority provided by Zephyr is a good approach. Instead,
setting a specific priority for the eth_lan865x driver is more appropriate
to ensure proper initialization order.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series
Disabling these clocks during sleep mode
was causing USB device initialization issues
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series
Disabling these clocks during sleep mode
was causing USB device initialization issues
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Update toctrees to show 4.3 documents in the release page
Also move migration guide to 3.6 and 4.0 to the attic, a.k.a EOL
releases page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If the application uses slot 1 (i.e. in Direct XIP mode),
boot radio slot 1 instead of slot 0.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
The dmic_mcux driver required a mapping of paired dmics to
specify the same pdm number, and would arbitrarily assign the left
channel of the pair to even dmic channel number and the right
to an odd dmic channel number.
Change this so that the pdm number in the mapping is
used as the dmic channel number, and paired dmics are checked to
specify consecutive pdm numbers (instead of the
same pdm number).
This allows users to control explicitly which dmic
channel to use and whether that dmic channel is left or right,
without this arbitrary indirect mapping. This is important
in case they want a dmic that is wired to be right channel
to be assigned to dmic channel 0, which is the only channel
that supports hwvad.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Added support for mixed array types in JSON by introducing a new type -
json_mixed_arr_descr. Added APIs for mixed array type parsing and
encoding.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Introduced a mixed array type for JSON using the struct
json_mixed_arr_descr. Added helper macros to define elements of the
descriptor array.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
IW610 config add dhcpv4 server address max count,
dhcpv4 server icmp probe timeout and
Wi-Fi AP max STA count macro to
support max 8 STAs connect to UAP.
Signed-off-by: Pan Gao <pan.gao@nxp.com>
No idea why this was not put with the other node definitions next to the
other connector node. There is actually a style guideline for DTS files
and pretty sure this was breaking multiple of the rules.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
inside of its own thread when user enable it on
the LVGL Zephyr options menu, using this option makes
the calling of the lv_timer_handler driven by an internal
timer and thread. Options like priority and stack size
for this thread are exposed making it configurable by the
application.
Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
modules: lvgl: put LVGL core into a dedicated workqueue
Replacing the initial approach based on timers and semaphore
Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
This reverts commit 53375e95ba.
Some boards are failing with:
OverflowError: can't convert negative int to unsigned
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
BT_CTLR_LOW_LAT_ULL_DONE is used to reduce CPU usage in LLL
context by delegating the done event dequeue to ULL_HIGH
context.
Building a HCI Controller with BT_CTLR_LOW_LAT_ULL_DONE had
assertion when used with BlueZ stack.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix flash sync start from repeatedly forcing connection
event be skipped. Space new flash operation to be placed
in the past so that it does not force itself on to an
overlapping connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Reorganize testcase.yaml to make it easier to maintain.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Add test on fast instance uart00 on nrf54lm20dk.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Run test with 16MHz/32MHz bitrate using spi00 instance
(spi2x instances support up to 16MHz/2).
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Enable external memory node.
Use separate test configuration as external memory works
only on nRF54LM20 DKs with `external_flash` fixture.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Currently the linker script for ACE defines memory regions for
literals in interrupt vector memory. This wastes memory and leads to
link failures when CONFIG_USERSPACE is enabled. Remove those regions
to reclaim 8 bytes per vector and fix linking. Also remove duplicated
level 4 interrupt vector sections and replace spaces with TABS.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Compilation fails with an "index outside of array bounds" error:
In function 'find_memory_region',
inlined from 'gdb_mem_can_read' at \
zephyr/subsys/debug/gdbstub/gdbstub.c:93:7:
zephyr/subsys/debug/gdbstub/gdbstub.c:65:21: warning: array subscript \
idx is outside array bounds of 'const struct gdb_mem_region[0]' \
[-Warray-bounds]
65 | r = &gdb_mem_region_array[idx];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
zephyr/subsys/debug/gdbstub/gdbstub.c: In function 'gdb_mem_can_read':
zephyr/subsys/debug/gdbstub/gdbstub.c:42:36: note: while referencing \
'gdb_mem_region_array'
42 | __weak const struct gdb_mem_region gdb_mem_region_array[0];
|
Use a single element array to fix the problem.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The Network Coprocessor on SiWx91x owns a large part of the flash. Zephyr
is not expected to access to theses areas.
However, it is still technically possible to access these. In addition, we
prefer the DTS contains a comprehensive and transparent description of the
hardware. So update the DTS with the real partitioning of the SoC.
Reference documentation is available here[1].
[1]: https://www.silabs.com/documents/public/application-notes/
an1416-siwx917-soc-memory-map.pdf
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
There is no reason to place sli_siwx917_soc.h under #ifdef. Then, we can
get rid of the #if in the body of soc_early_init_hook().
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Variable CONFIG_SOC_PART_NUMBER is only used in CMakeLists.txt of
hal_silabs. In fact, this variable can be easily calculated from CONFIG_SOC
by changing lower case in upper case.
So, let's drop this useless variable.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
SOC_GECKO_SDID is no more referenced since commit 955aca6c0 ("soc: silabs:
Initialize clock manager HAL from DT"). We can safety drop it.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Added mikrobus_spi node label to EK-RA8M1 device tree board definition,
allowing compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.morris.vf@renesas.com>
Expand this sample to also work with GNSS_RTK through a serial client.
Make this compatible to work with VMU_RT1170 which requires using the
F9P, instead of the M8 UBX module.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Enable driver to consume RTK data-correction messages published
in order to enhance GNSS Navigation results.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
So this API can be used to send frames with a different encoding than
UBX. This enables UBX drivers to send RTCM3 correction frames using UBX
API, without having to switch over modem pipes.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
To be covered by existing Drivers: GNSS, as per requested during the
review process. Added myself as a collaborator to follow-up with
RTK-related changes.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Incorporate the basic RTK API as well as a basic client integration
(serial) as a way to receive and publish the RTK data.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Validating both a frame without CRC (should return calculated CRC), and
with CRC (should return 0 as a match).
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add overlays required to run the sample on
- nrf54h20dk/nrf54h20/cpuapp,
- nrf54l15dk/nrf54l15/cpuapp,
- nrf54lm20dk/nrf54lm20a/cpuapp.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Extend platform_allow with other nrf54* targets (overlays for these
targets already exist in the boards directory).
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
MSPM0L2228 launchpad provides evaluation and development
platform with 32KB SRAM and 256KB Flash. This board also
comes with 32Mhz external high frequency crystal and 32.768Khz
low frequency crystal.
Also LCD (only with L2228 SoC's) is included with many multi-function
PIO's exposed. Add support with basic UART and LED functions.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
mspm0lx series comes with various SoC's which varies in RAM,
Flash size and also with peripherals. Add support for all
the currently available SoC's with basic template.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
LUT sizes directly reflects the global data when enabled in dts
(even if no or few pins are really consumed). Also the PINCM
numbering across the series (g, l and c) is within 255, so fix
to use uint8_t to save the global space.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
All the HAL API/wrapper depends on PINCM indexing, which cannot
be derived from neither pin number nor the address offset.
With current approach, update the LUT table of possible PINCM's
for L series with GPIO A, B and C banks.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
mspm0 family of SoC series is split into three category,
mspm0g - high performance
mspm0l - low power
mspm0c - entry level
With G already part added, add support for L series of SoC's.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
although udiv is represented in clock tree of L series, this is
not really present or controllable from SYSCTL registers. Enable
udiv only if present in dts.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
mspm0 series (currently g, l and c) shares the common SoC
level init functions and pin control/muxing configurations.
To avoid duplication for each series, create a common path
and move the SoC and pin control definitions.
Other common functionalities like Power Management, Power off
handling will be added in future, which will be common across
series.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
MSPM0Lx series supports pin function upto 11 i.e 0xb, extend
the pin control function number to 11.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Flash size and address is extracted from dts, which will be common
for all the upcoming series of SoC's like MSPM0L, MSPM0C. Move the
flash address and size to soc level defconfig.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Update manifest to point MSPM0L series support.
Currently it only supports L2228's devicetree pin functions.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add overlays used for testing differential mode support in STM32 ADC
driver:
- Nucleo F303K8
- Nucleo H753ZI
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Differential mode support consists of:
- If differential mode is supported by the underlying hardware AND at
least one differential channel is enabled in the devicetree for this
ADC instance, then perform a differential mode calibration in addition
to the usual single ended calibration during initialisation.
- Set channels to the appropriate differential or single ended mode
during channel setup.
Currently the N6 series is not supported even though the underlying
hardware supports differential mode, due to complications in the
calibration procedure.
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Co-authored-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
TI MSPM0 timer module has capture block used to capture timings of input
signal. Add a support for TI MSPM0 PWM capture.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Add test case to cover RAM vector table relocation when
CONFIG_SRAM_VECTOR_TABLE is selected
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Use --test-pattern to filter scenarios using regular expressions, for
example:
./scripts/twister --test-pattern '^kernel.semaphore.*' -v
will run all those test using this identifier pattern, and nothing else.
Multiple patterns are possible.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Certain implementations require more stack to operate.
Increase the stack size to avoid overflows.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
A clone of the zms test, using the retention backend, with support
for nrf52840dk and qemu_cortex_m3
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Now when role is sink and source sends data, stream recv callback is
not registered, apps works fail. so stream recv callback should be
checked.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Configure the initial pin state of the SPIM peripheral to SLEEP, not
DEFAULT. This fixes the pins being configured in DEFAULT until the first
time the interface is used if `zephyr,pm-device-runtime-auto` is
enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
A kernel panic was observed on a platform when k_sem_give() was called
in npcx_kbd_ksi_isr(). From the panic information, it appears that
the semaphore was used before it was initialized. This commit prevents
the potential issue by enabling the interrupt only after
the input_kbd_matrix_common_init() function is called
(where the semaphore is initialized).
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Configure the initial pin state of the UARTE peripheral to SLEEP, not
left uninitialised. This fixes the pin configuration not being set until
the interface is used if `zephyr,pm-device-runtime-auto` is enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
If a compliance test itself throws an exception, the entire script is
aborted.
Update this by capturing the exception and failing only the test itself.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Initialize 'dl_file' to 'None' before the logic that determines
which binary file to load.
Resolves the E0606 Pylint warning.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
clang reports a warning about a label followed by a variable
declaration:
label followed by a declaration is a C23 extension
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fix one leftover unaligned access warning generated by clang:
warning: taking address of packed member 'th_seq' of class or
structure 'tcphdr' may result in an unaligned pointer value
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
RP2350 provides a function to get OTP-backed chip ID. Prefer using this
on supported platforms for these reasons:
- a secure internal identifier, same as read by picotool
- works on flashless boards
- does not conflict with code running in XIP mode (e.g. when the other
core tries to access device ID)
- when used with USB HWID serial number will match one BootROM has
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: Alexander Wachter <alexander@wachter.cloud>
Supports the EVL/Xenomai4 benchmarking tool as described in the
documentation. The benchmarking tool is accessed via the latmon service.
This code uses the J2 socket on FRDMk64-F:
PIN_20: tx pulse to SUT
PIN_18: rx ack from SUT
The client code running on the SUT shall monitor the falling edge of
PIN_20.
Example usage from the latmus client running Xenomai4:
$ latmus -I gpiochip2,23,falling-edge \
-O gpiochip2,21 -g"histogram" \
-z broadcast
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Updates the Xtensa hardware documentation to provide details about
the new lazy HiFi sharing model.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When lazy HiFi context switching is enabled, the system starts with
the HiFi coprocessor disabled. Should the thread use that coprocessor,
it will generate an exception which in turn will enable the coprocessor
and save/restore the HiFi registers as appropriate. When switching
to a new thread, the HiFi coprocessor is again disabled.
For simplicity, there are no restrictions as to which thread is allowed
to use the coprocessor.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The intent of arch_coprocessors_disable() is to replace
arch_float_disable() in halt_thread() for the FPU will not
always be the only coprocessor that will need to be disabled.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds a customized _cpu_arch structure for Xtensa so that it contains
a pointer to the thread that 'owns' the hifi register set for use
with lazy save/restore.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
As the BSA can not be used when lazy HiFi context switching is
used, a more permanent and predictable location in which to store
the registers is required. To this end ...
1. reserve some space in the arch-specific portion of the k_thread
structure for those registers.
2. clear that region when the thread is created.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Splits HiFi sharing into two different models.
1. XTENSA_EAGER_HIFI_SHARING - unconditional save/restore
of the HiFi registers when context switching
2. XTENSA_LAZY_HIFI_SHARING - on demand save/restore of
of the HiFi registers. If a thread does not use the
HiFi registers, they are neither saved nor restored.
To maintain backwards compatibility, the eager model is the
default model when XTENSA_HIFI_SHARING is enabled.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
- In bap_unicast_client, it was assumed that ASE is binded with CIS
handler during sending "received_stop_ready" to unicast_server.
- In case where unicast_client has not started the stream with
"receiver_start_ready" att command to server, but wants to disable
ASE which was Enabled previously (but not stream!) causes failure
since there is no cis_create has happened and linked to ASE.
- In BAP_TS, "BAP/UCL/SCC/BV-103-C" has a same test conditions where
client first enables the ASE, disable the ASE, and expecting
"receiver_stop_ready" att command from client to server followed by
server notification to enter its ASE in QoS_configured state.
- Removed this condition checks to send expected att command to
server from Enabling ASE state to Disable ASE.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
Systick is already enabled before late hook got called. In certain
circumstances systick could flooding the core and thus only handling
systicks. Enabling cache earlier using soc_early_init_hook ensures
that systick get handled quicker.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Make this option default and reduce amount of details displayed by
twister.
This options has been enabled in CI for a while now with the intention
of making it default.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Previously, the CMSDK APB dual timer driver hardcoded the counter
clock frequency to 24 MHz, which limits reuse across SoCs and
boards with different timer clock sources.
This patch replaces the hardcoded frequency with a value derived
from the device tree's `clocks` phandle, using the
`clock-frequency` property of the referenced clock controller node.
If the property is missing, it falls back to a default 24 MHz.
Signed-off-by: Lidor T <lidor@exibit-iot.com>
irq 0 in frdm_mcxa166/276 are reserved can not used for testing.
add a config to shift test irq, also add support for rt700
also fix irq1 issue on mimxrt1180 as it is a debug trace interrupt
fixes: #92877, #92521
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Macros MCO1_SEL, MCO1_PRE, MCO2_SEL, MCO2_PRE uses 4 bits wide masks as
defined in the RM0490 Rev 5 section 6.4.3, page 136
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Selecting the clock source for USB is only a bit value in the CCIPR2
register.
See RM0490 Rev 5 chapter 6.4.21 page 159.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
instead of depending on logging for exceptions and fatal messages, use
macro and dump exceptions if printk is enable with no logging.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
ARC was using this method already in a custom way and was different from
all other architectures, lets make this generic.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Just include <zephyr/arch/exception.h> in architecture code. The file
redirects to the correct implementation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On i.MX93, there are 2 Cortex-A55 cores, this patch is to
support SMP Zephyr running on all the 2 A55 cores.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
- enable/configure LC3 codec as default setting for BLE Audio based
samples to work on iMXRT based platform which supports FPU.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
Adds support for checking module samples and tests for additional
Kconfigs, as well as logging Kconfigs, so that this check can be
reused more easily with out of tree manifest repos
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Based on TCP Spec., if the incoming packet seqnum is old but with
new data (seqnum + len > conn->ack), that part of valid data should
be accepted. Now Zephyr doesn't support it.
This patch will add support to such scenario.
Signed-off-by: Shrek Wang <inet_eman@outlook.com>
Fix LLCP to use event_counter value used during prepare to
compare instant to be the value as when in prepare and not
incorrectly use a stale value (when two radio events
overlap).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The error path for an invalid destination address in virt_region_alloc()
frees the allocation using the originally requested 'size' instead of
the 'num_bits' that were actually allocated from the bitmap.
This leaks the virtual address space.
Pass 'num_bits' instead of 'size' to sys_bitarray_free() to ensure the
allocated region is correctly freed.
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
This commit adds test overlays for the siwx917_dk2605a board.
It also adds an overlay for the i2s sample.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Updates to use slot1 as the default upload location, also adds a
new sub-test which checks uploading goes to slot0 when running
from slot1
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue for MCUboot DFU whereby images would always be
uploaded to slot1 instead of slot0 meaning that updates would
never take effect, but retains uploading to slot1 if the
application is running from slot0
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Allow for users to define the sampling period via the sampleper
register on a per instance basis through device-tree properties.
The previous value was hard coded. The same value is now the default
value.
Signed-off-by: Mark Geiger <MarkGeiger@posteo.de>
In lis2dux12_freq_to_odr_val, the loop through the array of possible ODR
frequencies can break sooner than expected if power-mode is
set to High Performance mode and the requested ODR is less than or
equal to 25Hz.
Moreover, move the "odr |= 0x10" statement used for HP mode in the
chip_api set_odr_raw() API, so that we enter the HP mode even when the
ODR is set from DT only.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The 'beaglev_fire' board has its SRAM located at 0x1000000000, and this
causes Zephyr to default to the `large` code model.
This commit forces the board to use `medany` code model because the `large`
code model is not supported by GCC 12.2 included in the current Zephyr SDK
0.17.2.
Revert this when Zephyr SDK 0.18.0 with GCC 14.3 is mainlined.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces a new Kconfig choice for configuring the code model
used for compilation.
All three code models specified by the RISC-V ELF psABI specification are
supported: medlow, medany and large.
For RV32, the `medlow` code model is always selected.
For RV64, the `large` code model is selected if the SRAM or kernel VM base
address is greater than or equal to 4 GiB; otherwise, the `medany` code
model is selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces the support for the standard Zicntr extension, which
provides hardware counters.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Avoid possible null pointer dereference by moving 'vocs->conn = conn'
after null check on 'vocs' in bt_vocs_discover().
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Move 'printk' call after null checks on 'stream' and 'stream->ep' to avoid
potential null pointer dereference.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
mock has been available in Python standard lib since Python 3.3, remove
the unnecessary dependency to `mock` pip package.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Somehow this file had no exclude rules in .ruff-excludes.toml. Make it
compliant going forward.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
progress has been unmaintained for years and tqdm is a more
modern and faster alternative, which is already used by other commands.
Replace progress by tqdm in the canopen_program.py script.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
m33 must ensure the TCM is ECC clean by initializing all dtcm memories
Otherwise, it can only run it by loading m33 under uboot.
Based on this fixed, we can run M33 by mkimage into flash.bin.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This change introduces GPIO_RX_PORT_IRQ_DECL() and GPIO_RX_PORT_IRQ_ELEM()
macros to conditionally generate GPIO port IRQ declarations and elements
only when the 'port_irq_names' property exists in the device tree node.
This improves code clarity and avoids generating unused code for ports
that do not have IRQ support for Renesas RX
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
We want to simplify the maintenance burden and confusion of having
more than one driver for the same kernel timer peripheral used on
all Microchip MEC parts. The XEC version of the driver was converted
register definitions in the driver. Register access is performed using
Zephyr sys_read/write architecture specific inline routines. Driver DT
YAML was updated to use phandle for the 32-bit basic timer used for
ARCH_HAS_CUSTOM_BUSY_WAIT support, basic timer max value property,
and GIRQ interrtup aggregator hardware information.
SoC part Kconfigs, chip level/board level DTSI updated to use the
unified driver.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
This driver supports multi-color LEDs built with several monochromatic
LEDs. ->set_color is the only LED driver API method implemented.
Instead of calling led_set_brightness() for each monochromatic LED,
led_set_color() can be called on the leds-group-multicolor device to
set all colors at once.
See the leds-group-multicolor DT binding for details.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The leds-group-multicolor binding allows to combines several
monochromatic LEDs into one multi-color LED.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch moves the label and color-mapping LED property definitions
from led-controller.yaml into led-node.yaml.
This allows to use these properties from a LED node which is not a
child node of a LED controller. This is preparatory work for adding
the leds-group-multicolor binding.
In addition this patch also removes the redundant "label" property
definitions in gpio-leds.yaml and pwm-leds.yaml. It is now included
from led-node.yaml.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
For all LED drivers, the underlying subsystem is automatically selected
in Kconfig if their compatible node is found in DT.
The only exception is the PWM LED driver which depends on PWM instead
of selecting it. The PWM Kconfig option must be explicitely selected in
order to have LED_PWM enabled.
This patch updates the Kconfig of the PWM LED driver to have the same
behavior as other LED drivers: PWM is now automatically selected if a
"pwm-leds" compatible node is found in DT.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Modified the XSDB configuration to take the PDI path directly from the
runner script's arguments rather than relying on an environment variable.
This change improves usability and makes the runner more self-contained.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
This update enhances the runner script to optionally accept bl31, pdi,
and system.dtb as arguments. These inputs are not mandatory and will
only be used if explicitly provided. This allows for more flexible boot
configurations, especially useful when testing different firmware and
system setups without modifying the script.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
PIO interrupts are useful for some of the virtual
peripherals, so describe them in the DT.
This has no direct implications to existing drivers.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Add support to generate the random MAC if 'zephyr,random-mac-address'
is set,uses 'local-mac-address' from DT if available, or falls back
to a default Xilinx OUI-based MAC with zeroed bytes
Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
The alignment value tells the amount of alignment of buffer length
when allocating net_buf data for sending. By default there is no
special alignment. This is needed for example with Nordic Wi-Fi
chip that uses SPI driver that expects 4 byte alignment for the
length of the data that is being sent.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that net_buf pools created by NET_BUF_POOL_VAR_ALIGN_DEFINE
are aligned according to user needs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add a new macro NET_BUF_POOL_VAR_ALIGN_DEFINE() which can be
used to create a pool with aligned data where both the start
of the data and the length of the data is aligned.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Adding initial support for NXP FRDM K32L2B3 board.
Signed-off-by: Ishraq Ibne Ashraf <ishraq.i.ashraf@gmail.com>
dts: arm: nxp: Fix SRAM node name
Fix address part of the SRAM node name.
Change the SRAM start address definition to lower
case hexadecimal to be consistent.
Signed-off-by: Ishraq Ibne Ashraf <ishraq.i.ashraf@gmail.com>
Automatically hide the nRF7x interface from the connection manager if
the TX path is disabled (scan only mode). This prevents function calls
like `conn_mgr_all_if_up(true)` from bringing up the interface which
can never result in a connection.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Make the interface interface state array static, ensuring that the array
is zeroed at boot. This enables interfaces which initialise earlier than
the CONN_MGR module to set flags in their init functions.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Instead if littering ifdef's across the code, use a single API and
initialize different pools only once.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
junitparser had a bug causing a traceback when running the checkpatch
check compliance module, fix is in 4.0.1 of junitparser from this PR:
https://github.com/weiwei/junitparser/pull/168
Update requirements to make sure we get this version.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The git diff subprocess was leaking, ie.,
it was still running with it's file streams open,
and python was printing warnings about this. Fix by calling
communicate() on the object which will do the cleanup.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Take advantage of the new 'filename' and 'lineno' attributes of Node and
Property objects to provide more informative error and status messages
by printing the actual source file reference of the corresponding
object, always using the unquoted file:line format in error messages.
No functional change is introduced by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit adds the support for the following new Zc* series compressed
instruction extensions:
Zca - Subset of the C extension without FP loads and stores
Zcb - "Simple" instructions
Zcd - Double-precision floating-point instructions
Zcf - Single-precision floating-point instructions
Zcmp - "Complex" instructions for embedded CPUs
Zcmt - Table jump instructions for embedded CPUs
With the introduction of the Zc* extensions, the C extension now implies
the following Zc* extensions:
* Zca, always
* Zcf if F is specified (RV32 only)
* Zcd if D is specified
The Zc* extensions that are implied by the C extension are not specified in
the GCC `-march` flag because they are redundant and can interfere with the
resolution of the correct multi-lib for the selected architecture unless
the the alternate mappings for the redundant forms are manually specified.
All the implementation details in this commit are based on the Zc* v1.0.0
specification, which is the ratified version.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Add support for CONFIG_ROM_START_OFFSET on ARC processors. Note that the
arc ISA requires vector table offset to be at a 1024 KiB boundary, so
the default ROM_START_OFFSET when using MCUBoot must be increased.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Add CONFIG_ARCH_SUPPORTS_ROM_OFFSET, a convenience Kconfig to indicate
that CONFIG_ROM_START_OFFSET is supported on this architecture
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Restructured counter and timer.
CTimer/Timer is now parent to pwm and counter.
Created PWM driver and tied to pwm and pwm-led
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
This moves the couple functions that are and will be all over
the various clock operations for all platforms.
Signed-off-by: Camille BAUD <mail@massdriver.space>
All parts in the Microchip MEC family support ARM JTAG/SWD/SWO.
We add Kconfig logic to allow building projects with Segger's
RTT debug for Cortex-M.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Add support for using the SMARTDMA engine on the FRDM-MCXN236 board with
the video capture sample.
Replace console pins, because default console pins(P1_8, P1_9) are
duplicated with camera header pins.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Support smartdma and flexcomm0 for NXP frdm_mcxn236 board.
The default console pins are duplicated with camera header pins, so
add flexcomm0_lpuart0 for smartdma_camera serial output.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Remove redundant or commented-out Kconfig, and only enable the baseline
features compatible with most AE350 platforms.
Platform-specific extensions and features should be enabled by menuconfig.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
adp_xc7k/ae350/clic uses a different interrupt controller than
adp_xc7k/ae350, add overlay files as in adp_xc7k/ae350.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
adp_xc7k/ae350/clic uses a different interrupt controller than
adp_xc7k/ae350, add overlay files as in adp_xc7k/ae350.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
RISC-V CLIC can trigger edge-triggered interrupts by software, but the
available IRQ sources depend on the hardware implementation.
Clarifies the IRQ source for GD32VF103 and adds support for AE350 CLIC.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
For RISC-V CLIC, only edge-triggered interrupts can be triggered by
software. Add IRQ flag to set the trigger type for RISC-V CLIC.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Add ae350/clic soc, which shares the same peripherials as AE350 PLIC
platform but uses CLIC instead of PLIC, with different IRQ number.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Change "Renaming output directory to" message to "Renaming previous
output directory to" to make it clearer that twister is renaming the
existing directory, not the current output directory.
This helps avoid confusion for new twister users who might think the
current output is going to the renamed directory.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Previously LVGL added its own version of several stdlib functions. Replace
them with the Zephyr provided functions instead.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Handle `SENSOR_CHAN_ALL` case of the sample_fetch callback of the
lis2dw12 driver. Without this, `sensor_sample_fetch()` does not work
correctly for this device, e.g. rendering the rtio and the sensor shell
unusable.
Signed-off-by: Ruben Völl <ruben.voell@sevenlab.de>
Fix a potential NULL pointer dereference for skip_fields in the function
ull_adv_sync_copy_pdu_header. This issue been reported by Coverity.
Coverity CID: 392529
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Add flash partition description in nucleo_u575zi_q board DTS
file to ease integration of MCUBoot as bootloader stage.
Signed-off-by: Andreas Karner <andreas.karner@sloc.one>
Add a workqueue to handle readvertisement after
disconnection from central. This avoids performing
advertising operations directly from the disconnected callback,
ensuring better thread safety.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Avoid busy-looping before BLE connection and introduce
a semaphore. Check for NULL conn before retaking
semaphore after disconnection.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Several tests failed due to a low clock frequency for
the RNG peripheral.
Increase the RNG clock frequency by providing MSIK with
96 MHz as the domain source.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
There's no need for debug options to be enabled by default in tests, it
just bloats the image.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Moved pinctrl dtsi files for slwrb4250b and slwrb4255a from the soc
directory to the board directory as is done in other boards.
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Introduce subdirectory for xg1 socs.
As a porduct of this - `efm32_pg_1b.dtsi` and `efr32fg1p.dtsi` were
merged into `xg1.dtsi`.
Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
Rpu recovey debug stats are stored in hal_dev_ctx which is not
persistent in case of interface is brought down/up. Need to add
in nrf_wifi_ctx_zep and update before interface goes down.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
When the external AP is in WPA3 SAE mode, the group cipher uses
TKIP and the pairwise cipher uses TKIP and CCMP. Should not
connect to the AP.
For WPA2 & WPA3 SAE & WPA2/WPA3 mixed mode, set group cipher to
CCMP, pairwise cipher to CCMP.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
The MAX17055 peripheral allows measuring the current
value (which corresponds to the instantaneous value). Respond to
the `SENSOR_CHAN_CURRENT` command, and retrieve the data
from the `0x0a` device register.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
There is a special internal understanding between `z_alloc_helper()`
and `sys_heap_aligned_alloc()` for the meaning of non-power-of-two
alignment values. There was a time when `z_alloc_helper()` was expressed
in terms of `k_heap_aligned_alloc()` so the later had to accept special
alignment values from the former. This is no longer the case and
`k_heap_aligned_alloc()` should enforce proper alignment values now.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
In order to allow decoupling these two operations.
No functional changes, sensor returns same readings through shell.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As this isn't effectively providing any value to the driver, instead
wastes cycles on every sample-fetch. Scrubbing this simplifies the
code.
Also, remove fix_sign() and replace it for the in-tree helper
sign_extend().
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Use --platform-pattern <regex> to match platforms, something like
twister -T samples/hello_world/ --platform-pattern ".*/stm32f4.*"
will build/run all those platform targets with stm32f4 in them.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some modems (e.g. Quectel BG95/EG25-G, several SIMCom parts) print
“APP RDY” when the application core is ready. Parse this line and
proceed from AWAIT_POWER_ON immediately, while keeping the existing
startup timeout as a fall-back.
* add MODEM_CELLULAR_EVENT_MODEM_READY + chat match
* open UART and attach chat in AWAIT_POWER_ON
* jump to SET_BAUDRATE / RUN_INIT_SCRIPT on event
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Following changes to arch/arm/core/cortex_m/fpu.c,
the dependency on CONFIG_FPU_SHARING is moved into this file.
Signed-off-by: Michele Sardo <michele.sardo@st.com>
z_arm_save_fp_context and z_arm_restore_fp_context
save and restore fpu context regardless of the
CONFIG_FPU_SHARING setting.
This modification is required to support suspend to ram use cases
where save and restore of FPU state is needed to ensure proper bahaviour
after wakeup.
Signed-off-by: Michele Sardo <michele.sardo@st.com>
None of the drivers seem to return the number of bytes, they all return
0 for success, so, fix the docs.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add optional autostarts boolean to the quectel,bg95 binding and make
MODEM_CELLULAR_DEFINE_INSTANCE() use it through DT_PROP_OR().
Boards that carry a BG95-M3 Mini-PCIe card—or any other variant that
boots at VCC can now declare the property and skip the PWRKEY pulse,
while existing designs continue to behave unchanged.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Quectel BG9x returns only the base model string to AT+CGMR, while
AT+QGMR provides the true firmware build ID, e.g.
AT+CGMR → BG95M3LAR02A03
AT+QGMR → BG95M3LAR02A03_01.204.01.204
Replace CGMR with QGMR in the BG95 init script so that
cellular_get_modem_info(... FW_VERSION ...) reports the complete
version string.
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Add quectel_bg95_shutdown_chat_script that issues AT+QPOWD=1 and
link it to MODEM_CELLULAR_DEVICE_QUECTEL_BG95 to enable a clean
software-initiated power-off path
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Some toolchains may define CLOCK_REALTIME and
CLOCK_MONOTONIC in their libc headers
with values that differ from Zephyr's internal
SYS_CLOCK_REALTIME and SYS_CLOCK_MONOTONIC.
To ensure consistent behavior across all boards and
toolchains, Introduce a helper function to map
CLOCK_REALTIME and CLOCK_MONOTONIC to Zephyr's internal
clock IDs (SYS_CLOCK_REALTIME and SYS_CLOCK_MONOTONIC).
This prevents mismatched clock IDs being passed to
the kernel, avoiding invalid clockid errors when using
functions like clock_gettime().
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
This commit adds support for configuring two user-defined target
addresses in the I2C target driver.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
- Add sdif node to nxp_lpc55s2x_common.dtsi
- Add sdif pinmux configuration to LPCXpresso55S28 board
- Enable sdif and sdmmc disk on LPCXpresso55S28 board, providing SD card
storage capabilities.
Signed-off-by: David Christian Katheder <david.katheder@rohde-schwarz.com>
Not sure why this vestigal struct member was here at this point (18
months ago...) but its unused and was causing problems for certain
parts.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
GAIN field is not present on LV10A, so instead we need to
check the input value to the function.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
The nrf-802154 driver may be unable to acquire a valid timestamp under
rare conditions. In such case, the nrf_802154_received_timestamp_raw
reports time=NRF_802154_NO_TIMESTAMP.
The shim implementation must not calculate the PHR timestamp when
receiving this value, because doing so results in an assert in
ptp_packet.h due to a negative time value.
When the driver is unable to capture the timestamp, the packet is
assigned zero as its timestamp.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
It was observed that device ceases to work in Buffer DMA mode after GET
DEVICE QUALIFIER request is STALLed (when USB stack is limited to
Full-Speed only operation). The issue is due to missing dout feed.
Clear pending dout feed flag after bus reset (enumeration done) and
after stalled control read transfer to allow dout to be feed when
necessary.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The can_nrf device driver incorrectly passes its own device
driver pointer to a call to clock_control_get_rate() to get the
rate of the auxpll. The actual device driver which should be passed
to clock_control_get_rate() is the auxpll.
Without this fix, the call jumps to the can_nrf_api and returns
garbage (unfortunately it does not hardfault, which is why this
issue has not been discovered yet).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
K_TICKS_FOREVER is defined as -1. Guard logic has been added for the case
when `ticks - exit_latency_ticks == -1` to prevent sys_clock_set_timeout()
from incorrectly setting a forever timeout.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
In order to abstract details of the transport itself, improving
portability.
No functional changes at this point. Driver works the same as far
as my local testing goes.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The existing driver requires setting multiple attributes in order to
work basic fetch/get reads. Simplify this by allowing the user to set
dts node properties based on the use-case.
As a result, basic settings results in the driver being up and running
from the start, one can just get sensor readings out of the box.
These still can be overriden at run-time if need be.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The implementation used BT_L2CAP_ECRED_MIN_MTU to check the lower limits
of both MTU and MPS, instead of BT_L2CAP_ECRED_MIN_MPS for MPS. While
these are the same here, confusion may arise. This commit fixes the
confusion.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Fixing a couple cases of a programming error where a file is not closed
in case of an exception, which was causing resource leak warnings in
some cases when encountering a kconfig error.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Turn MCX series into families.
Reasoning:
1. The MCX SOCs are quite different from each other and having them all
under one family in the HWMv2 hierarchy is fruitless because there
are so many differences that it is confusing to try to introduce
family-level code and configs since they would each only apply to a
subset of the series. There is almost nothing that can be shared
between all of them. Which is why there are comments in the MCX
family files saying not to put anything in them. This is a technical
waste.
2. Therefore, turning all of them into families is almost 0 effort and
makes sense. It will allow these different types of MCX to be
further subdivided into series in the future as the MCX portfolio
expands and such division will be necessary as new SOCs within each
letter family are released.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There are cases, for example when peer is requesting two DNS
addresses, but we can only give one, we should reject the secondary
DNS request first, before sending NAK to acceptable options.
Option parser can reject a parameter by returning -ENOTSUP and when
it wants to NAK the parameter, it returns -EINVAL.
On RFC 1661:
Configure-Reject
If some Configuration Options received in a Configure-Request are
not recognizable or are not acceptable for negotiation (as
configured by a network administrator), then the implementation
MUST transmit a Configure-Reject.
Configure-Nak
If every instance of the received Configuration Options is
recognizable, but some values are not acceptable, then the
implementation MUST transmit a Configure-Nak.
So as stated by RFC, we should start the negotiation by rejecting all
parameters that we cannot configure. I added an example of rejecting
DNS requests, if we don't have those.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When Kconfig option CONFIG_NET_L2_PPP_OPTION_DNS_USE is enabled,
Zephyr should request two DNS addresses in IPCP negotiation by sending
IPCP ConfReq for DNS otions using 0.0.0.0 as an address.
Remote peer may offer DNS by sending IPCP ConfNak with proper address.
This is explained in RFC 1332 and RFC 1877 (DNS extension).
When no DNS is required, we should only send IPCP ConfReq for IP
address, without having DNS fields in the same request.
However, when PPP is configured to serve a DNS using Kconfig option
CONFIG_NET_L2_PPP_OPTION_SERVE_DNS it should serve the DNS address in the
IPCP ConfNak message and from the ipcp.peer_options structure, not from
the ipcp.my_options.
This might break backward compatibility outside this repository
as DNS addresses used to be served from ipcp.my_options.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Some APIs taken in_addr/in6_addr pointer w/o const qualifier, while they
do not actually intend to modify the provided address. This commit
adds the missing const qualifier where applicable.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Allow passing characters to strip for zephyr-keep-sorted. This can be
useful for optional double quotes in yaml maps.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Ensure uart_configure() only updates UART parameters without
reassigning pin configuration. Pin assignment via pinctrl is now
restricted to the initialization procedure, guaranteeing pins are
set only when properly configured.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
There was an observed situation where the assert checking frame length
is below 128 bytes was hit. While the nrf-802154 checks that the frame
does not exceed that size, there might exists code paths that allow such
packets to pass through.
The change removes the assert and drops the packet instead.
An error is also printed to allow for further debugging.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Remove mentions of st_counter_value which has been renamed to st_timeout.
Rework slightly the sample behavior to better demonstrate the interest
of st,timeout which allows to define an timeout matching exactly the
application needs.
Reword the various comments to make it hopefully clearer to the reader.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
To be consistent with the definition of label stm32_lp_tick_source,
be sure "st,timeout" is taken from the LPTIM defined as lp_tick_source.
Then, fix the computation of lptim_time_base.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Fix the non-IRAM interrupt disable routine to use non_iram_int_mask[cpu]
directly instead of its bitwise inverse. The previous implementation used
the wrong mask and could affect unrelated interrupts. This change ensures
that only intended non-IRAM interrupts are disabled and restored.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix bitwise operation when freeing an interrupt to correctly clear the
VECDESC_FL_NONSHARED, VECDESC_FL_RESERVED, and VECDESC_FL_SHARED flags.
Also reset the interrupt source to ETS_INTERNAL_UNUSED_INTR_SOURCE to
ensure proper cleanup and prevent issues with future allocations.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replace global lock variable with function-local storage for irq_lock()
state. This fixes a race condition when multiple access enter or exit
the critical section at the same time. Now each lock/unlock pair uses
its own key, making interrupt safe.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
disable debug in general as it is too verbose and hides test output.
However, this now fixes an issue in the test itself after 4.2 release.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
don't use global buffers for reg_read and reg_write,
so we only need to rely on the spi drivers lock and
don't have to use our lock.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The requested SPI clock rate and the actual rate that is set can be
different depending on the peripheral clock and divisors available to
the SPI peripheral. For some MAX32 SoCs, actual rate ended up being
higher than the devicetree setting. This would then cause latency tests
to fail as transfers finish earlier than minimum expected duration.
Update the test frequency values in several MAX32 board overlays to pass
latency tests.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
spi_configure was returning HAL error codes that are incompatible with
Zephyr error definitions straight back to the caller. Replace these with
error codes that Zephyr can correctly interpret.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Driver was not handling SPI word sizes other than 8 bits. Apply DFS
shift wherever necessary to support non 8-bit transfers.
DMA mode cannot support word sizes that are less than 8 bits so return
-ENOTSUP if word size less than 8-bits is required.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
In the BAP Broadcast Sink implementation the sync request,
the BIGInfo and the broadcast code can come in any other.
Currently the btp_bap_broadcast_sink_bis_sync would reject
the request if it came before the BIGInfo, but will now
instead store the request and then apply it once the BIGInfo
has been received, as there is not BIGInfo BTP event that the
caller can use.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Nicla Vision datasheet is referring to the 8-bit wire address (0x52) for
the VL53L1X sensor, so that's likely what ended up being used in the
board's devicetree. However, it's the 7-bit I2C address that should be
used so fix that by changing the I2C address to 0x29. Successfully
tested on actual hardware.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoids shadowing the outer 'err' variable by reusing it instead of
redeclaring a new one inside conditional blocks.
This improves clarity and prevents confusion during debugging.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add the service_area section to the list of sections for which objcopy
is executed. As this section was missing from the resulting data image,
it prevents targets (right now, the mimxrt685s/hifi4) from booting.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
1. enable sensor/nxp,lpcmp support
2. verified samples/sensor/mcux_lpcmp
3. update the mcux_lpcmp to support different port
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Reading back the raw interrupt status from the gpio controller, provides
the interrupt mask _without_ the controller's masking registers applied.
This means that e.g. a rising edge would trigger an interrupt even on
pins that are configured for falling edge only.
Fix this by reading the "enabled" interrupt status instead of the raw
one.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
The polarity mapping was swapped such that GPIO_INT_TRIG_LOW would
translate to high, and vice versa, on the chip configuration.
Swap the polarity to fix this.
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
This commit implements the gpio_get_config handle for the gpio_mspm0
driver.
NOTE: Currently only handles input/output state and not configured flags
Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
Prior to this commit, writing a gpio port would completely clear
the state of given port. This commit ensures that state is kept
when writing, reading and configuring gpio ports.
Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
Add a new flash for toggling runtime SFDP data fetching, and use static
devicetree properties by default. Clean up various minor items from review.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Properly configure the MAX32 SPIXF peripheral to use the SPIXF controller
for transparent memory mapped reads, and enable the SPIXF main controller
and use it for writes.
Add support for testing XIP support to the nocopy sample, which requires
flashing with OpenOCD with MAX32690 QSPI flash support.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Update common flash test and jesd216 samples to work on the
APARD32690-SL board which has MX25U6432FM2I02 on-board.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Xilinx Window Watchdog driver uses window watchdog mode. Window watchdog
timer(WWDT) contains closed(first) and open(second) window with 32bit
width each. Write to the watchdog timer within predefined window periods
of time. This means a period that is not too soon and a period that is
not too late. The WWDT has to be restarted within the open window time.
If the software tries to restart WWDT outside of open window time
period, it generates a SoC reset.
Signed-off-by: Harini T <harini.t@amd.com>
Xilinx Window Watchdog Timer IP uses window mode.
Window watchdog timer(WWDT) contains closed(first) and open(second)
window with 32 bit width each. Write to the watchdog timer within
predefined window periods of time. This means a period that is not too
soon and a period that is not too late.
The WWDT error interrupts (IRQs) occur when the watchdog timer is not
serviced within the predefined window periods. These IRQs are routed to
the Processing System Manager (PSM) error accumulator module. The PSM is
responsible for managing power and system-level errors, generating a
System on Chip (SoC) reset when a WWDT error occurs. The system reset
event is signaled as a system error for the PSM firmware to handle and a
reset output signal to the MIO/EMIO.
Signed-off-by: Harini T <harini.t@amd.com>
add bt_conn_br_switch_role and bt_conn_br_set_role_switchable to control
the role switch, add DEFAULT_ROLE_SWITCHABLE Kconfig to control the default
role switch state.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
rename gpio stepper to h bridge stepper
minor correction in stepper_stop, stepper_stop shall cancel all active
movements and should not be concerned about keeping the coils energized
or not, since that is a concern of a motion controller and not a stepper
driver.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Add and exchange global heap configuration CONFIG_HEAP_MEM_POOL_SIZE
against configuration used for auto heap calculation
CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS.
Add CONFIG_HEAP_MEM_POOL_ADD_SIZE_ZBUS as related configuration
Clarify that HEAP is used for zbus in a whole
Consistent naming 'Zbus'/'zbus' to 'ZBus'
Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
Zbus currently does only support default heap sizes.
The configuration option allows to decrease rom-footprint for embedded
applications. Adding the option to ZBus improves its flexibility and
while not increasing its complexity.
Add default of 0 value to compensate for previous cases where
HEAP_MEM_POOL_ADD_SIZE_ZBUS was defined as "".
Consistent naming 'Zbus'/'zbus' to 'ZBus'
Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
On it8xxx2, there are VW transmitted registers indicating that VW signal
has been transmitted to host. This patch checks the register to ensure
successful transmission of VW state change.
fixes: #89298
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Added driver and binding file for samd5x dac peripheral, the already
implemented dac_sam0.c lacks the configuration registers for this
microcontroller family and is fixed to only have one dac channel output,
also, the code gets too bulky when adding the samd5x dac configuration
using preprocessor directives that’s why I moved the implementation to its
own file.
Added dac to the supported list of same54_xpro.yaml, fixed Kconfig.samd5x
help spacing, added board defines to test_dac.c and test it out with
twister script on board.
Signed-off-by: Rafael Aldo Hernández Luna <aldo.hernandez@daikincomfort.com>
Adds sample showing i2c+gpio endpoint bindings in use.
Provides an overlay for the frdm-mcxn947 development board using JP8
pins for i2c and gpio connectivity.
The sample periodically sends a "ping" message to the bus controller and
prints out any messages it receives itself.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds a sample application that can act as the bus owner using
i2c+gpio mctp binding.
Provides an overlay for the frdm-mcxn947 using JP8 pins for i2c and
gpio.
It attempts to send a "ping" message to all endpoints while accepting
string messages from endpoints to print out.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds a I2C+GPIO Target device binding for MCTP communication over I2C.
The binding requires an i2c bus and gpio pin, along with a specified I2C
and endpoint address pair. These are then used to create an MCTP binding
which can be used to communicate in a peer to peer manner among other
MCTP endpoints.
Each message transmit signals to the bus controller using a GPIO logical
high and is unset on transmission completion. Pending transmitters are
queued using a semaphore avoiding memcpy being needed to asynchronously
transmit mctp pktbufs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds a custom MCTP binding for an I2C bus controller using GPIO signaling
for write requests rather than mode switching.
This binding operates a lot like the I3C binding specification DMTF has
for MCTP. The controller expects to receive interrupts (from GPIO pins)
and upon getting an interrupt read a message from the I2C target device.
The macro does a lot of the heavy lifting to setup all the state needed
for capturing GPIOs, being able to do asynchronous reads/writes, and
such. The entire controller works using state machines driven by
interrupts leading to low latency and clear ram costs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Unfortunately libc malloc/free are wrapped with a sys_mutex which is
troublesome for mctp as we likely want to allocate from interrupts in many
cases.
Supply mctp with a dedicated heap initialized and assigned at boot
saving applications a step. The default size is quite small and works
well so long as messages are small.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Driver simply registered itself without setting the level based on the
I2C Kconfig which wasn't quite right, need the log level set based on
the Kconfig for I2C.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
IUT works as a l2cap server with basic mode. The peer device,
l2cap client with basic mode, is a PC with running `bumble` on it.
This test only performs the function of L2CAP basic mode.
Support multiple l2cap enerties in new shell l2cap_br,
which may support more test function.
In the test suite , there are two groups in test cases.
Group 1 Including case1-case8 focuses on connection and
disconnection around l2cap. The impact of active and passive
acl connectivity, disconnectivity and authentication as well as
disconnection from ACL without l2cap disconnect is tested.
Group2 Including case9-case14 revolves around the basic
parameters of L2CAPserver configuration, data transfer.
Case 9: Test l2cap connection with max MTU(0xffff).But the max mtu
which the stack supports is (CONFIG_BT_BUF_ACL_RX_SIZE - 4U = 196).
Case 10: Test l2cap connection with min MTU(0x30),set server mtu = 48,
client mtu = 0xffff, l2cap connect successfully,
client mtu = 0xffff, server mtu = 48.
Case 11: Test l2cap connection with min MTU(0x30),set server mtu < 48,
client mtu = 0xffff, l2cap connect fail.
Case 12: Test l2cap connection with min MTU(0x30),set server mtu = 48,
client mtu<48,l2cap connect successfully,
client mtu=48,server mtu=48.
Case 13: Test l2cap connection with invaild PSM.
Case 14: Test l2cap multi_channel connection and data tranfer.
Case 15: Stress Test. Repeat l2cap connect, disconnect operation.
Case 16: Stress Test. Repeat data transfer in a single connection.
In Case 15 and 16, if enlarging STRESS_TEST_MAX_COUNT and test fail,
you can enlarge timeout in testcase.yml.
test_l2cap_server.py is a file containing real test cases.
test_l2cap_common.py is a common file. It encapsulates some
test function functions that are commonly used for test cases.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Now in other mode rather than basic mode, configuration parameters
include MTU, Flush Time and QoS have been checked.
But in basic mode, they also need to be checked, so the code about this
should not be controlled by macro CONFIG_BT_L2CAP_RET_FC.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Reverts commit 5700ffe9ad.
Not required anymore as the CONFIG_BOOT_MAX_IMG_SECTORS
is fixed by the mcuboot at 4096.
Add the corresponding overlay file.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Run the sample to execute in place on the external flash of the
stm32h573 disco kit.
with_boot is build and linked for the external flash.
Download the mcuboot zephyr.bin in internal memory.
Download the with_mcuboot zephyr.signed.bin in external memory.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the XSPI 2 which is an octoSPI connection to a octo NOR flash
mx25lm51245 on the stm32h573i_dk disco kit.
Define the partition on the 64MBytes space of the external flash.
Use the STM32Cube programmer to flash with the corresponding
external loader for XiP mode.
Removing usb_device will avoid test feature for that board.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The flash_stm32_xspi driver should not initialize the xspi,
if this one is being use to execute in Place : the init is skipped.
This mode is identified with the CONFIG_STM32_APP_IN_EXT_FLASH.
Checking the memory mapped mode bit is possible when the xspi
peripheral clock is not off (stm32h5 has no clock_control_get_status API)
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Do not disable the PLL clock if it sources the XSPI and if the external
flash is executing in Place. After mcuboot reset, the code is executed
on the external flash, through the xspi.
The CONFIG_STM32_APP_IN_EXT_FLASH is set and will avoid re-config
of the PLL which is sourcing the XSPI peripheral. When eXecuting in Place
on this external NOR, it must not disable its own clock source (PLL).
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add a STM32_APP_IN_EXT_FLASH to determine that an application
is eXecuting in Place on an external xspi flash.
That will control the clock init of this external xspi controller.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch adds the initial support for the OMAP Multi-Channel SPI. Some
things should be noted however:
- DMA xfers are not supported yet. Only PIO is supported as of now.
- Multi-Channel controller is not supported yet. Only single-channel
controller mode is supported, this means that the controller can xfer
messages with one slave at a time.
Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Added bt_le_set_default_phy in hci. This handles
the HCI_LE_Set_Default_PHY HCI command.
Added call to bt_conn_le_set_default_phy in central_gatt_write and
peripheral_gatt_write samples.
Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
Add settings_its backend in order for a non-secure
Bluetooth application to be able to save Bluetooth
settings to persistent storage.
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
This commit adds automatic type detection for the dev-id argument and
introduces a device-type option to explicitly tell Silabs Commander how
to handle the dev-id argument. It enables hostname usage for flashing
devices.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit adds automatic type detection for the dev-id argument and
introduces a device-type option to explicitly tell JLink how to handle
the dev-id argument. It enables hostname usage for flashing and
debugging.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Added configurable support for L1 cache region operations,
which offers improved performance over line operations.
Added configurable support for SLC (system level cache).
Added support for entire cache operations: flush_all,
invd_all, flush_and_invd_all.
Reviewed-by: Aaron Komisar <aaron.komisar@tandemg.com>
Signed-off-by: Yanir Levin <ylevin@gsitechnology.com>
- Add a new callback to support the situation when a unit info command is
received, and add an API to respond to the unit info command.
Signed-off-by: Make Shi <make.shi@nxp.com>
- Only AVRCP connect and disconnect api for AVRCP common functions.
- Added _ct prefixes to all CT callback functions and feature APIs.
- Updated shell demo code for AVRCP API changes.
Signed-off-by: Make Shi <make.shi@nxp.com>
This target can also run this tests, we just overlays including
the ones for the real boards.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
So we can enable features for both the real and simulated
targets based on these same options.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These tests run fine in this board, let's provide an
overlay and enable them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In preparation for simulated nRF54LM20 targets, let's add kconfig
options aking to the ones we have for the nRF54L15 devices.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This option was introduced together with native_sim in 3.5 to ease
the transition from native_posix, and was deprecated in 4.1.
Let's remove it now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This mode of building has been removed, so we do not need to support it
in the top level cmake file either.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
After removing NATIVE_APPLICATION, only NATIVE_LIBRARY is
possible with NATIVE_BUILD.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
After removing NATIVE_APPLICATION, only NATIVE_LIBRARY is
possible with SOC_POSIX.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
After removing NATIVE_APPLICATION, only NATIVE_LIBRARY is
possible with ARCH_POSIX.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this component.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As we do not include any support in tree for this mode, we do not need
to warn in the documentation that it does not apply to it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support building the constructors and initialization arrarys
in a way that support it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
CONFIG_NATIVE_APPLICATION, which represents the way in which
native_posix and its kin were built, was deprecated in 4.1 after the
introduction of native_sim and CONFIG_NATIVE_LIBRARY.
We remove support for it now for 4.3.
Let's remove the architecture layer adaptation code and cmake support.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so this filter
is not needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so this filter
is not needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This ifdef was changed to use another kconfig option, but
the comment in the endif was forgotten, let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
CONFIG_NATIVE_APPLICATION, which represents the way in which
native_posix and its kin were built, was deprecated in 4.1 after the
introduction of native_sim and CONFIG_NATIVE_LIBRARY.
We remove support for it now for 4.3.
Let's remove the kconfig option and all dependencies in the kconfig
tree.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
16647 changed files with 634512 additions and 180220 deletions
and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on [Discord](https://chat.zephyrproject.org/)
and ask your question there. Additionally, you can [escalate the review](https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-review-escalation)
and ask your question there. Additionally, you can [escalate the review](https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-technical-escalation)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.