Preserve EXCCAUSE and EXCVADDR values on entry to _Level1Vector.
Restore EXCCAUSE when exiting TLB miss exception handling in the double
exception handler.
During first-level exception handling, a LoadStoreTLBMissException may
occur during the initial register dump to BSA. It modifies EXCCAUSE and
EXCVADDR registers before they are saved in BSA. Therefore, these values
must be captured as early as possible.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Remove saving EXCCAUSE register in BSA through the _Level1Vector handler.
These value are later overwritten by the ODD_REG_SAVE macro called by
EXCINT_HANDLER, so saving it here is pointless.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The negative flash write and fill tests assumed that unaligned
offsets are always invalid.
This is not true for flash drivers reporting a write_block_size of
1, where all offsets and sizes are naturally aligned.
Condition the unaligned offset and size tests on the actual
write_block_size reported by the driver to avoid false failures and
ensure the tests follow the flash API contract.
No functional change for drivers with write_block_size > 1.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Currently the PHY for 2.5G SGMII is not enabled, so could only use 100M
PHY for two switch ports on the board.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Changes CONFIG_MCUMGR_TRANSPORT_UART from selecting
CONFIG_UART_MCUMGR to instead of depending upon it, as it should
never have selected a driver Kconfig and instead always depended
upon it, and is needed for supporting different UART transports
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Document the board rename from ek_ra8t2/r7ka8t2lfecac/cm85 to
ek_ra8t2/r7ka8t2lflcac/cm85 in the Zephyr v4.4.0 migration guide.
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Sometimes, the size of a message coming from a target is not known in
advance. In those cases, we must rely on the T-bit to get the end of
message, which is signaled as the `COMPLETE` bit of `MSTATUS`.
This patch verifies the COMPLETE bit before starting to wait for data,
and if set, simply returns what was read so far.
As a bonus, this simplifies the handling of IBI bytes: no need to rely
on timeouts, if it's reading from IBI, etc.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Return value for `mcux_i3c_do_one_xfer` was being lost due reuse
of `ret` variable. Use another variable for timeout check.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
The previous implementation incorrectly calculated the source pointer
advancement when pitch differs from width. The calculation was using
`total_bytes_sent` which accumulated across iterations, leading to
incorrect pointer arithmetic.
Replace `total_bytes_sent` with `line_each_sent` to track lines written
per iteration. Simplify the pointer advancement by:
- Calculating complete lines written from bytes_written
- Advancing by full pitch-sized lines
- Adding any remaining partial line bytes
This fixes the source pointer calculation when the buffer pitch is
greater than the display width.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
In commit 1f9e39752a ("drivers: watchdog: wdog32: add delay before
init") a reference to k_msleep was added to
drivers/watchdog/wdt_mcux_wdog32.c without including the necessary
header. At least for the board frdm_mcxw71/mcxw716c, this causes a
compile failure in this file as soon as CONFIG_WATCHDOG is enabled.
Add the missing include to zephyr/kernel.h to fix the issue.
Signed-off-by: Matthias Blankertz <matthias.blankertz@inovex.de>
The I2C bus of the lpi2c1 I2C controller is connected to the Arduino
Shield header on the usual pins. Label it with "arduino_i2c" in the
board device tree so that the frdm_mcxw71 board can be used with I2C
shields.
Signed-off-by: Matthias Blankertz <matthias.blankertz@inovex.de>
Remove oob-gpios property from nxp_m2_1xk_wifi_bt.overlay. There is no
binding for this property at bindings\wifi\nxp,wifi.yaml. Therefore,
builds using this shield will fail.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Add board-specific configuration and overlay files for
running DAC API tests on the SAM E54 Xplained Pro board.
- Add sam_e54_xpro.conf
- Add sam_e54_xpro.overlay
- Update DAC API test to support the board
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
Add DAC pinctrl definitions and update the board metadata
to list DAC as a supported feature on the SAM E54 Xplained Pro board.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Due to the hardware limitation, the time between the CPU wake-up IRQ fire
(IRQ 23) and the next call of LL_RADIO_TIMER_SetCPUWakeupTime should not
be less than 16 MTU (Machine Time Unit), i.e. approximately 30us.
otherwise, the next CPU wake-up doesn't happen unless the timer wraps.
Lock IRQs while sys_clock_set_timeout is being executed.
Remove HAL_RADIO_TIMER_WakeUpCallback and it will be implemented
differently in the future.
Remove HAL_RADIO_TIMER_TimeoutCallback as it is not needed anymore.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Change the initialization priority. According to the documentation, kernel
services should not be used during device configuration with PRE_KERNEL_1.
In "entropy_stm32_rng_init", there is "start_pool_filling" which calls
"k_work_schedule". Moreover, "k_work_schedule" requires system timer which
is initialized within PRE_KERNEL_2. Therefore, the SoC gets stuck.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Enable automatic runtime power management for all LPI2C instances
to support interrupt-driven when suspend and resume device
by scmi firmware interface.
On i.MX943 with System Manager firmware, clock operations require
SCMI communication which needs interrupts. The system-managed PM
approach locks interrupts during device suspend/resume, preventing
SCMI from completing.
Although lpi2c mcux driver have enabled pm runtime in driver init,
set lpi2c auto runtime in dts to record this issue that only
device runtime can be supported now.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add PM device support for the LPI2C peripheral.
Implement PM device callback to gate and ungate the device clock
during suspend and resume. No attach register save and restore as
it's preserved by hardware
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
The condition `!spi_context_rx_buf_on(ctx) && spi_context_rx_on(ctx)`
only returns early when RX is active with a NOP buffer.
However, when `rx_len == 0`, `spi_context_rx_on(ctx)` returns false,
causing the early return to be skipped.
This leaves `ctx->rx_buf` (which can be NULL) to be dereferenced.
Since `lpspi_handle_rx_irq()` already guarantees `spi_context_rx_on(ctx)`
is true before calling this function, only check
`!spi_context_rx_buf_on(ctx)` to safely handle NOP buffers.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor `lpspi_rx_buf_write_words()` to compute `words_read` upfront
using `MIN(rx_len, max_read)`, simplifying control flow and making
the read limit explicit without changing behavior.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Tested with the commands mentioned in index.rst
Product photo from https://docs.longan-labs.cc/1030018/
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Allows a mixture of IRQ-enabled and IRQ-disabled nodes.
Enabled nodes are identified by the presence or absence of
the interrupt-names property.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add explicit clock configuration and enable calls during driver
initialization.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add clock_control_configure() call during initialization to properly
configure the TPM clock. The driver now attempts to configure the
clock and handles cases where configuration is not supported by the
platform (-ENOTSUP/-ENOSYS) by continuing with default settings.
Real configuration errors are logged and cause initialization to fail.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add edersondisouza as a collaborator to PMCI - it should've been done
when edersondisouza was added as libmctp West module collaborator, but
it was missed.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
It is important to include license and terms of use information
in the documentation for external modules. This helps users
understand their rights and obligations when using these modules
within the Zephyr project.
Signed-off-by: Gillian Minnehan <gillian.minnehan@nordicsemi.no>
When building the bluetooth.general.tester_le_audio test with clang and
-Winitializer-overrides, it warns:
subsys/bluetooth/audio/mpl.c:318:2: error: initializer overrides prior
initialization of this subobject [-Werror,-Winitializer-overrides]
318 | .add_group = NULL,
| ^~~~~~~~~~~~~~~~~
subsys/bluetooth/audio/mpl.c:317:15: note: previous initialization is here
317 | .add_track = NULL,
| ^~~~
Remove redundant initializer for add_group which overlaps with add_track
in an anonymous union.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
When building with clang we get the following warning when building the
sample.net.midi2.host_auth_user test:
samples/net/midi2/src/main.c:122:54: error: initializer element is not a
compile-time constant
122 | NETMIDI2_EP_DEFINE_WITH_USERS(midi_server, ump_ep_dt.name, NULL, 0,
| ~~~~~~~~~~^~~~
include/zephyr/net/midi2.h:99:12: note: expanded from macro
'NETMIDI2_EP_DEFINE_WITH_USERS'
99 | .name = (_ep_name), \
| ^~~~~~~~
Instead of using ump_ep_dt.name for initialization, we use the
equivalent expression that UMP_ENDPOINT_DT_SPEC_GET(DT_NODELABEL(midi2))
initializes the ".name" member with.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and save quite a bit of flash.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>