STM32WB0 watchdog does not support disable the Debug
module during STANDBY mode once the DBGMCU
clock is enabled.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
If building mbox driver for ESP32-C5, it fails due to
invalid headers. Add needed guard for that SoC.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Return 0 from clock_control_esp32_on() when the peripheral clock is
already on, matching clock_control_on() success semantics.
Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
Since `a78cd34` the ADC driver did not correctly configure
its internal divisor. The responsibility was moved from the
clock control driver to the ADC driver and the `init` function
of the ADC driver was updated accordingly. But the driver
continued calling the clock control API from the `configure`
function, leading to `-EINVAL` being returned.
Correctly configure the internal divisor in the ADC driver by
calling the HAL API directly.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The twt_capable field in wifi status earlier was hardcoded to true. It
seems better to set it to true only when the link mode is 802.11ax or
higher.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Kinetis ke1xf (twr_ke18f/mke18f16) and k8x (frdm_k82f) select
CONFIG_HAS_MCUX_CACHE but previously fell through to the no-op
clear_flash_caches() path, meaning caches were not invalidated
after flash erase or write operations.
After the FTFE controller completes an erase or write, stale data
may remain in the instruction cache and (on some parts) the system
bus cache. Subsequent reads can return outdated values instead of
updated flash contents. This causes test_flash_erase,
test_flash_fill, and test_flash_flatten in
tests/drivers/flash/common to fail, with data read back as stale
values (e.g. 0xAA from a prior fill).
Rebased on top of #105918 and updated to use Zephyr's generic cache
API (sys_cache_instr_invd_all() / sys_cache_data_invd_all()) for
cache invalidation. This keeps the flash driver SoC-agnostic and
relies on the cache driver (e.g. LMEM) for hardware-specific
handling.
Fixes#98487
Signed-off-by: Mohit Talwar <talwarmohit2005@gmail.com>
LMEM cache maintenance helpers can be called before the
underlying code or system cache has been enabled.
This becomes visible on RT11xx CM4 targets once the generic ARM MPU
nocache-memory cleanup path uses the generic cache API for non-ARCH
cache backends during early boot. In that case, LMEM maintenance
requests must not blindly access the hardware while ENCACHE is clear.
Check the corresponding LMEM enable bit before performing code or
system cache maintenance. Return -EAGAIN when the selected cache is
currently disabled, and keep disable requests as a no-op when the
cache is already off.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
This code would fail to compile if compiled with
`-Werror=implicit-fallthrough=`. The fallthrough does not seem to be
intentional as it is handling 2 discrete events.
Signed-off-by: Benjamin Gwin <bgwin@google.com>
The current code resets the refresh_pos pointer on write, but does not
clear the corresponding digit drive pin. This means that the next timer
iteration is going to set the gpio for digit 0, but any other digit may
still be selected, which would cause a glitch on that digit for the
cycle.
There's no real need to reset this pointer on write though so just drop
the line, then the timer refresh just catches up to the new string and
the display is stable.
Also drop the reset line from the clear function as it does not make
much sense there either, but reset on timer end so that the next cycle
starts from the first digit.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
`tests/drivers/watchdog/wdt_error_cases` test was failing
on `it51xxx_evb/it51526aw` due to insufficient error
handling. This change fixes those issues, and the following
tests now pass.
- tests/drivers/watchdog/wdt_error_cases
- tests/drivers/watchdog/wdt_basic_api
- tests/drivers/watchdog/wdt_basic_reset_none
- tests/drivers/watchdog/wdt_variables
- samples/drivers/watchdog
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Move buffer size validation into `start_read()` to prevent adc
context from getting stuck. This issue is revealed by
`tests/drivers/adc/adc_error_cases` test.
Also, this patch adds check for unsupoorted options, including
oversampling and invalid resolution and adds support for higher
channel range. (8 and above).
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Configuring a pin with GPIO_DISCONNECTED currently
results in the pin being set as output due to a
fallthrough in the code. This is not supported by
the driver and should return -ENOTSUP instead.
This commit ensures that configuring GPIO_DISCONNECTED
is explicitly rejected and not applied to the hardware.
Signed-off-by: Fabian Kainka <f.kainka@gmx.de>
When the debug port is turned on, the reset IO should be set inactive.
Setting the pin active will hold the device in reset constantly and
causes issues with debug port access.
When the port is turned off, the keep_reset_deast option should set
the IO to inactive as the kconfig states.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
This reverts commit 311a841620.
+ related changes done in 841e4d4597
Proposed API change result in vendor specific details of the DMA leaking
into application code, which prevents usage with portable code.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
STM32H72x/73x ADC have a PCSEL_RES0 register instead of PCSEL for other
series.
Make a special case to prevent a compilation error.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
According to the note the driver is not able to provide large amount of
data and it can only be used as seed for a RNG. Therefore enable
ENTROPY_NEEDS_PRNG on it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This Kconfig is used to signal that the entropy driver needs a PRNG crypto
algorithm on the provided data. The reason is that the driver is not
capable of providing large amount of data in a relatively short amount of
time.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
POWER_GetResetCause() returns an OR'd bitmask since multiple reset
causes can occur simultaneously. The switch statement only matched
a single value, falling through to default and returning 0 when
multiple bits were set. Replace with bitwise checks to accumulate
all active reset flags.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
NXP FlexSPI NOR flash nodes were missing the soc-nv-flash child
node expected by Zephyr's flash map API.
Without this child node, DT_MTD_FROM_FIXED_PARTITION resolved to
the FlexSPI memory controller instead of the flash device. Since
the controller has api = NULL, MCUboot could hit a NULL pointer
dereference during boot on Zephyr 4.4.
Fix this by updating the DTS structure to match the soc-nv-flash
convention used by the flash map infrastructure.
Changes:
- add a soc-nv-flash child under each nxp,imx-flexspi-nor node
- move erase-block-size, write-block-size, and partitions into it
- add ranges to flash controller nodes for address translation
- update zephyr,flash to point to the soc-nv-flash child
- add zephyr,flash-controller chosen for the flash driver node
- remove soc-nv-flash.yaml from nxp,imx-flexspi-nor.yaml
- use zephyr,flash-controller in flash CMake XIP decisions
- update FlexSPI XIP Kconfig logic to walk to the grandparent
This keeps the controller and flash device roles separate and
restores correct flash map resolution for MCUboot and XIP logic.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
shared_multi_heap_add expects the region parameter to be
a non-const parameter; if const is passed, it still discards
it, but generates warnings.
Signed-off-by: Krisztian Szilvasi <krisztian@atym.io>
The size argument was ignored in i2s_mcux_write. This caused unwanted
behaviour when writing data smaller than the configured size.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
The enum kLPI2C_TransferRepeatedStartFlag is not used in fsl_lpi2c.c,
so it shouldn't be used in mcux_lpi2c drivers.
Update nxp hal to get latest version of lpi2c drivers.
Signed-off-by: Michal Chromec <michal.chromec@nxp.com>
Replace DT_ENUM_IDX_OR with DT_NODELABEL usage with the more appropriate
DT_INST_ENUM_HAS_VALUE macro for checking the version property value.
This improves code readability and uses the proper devicetree API for
enum value checking.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Remove the error check because it may misjudge some right cases.
For example, for HSUSBD, in the case Setup-DataIn-StatusOut and
immediately following Setup-DataOut-StatusIn, the DataOut in the
second Control transfer has arrived but user buffer for OUT may
be only ready for StatusOut in the first Control transfer.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The scheduled transfer message can be just a hint and its attached
transfer buffer can be NULL. Skip this case.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The crash results from Control transfer STALL interrupt flag
not cleared. To catch all uncleared interrupt flags, all Control
transfer interrupt flags are cleared altogether at one place
instead of separately, with their handling order not changed.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
The UARTE_GET_CUSTOM_BAUDRATE macro used an incorrect formula that
did not match the one specified in the nRF54x UARTE datasheet.
The correct formula is:
2^12 * floor(2^20 / round(f_PCLK / desired_baudrate))
Update the macro to match the datasheet formula, to reduce the
baudrate error for high-speed UART instances on nRF54x devices.
Signed-off-by: Ahmed Ahmed <ahmed.ahmed@dewinelabs.com>
net_if_carrier is to be used independently of the
administrative state (start and stop of the ethernet_api).
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Replace SOC_SERIES_CH32V00X with SOC_SERIES_QINGKE_V2C to maintain
consistent naming across SOC series.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/w1`
- `drivers/watchdog`
- `drivers/wifi`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/rtc`
- `drivers/sdhc`
- `drivers/sensor`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/interrupt_controller`
- `drivers/led_strip`
- `drivers/lora`
- `drivers/memc`
- `drivers/mfd`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/i2s`
- `drivers/i3c`
- `drivers/ieee802154`
- `drivers/input`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/clock_control`
- `drivers/counter`
- `drivers/crypto`
- `drivers/dai`
- `drivers/debug`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/adc`
- `drivers/audio`
- `drivers/bluetooth`
- `drivers/can`
- `drivers/charger`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>