Most SPI NOR flash devices support a "fast read" command which uses
dummy bits between the address and the start of the data transfer. In
many cases, the maximum SPI clock speed of the device is lower for the
regular read command due to the limited time between the address and
data phases, so using the fast read command will remove this restriction
and allow for faster transfers.
Add a device tree flag to indicate that fast reads should be used for
the device.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Some Micron (and possibly other) SPI NOR devices implement a flag status
register which provides more information on the success/failure of erase
and program operations. In addition to better error checking, some of
these devices actually don't function properly if the flag status
register is not read after a program operation (subsequent reads will
only return 0xFF bytes).
Add a device tree parameter to indicate that the flag status register is
supported. When specified, the flag status register will be used for
ready/error checks rather than the standard status register.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
This driver was providing SPI buffers for both TX and RX on the data
payload portion of read transfers, even though the TX buffer is not
meaningful in these cases. As well as being less efficient, this also
caused likely uninitialized data to be transferred to the device, which
is possibly problematic.
Update to not include the TX buffer for the read data payload SPI
transfer, so that the SPI driver can generate dummy TX data internally.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add the 4Bytes program mode to the stm32_ospi driver
to enter 4-Byte Address Mode (SPI_NOR_CMD_4BA) when flash is supporting it.
This is given by the JESD216 SFDP table.
Based on the stm32 qspi driver.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The value read from unwritten areas of Renesas RAxxx SoCs data
flash is undefined. To prevent reading unwritten areas a
blank check command is performed first. If the area is blank, we
return dummy data so it behaves the same as other flash devices.
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
The standstill detection logic now stands corrected. Moving would
be indicated when the standstill bit is not zero.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Refactor DHT20 sensor init and measurement handling.
Added 100ms power-on wait to comply with datasheet.
Simplified measurement frame handling.
Initialize status register only once after power-on.
Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
The assert message was not very helpful, CODE_UNREACHABLE is more
readable and requires fewer effort while proofreading.
Signed-off-by: Josuah Demangeon <me@josuah.net>
In video_closest_frmival(), immediately stop searching when an exact
match is found, as a small performance optimization. Variables
that could be computed only once were moved further outside.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Fix bug introduced in 46a262ffe6 where the
fie.index field was expected to be incremented by the driver, while it
is the responsibility of the caller to increment it.
Fixes#89663
Signed-off-by: Josuah Demangeon <me@josuah.net>
In hal_stm32 commit "update stm32h7rs to cube version V1.2.0"
e5eba65b76
the constants FLASH_OPTKEY1/2 for the STM32H7RS have been renamed to
FLASH_OPT_KEY1/2. For backward compatibility, 2 defines have been added
to Legacy/stm32_hal_legacy.h, so that FLASH_OPTKEYx is an alias for
FLASH_OPT_KEYx.
However, in Zephyr's STM32 flash driver, the alias is defined the other
way around since 5dc537389a, which leads to
Twister build failures, for example
https://github.com/zephyrproject-rtos/zephyr/actions/runs/14927867714/job/41936931524#step:12:1335
To fix the build issue, we can simply remove that alias in Zephyr, since
it is no longer needed.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Move backlight i2c controller address into DTS configuration
to be able to use jhd1313 driver for dfrobot's LCD1602.
Signed-off-by: Leon Mariotto <leon2mariotto@gmail.com>
The blend mode was set in a way that multiplied pixels with the alpha
value during read, which caused tests to fail.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix undeclared variable error by changing 'config' to 'cfg' in the
data_sync condition check, matching the variable name declared at the
beginning of the function.
Signed-off-by: Liang Jiaxiang <moonbite233@gmail.com>
This commit introduces a new driver for a common GPIO-driven 7-segment
display. supporting both common anode and common cathode configurations.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Terminate "if ... else if ..." constructs with an empty "else" clause to
indicate that consideration has been given regarding the behaviour when all
other conditions evaluate to false.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This change adds additional workaround for following errata:
"USART does not generate DMA requests after setting/clearing DMAT bit"
Instead of keepint DMAT bit set, it sends first byte by polling
in firmware. This prevents additional power consumption in STOP mode,
caused by keeping DMAT bit set.
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
The buffer_length != 0 is used to check if there is transfer ongoing
inside the uart_stm32_async_tx function. uart_stm32_dma_tx_cb clears
it to 0 when TX DMA is finished, but before the USART send all
the data from shift register.
buffer_length is also cleared in callback async_evt_tx_done,
which is called when USART finished sending all the bytes.
If the uart_stm32_async_tx would be called after
uart_stm32_async_tx, but before async_evt_tx_done there
could be race condition on buffer_length.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Add CAN driver support for Renesas RZ/G3S
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
The LED_STRIP driver is not enabled by default on all boards. As a result,
building the LED_STRIP_MATRIX display driver fails if LED_STRIP is not
manually enabled.
To address this, this commit changes the dependency from `depends on` to
`select`, ensuring that the required driver is automatically enabled and
build failures are avoided.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The nRF GPIO hardware does not store the initial output value
set resulting from gpio_pin_configure() and thus, when
gpio_get_config() is used, the initial value is not returned.
This commit just reads the output value and sets the INIT
value to match in gpio_get_config().
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Since https://github.com/zephyrproject-rtos/zephyr/pull/83114 was merged,
I get twister errors unrelated to my pull requests for the STM32H7S78-DK
(for example https://github.com/zephyrproject-rtos/zephyr/actions/runs/14900504138/job/41851537049#step:12:1369)
This is because the function LL_GetFlashSize() was removed from hal_stm32
on the STM32H7RS series in
e5eba65b76
I am unsure if the removal from hal_stm32 is intentional. If yes, then this
commit should be merged into Zephyr to fix compilation for that target.
Otherwise, hal_stm32 must be patched, Zephyr's west manifest updated, and
this commit can be discarded.
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
Mass renaming is carried out to unify some prefixes and shorten some
macros, making the code easier to maintain and support new devices.
- Rename `int_dev` to `gpio_int_dev` for gpio interrupt
- Rename `eirq` to `ext_irq` for external interrupt
- Rename `gpio_rz_hw_config` to `gpio_rz_flags`
- Rename `p_pm` to `gpio_flags`
- Rename `pre_flags` to `rz_flags`
- Remove `_IOPORT` and `_PIN_CONFIGURE` in some macros
- Rename `GPIO_RZ_PIN_CONFIGURE_GET_FILTER`,
`GPIO_RZ_PIN_CONFIGURE_GET`, `GPIO_RZ_PIN_SPECIAL_FLAG_GET` to
`GPIO_RZ_FLAG_GET_FILTER`, `GPIO_RZ_FLAG_GET_CONFIG`,
`GPIO_RZ_FLAG_GET_SPECIFIC` respectively
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
This driver doesn't need to do anything in its irq_update
implementation, but add a dummy one so that calls to uart_irq_update
don't fail with -ENOSYS.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
This driver previously caused an assertion error if non-NULL user_data
was passed to uart_irq_callback_set. Add support for this by storing the
user data and passing it back to the IRQ callback function.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>