In case channel_setup is called with a new attenuation
config, make sure previous calibration scheme is deleted properly.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Without this patch the hdlc_iface_init() function assigns to
ot_hdlc_rcp_context structure pointer (*ctx) value of 0, as in the
NET_DEVICE_DT_INST_DEFINE() preprocessor macro the 'data' field is
set to NULL.
Afterwards, the ctx->iface is set to iface address passed to the function
(as well as the ctx->ot_context is set).
Writing those values to address 0x0 is catastrophic to for example
mimxrt1020, which uses ITCM memory (mapped from 0x0) to store flash
handling functions, as those are used to XIP code directly from
SPI NOR memory (as mximxrt1020 doesn't have internal flash).
In this particular case - the flash_flexspi_nor_erase() function is mapped
(i.e. relocated) to ITCM's 0x0 address. Overwriting first 8 bytes of it
causes the SoC to enter "Precise data bus error" exception.
The fix is to define the static instance of struct ot_hdlc_rcp_context
and pass its address to the NET_DEVICE_DT_INST_DEFINE() macro. As a result
its storage is now in RAM, not ITCM.
This issue has been discovered on UART based HDLC RCP communication, but as
it also may be problematic on the NXP driver, this patch fixes it too.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
To fix the native hardware chip select, we need to rewrite this driver
to not use the MCUX SDK handle abstraction, which does not fit the
zephyr use case.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add functions to get remaining length in the transfer. Refactor a bit to
avoid duplicate code for the for loop that is the same as in the total
length function.
The difference between the total length and left length function is that
the current buffer total length is counted in the former and the current
buffer remaining length is counted in the latter.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add properties for describing RX and TX fifo sizes.
Also reformat some descriptions and fix the description of the
transfer-delay property which was incorrect. Since zephyr spi bufs are
not continuous, every possible Zephyr LPSPI driver must use
continuous transfer mode, for which the meaning of this delay has
nothing to do with the chip select.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The GPIO peripheral on Silabs Series 2 devices is responsible for
allocating analog buses to analog peripherals. Enable support for
this in the pinctrl driver. Since these bus allocations are not
digital pins, introduce a new property silabs,analog-bus for this
purpose.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Makes the esp_console_init() calling during hardware initialization
conditioned to CONFIG_ESP_CONSOLE
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
properly check return code from i2c_reg_write_byte_dt effectively
making it possible for gpio_npm2100_port_set_masked_raw to error out since:
if (ret != 0U) {
return ret;
}
was dead code before this fix.
Fixes CID-444376
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a check to ensure the frame size does not exceed the video buffer
size defined by `CONFIG_VIDEO_BUFFER_POOL_SZ_MAX`. Even if the sensor
supports the resolution, the frame size could overflow the buffer.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Ensure the DCMI video buffer is released only after the DCMI
has been fully stopped. This prevents potential access to the
buffer while the DCMI is still active, avoiding undefined behavior.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
The strcpy is unsafe so use strncpy and pass the ssid length
as a maximum amount of chars to copy.
Fixes#81917
Coverity-CID: 434719
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The wifi_scan_result struct needs to be initialized to 0 so that
the ssid gets properly null terminated.
Fixes#81971
Coverity-CID: 434570
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The user of the ft8xx driver can register a callback function called
on a touch detection interrupt event. This function is extended to
include a user-defined pointer. The user-defined pointer helps to share
a callback with multiple driver instances.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Improve the FT8xx display driver to support multiple driver instances.
The ft8xx_reference_api.h still follows the FT8xx programming guides,
limiting the usage of the driver to one instance.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
The station-mode channel scan method is currently set to WIFI_FAST_SCAN
which ignores the signal strength and connects to the first channel found
which may result in poor WiFi bandwidth.
Change the scan mode to scan all channels and connect to the channel with
the highest RSSI.
Fixes#84488
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
i2/3c_burst_write comes with a warning where this combined write
synthesized by thsi API may not be supported by all I2/3C
devices. Replace with i2c_write instead with a buffer combining
the address and data.
The Kconfig STMEMSC_I2C_WRITE_BUFFER_SIZE was added to set the
size of the buffer pushed to the stack.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The #83556 fixes an error related to DMA initialization which resets
the DMA CRC part. However, the samd/e5x do not have this module inside
DMA controller which causes a compile error. This fixes the issue
checking if the DMAC_CTRL_CRCENABLE macro is defined.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Makes driver actually build again.
Fixes scaling, q32 encoding, bit shifts, and register mappings.
Also enables High Resolution mode (a unique and beneficial
feature of the chip when used with streaming).
Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
There is a HW bug in nPM1300 LDO which causes the LDO output voltage to
reach its target very slowly in specific cases. This is worked around by
performing an additional i2c read shortly after an LDO is enabled.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Some NXP socs use USBFS0 macro as base address for accessing the USB
registers, rather than USB0.
It generates compile-time errors, since USB0 is not defined.
Fix by defining USB0 if USB0 is not defined and USBFS0 is.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Currently altitude is only provided above MSL. Adding
geoid seperation allows for ellipsoidal height to be
determined.
Signed-off-by: Maxmillion McLaughlin <max@sorcerer.earth>
Initialize the cyhal_sdio_config, such that the init
function won't do the pin configuration.
The gpios are setup using the zephyr pinctrl driver already.
Before the latest hal update the values were ignored and
the gpio configuration completely skipped.
But this is no longer the case and this commit
fixes that by setting the gpio pins to nc,
Also, explicitly set sdio_config.clock to NULL, to make
it clearer that the driver will check for that.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The driver should use resource type SDHC not SDIODEV.
In a older HAL version the value was not used as parameter
for clock initialization so it didn't matter, but breaks
the initialization of the driver with the latest hal.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This PR adds support for BQ32002 RTC chip.
Supported functionalities:
* Time setting/reading
* Alarm setting/reading
* Calibration setting/reading
* IRQ frequency configuration
Tested on nRF52833-DK board.
Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
Some peripherals (e.g. ethernet) have remaps only on some of the pins.
Pins without remaps do not conflict and must be ignored to correctly
process the remaps.
Signed-off-by: Vegard Storheil Eriksen <zyp@jvnv.net>
Add shell device filtering using the existing sensor_device_check to all
remaining sensor shell commands.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The STM32 DCMI capture seems to stop when the pixel clock is
disabled during horizontal blank. This patch switches pixel
clock to free-running, which shouldn't have any effect on other
capture devices.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Add the missing stream_start and stream_stop API functions
(the driver doesn't work without them) and implement video
controls for horizontal mirror (hmirror) and vertical flip.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>