This commit adds driver support for DMA on f0/f1/f2/f3/f4/l0/l4
series stm32.
Notice due to some bugs, this is currently not working with f7.
There are two kinds of IP blocks are used across these stm32, one is the
one that has been used on F2/F4/F7 series, and the other one is the one
that has been used on F0/F1/F3/L0/L4 series.
Memory to memory transfer is only supported on the second DMA on
F2/F4 with 'st,mem2mem' to be declared in dts.
This driver depends on k_malloc to allocate memory for stream instances,
so CONFIG_HEAP_MEM_POOL_SIZE must be big enough to hold them.
Common parts of the driver are in dma_stm32.c and SoC related parts are
implemented in dma_stm32_v*.c.
This driver has been tested on multiple nucleo boards, including
NUCLEO_F091RC/F103RB/F207ZG/F302R8/F401RE/L073RZ/L476RG with the
loop_transfer and chan_blen_transfer test cases.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
This commit moves DMA parameters previously hard coded in the driver
to the dts.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
src_addr_increment, dst_addr_increment, fifo_threshold and priority
are missing as parameters for configuring DMA. This commit adds them
to the driver.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
The i2s driver assumes the tx channel and rx channel of dma are using
the same dma controller. This commit changes it to be able to use
different dma controllers.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Declaration code for the I2S devices in the driver has too much
duplicate code. This commit uses a help macro to save some work
and some lines of code.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Add a yaml file for help describing generic dma controllers.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If we don't have a DTS (like nrf52_bsim) we shouldn't try and create an
EDT, but we still need to call expr_parser.parse to filter testcases.
So move the os.path.exists(dts_path) around the creation of the EDT.
Fixes: #20371
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added in commit dbc29fe77e ("boards: hsdk: add initial support of ARC HS
Development Kit"), then never used.
Found with a script. CPU_HS38_LINUX was only defined in a
Kconfig.defconfig file.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Added implementation to cache Data Length Procedure when
another control procedure is in progress.
Relates to commit 26317491e04b ("Bluetooth: controller: Add
data length procedure queueing").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix MIC failure on re-encryption procedure when responding
at the same time to peer initiated feature request.
Relates to commit 560d6ddb964c ("Bluetooth: controller: Fix
Re-encryption procedure").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix dropped ENC_REQ PDU when retransmitting, if slave was
not listening or nack-ed it.
Relates to commit 31256568a283 ("Bluetooth: controller: Fix
ENC_REQ PDU retransmission").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix control tx queue handling to correctly pause control PDU
responses during encryption setup.
Relates to commit 4b4b650174bf ("Bluetooth: controller: Fix
control tx queue handling").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix implementation to correctly cache the control procedures
initiatable by local and peer. And, fix feature exchange and
version information procedures from being disallowed by
having then as cached requests to the controller.
Relates to #15256 and commit 0dcfa3853782 ("Bluetooth:
controller: Fix cmd disallowed and collision disconnects").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix check in start encryption to disallow new encryption
setup while there is one already in progress.
Relates to commit 120eba45f81b ("Bluetooth: controller: Fix
start encryption in progress check").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix a bug where in tx data PDU enqueued, while a ctrl PDU is
deferred due to Encryption setup being in progress, is
leaked causing HCI Tx Buffer Overflow crash.
Relates to commit 671ccc4b0ee6 ("Bluetooth: controller: Fix
data PDU leak during ctrl PDU defer").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix bug in Data Length Update procedure that caused the
connection to drop due to the implementation sending bigger
PDU before the peer has acknowledged the receipt of Length
Response PDU.
Relates to commit ffbbec7a89ca ("Bluetooth: controller: Fix
DLE during data transmission").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update ccs811 dts binding to include GPIO pins for wakeup, reset, and
interrupt and change driver code to get the GPIO pin and controller
info from DT instead of Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If we have something like dma-names we should ended up generating
something like:
DT_ST_STM32_I2S_40015000_RX_DMAS_CONTROLLER_1
This isn't quite what we expect. We should instead get:
DT_ST_STM32_I2S_40015000_RX_DMAS_CONTROLLER
DT_ST_STM32_I2S_40015000_DMAS_CONTROLLER_1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
nrf52_bsim does not generate any DTS data to be processed by
sanitycheck, skip filtering if we have no dts data.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Get this commit in:
check_compliance.py: Run pylint on scripts/sanitycheck
https://github.com/zephyrproject-rtos/zephyr/pull/20212 fixes the
last pylint warnings in the script. Once that one is in, this can be
merged.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Some stm32f4 1MB SoCs support optional Dual Bank configuration.
This is not yet supported by stm32f4 driver, so report an
error when configuration is detected
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On 2MB parts, on sector 12 and above SNB is offset by 4.
Fixes#20016
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Tests fail with the default 512 byte main stack size. Increase it
just as the idle stack size has been increased over default.
Closes#20202
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The SensorTile.box SPI3 bus hosts the LIS2MDL device connected
in 4-wires mode (full duplex MISO and MOSI lines) by default.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The LIS2MDL supports SPI half duplex mode with a single data line
by default (3-wire), but it might configured to switch to standard
full duplex mode (4-wire).
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Add shell commands for setting PWM period and duty cycle (in cycles,
microseconds, or nanoseconds).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Update vl53l0x dts binding to include GPIO XSHUT pin and change
driver code to get the GPIO pin and controller info from DT instead of
Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Speed up CMake by 100ms by importing west instead of invoking it as an
executable.
There is significant overhead in invoking west as a script via
pip. The exact reason why is not clear.
Also, simplify the version output parsing as we get the version in a
more machine-readable form now.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There is no APB2 bus on stm32f0 series.
What could be found as APB2 in CMSIS files is actually
second group of APB (A.K.A APB1_2).
Fix nodes that are using this wrong reference accorss the series.
Fixes#20310
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Experimentation with RSSI checks of BLE scans confirms that the
antenna switch setting is incorrect on the argon, boron, and xenon
platforms: when PCB is selected, performance is best with a uFL
antenna, and vice-versa. Checks against the Particle OpenThread
firmware confirm that the correct practice is to invert the settings.
Though the SKY 13351 SPDT switch datasheet suggests otherwise it seems
the VCTLx signals are active low.
Switch the sense of all antennal selection output operations.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Update the binding for nordic,nrf-temp to require the label property and
use the generated define (DT_INST_0_NORDIC_NRF_TEMP_LABEL) instead of
Kconfig symbol (CONFIG_TEMP_NRF5_NAME).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add details for features exposed via headers.
Add power management recommended setup.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Some chips supported by lis2dh driver (such as LIS2DH12 and LIS3DH)
contain CTRL_REG0 (1Eh) register to control internal pull-up on SDO/SA0
line (enabled by default). Add disconnect-sdo-sa0-pull-up boolean
device-tree property to allow disconnecting pull-up during driver
initialization. This allows to save around 180uA at 3.6V in
accelerometer power-down mode.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
There is little reason to compile lis2dh_reg_field_update() function
conditionally, based on enabled features. If it is not used, then linker
will drop it anyway.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Create a common binding file that will be included by all bindings
handled by lis2dh.c driver. For now this includes optional irq-gpios
property.
Use introduced st,lis2dh-common.yaml in st,lsm303dlhc-accel.yaml in
order to support defining irq-gpios.
Also improve description of st,lis2dh-i2c.yaml to better match what can
be found in st,lis2dh-spi.yaml.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Add support for the NXP TWR-KV58F220M development board. This board
features an NXP MKV58F24 MCU, four user LEDs and four buttons,
potentiometer, two TWRPI headers, and a motor control header.
Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Updated tests/crypto/rand32/ to include cryptographic test cases.
Added config file for rand32_ctr_drbg generator.
Signed-off-by: David Leach <david.leach@nxp.com>
1) Add cryptographically secure random functions to provide
FIPS 140-2 compliant random functions.
2) Add name to random function choice selectors to ease
selection in SOC .defconfig files
3) Add bulk fill random functions.
Signed-off-by: David Leach <david.leach@nxp.com>
Putting 'if's directly on the defaults is simpler here.
I'm guessing BOARD should always be "musca_{a,b1}_nonsecure" if it isn't
"musca_{a,b1}", so I removed the condition on the
"musca_{a,b1}_nonsecure" default (turning it into an "else").
Avoiding a top-level 'if'/'depends on' also avoids adding direct
dependencies to the BOARD symbol, which looks a bit neater in the
generated docs (though direct dependencies only matter for symbols that
might be selected/implied).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>