This patch defines the dma feature for the stm32wbXX
and the dmamux feature for the stm32wb55x
soc series from STMicroelectronics
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add support for ADC on H7 series. Note that ADC1 and ADC2 share the same
register set, so it is added as "adc1_2".
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Like stm32 L4 does,
when the STM32WBx SoC goes into STOP mode, the SPI device is disabled.
This cause the pins to not be drived anymore (i.e. they are floating)
except through their pull-up or pull-down.
From the logical point of view, the NSS pin is held high by a pull-up
so it's not a problem if the other pins are floating. However those pins
are floating input for the slaves, which increase their power
consumption.
The solution is to hold the state of the pins through a pull-up or a
pull-down. This is already done for the NSS and MOSI pins, but not for
SCK. Fix that by using pull-down on the SCK pin the same way it is
already done for the MOSI pin.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Given that the Minnowboard has relatively large memory, the default
number of pages allocated for page tables are not enough, and
resulting in asserting in the page table initialization code.
So change the number of pages to a large number to accomodate
various applications.
Fixes#24353
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
All pin configuration for ATMEL SAM SoC come from devicetree so we can
now remove the soc_pinmap.h header files.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert i2s_sam_ssc driver to utilize devicetree. We replace Kconfig
options for specifying the DMA configuration (channel, DMA device name)
with getting that from devicetree. We also get pincfg from devicetree,
however we still have Kconfig sybmols to specify if the RF or RK pin is
enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert sam_xdmac driver to utilize devicetree. As part of the
controller binding we specify that dmas should contain a channel and the
perid for the DMA transaction.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The conversion in 9b096f40b6 left out a
few tidbits that were not converted properly. Complete the conversion
properly.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The macro iterates through the list of child nodes and invokes provided
macro for each node.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove semicolon between instance invocations of DT_FOREACH_IMPL_ and
thus DT_INST_FOREACH. This provides more flexibility to the user. This
requires we fixup in tree users to add semicolon where needed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
MCHP Soc operation uses clear-on-write register for interrupt
status, read-OR-write operation may clear interrupts unintentional.
Fixes#24464
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
We have a new heap implementation replacing mem_pool. Add docs on its
API and internals, and add a deprecation note to the mem_pool section.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The recent work with k_timeout_t has invalidated much of the existing
timing documentation. Rewrite the section focusing on the new API,
adding details on the internals and driver-facing API. Includes a
porting guide for legacy applications and subsystems.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add some documentation and diagrams for OS library data structures:
dlist/slist, rbtree and ring buffer.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This suite was fairly messy and very unstable on how it re-used
kernel objects.
* Unnecessary ztest_test_pass() or self-aborts removed
* k_thread_join() now used to wait for child thread completion,
instead of a strange use of a semaphore which was effectively
a 10ms sleep
* Barriers simplified
* the number of thread objects in kobject.c is now drastically reduced
* test case function names are now descriptive and made static if
only used in local scope in kobject.c
* SMP no longer disabled
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If a ztest test case creates child thread(s), and one of the
descendent threads invokes ztest_test_pass(), ztest_test_fail(),
or ztest_thread_skip(), only that descendent thread will be
aborted.
Then ztest will try to run the next scenario on the ztest_thread
which is already in use. This was causing corruption issues on
SMP systems, and possibly other subtle, hard-to-debug
situations.
This patch ensures that ztest_thread is always dead before
re-using it, as run_test() now attempts to join on it instead
of using a semaphore.
The ztest_test_* functions now ensure that the ztest_thread
is always aborted, in addition to the current thread.
This isn't perfect. If the testcase spawned other threads,
they will keep running. The most robust way to fix this is to
iterate over all non-essential threads in the system and abort
them. Unfortunately, Zephyr doesn't have a facility to do
this safely.
It would also be simpler to re-use thread objects if
k_thread_create() could detect whether the thread was already
active and abort it, but this is currently not possible
since k_thread_create() can be used with uninitialzed
thread object memory and no checks are possible. This
may be improved in the future, see #23030.
Fixes: #22738
Partial fix for: #24713
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Due to a typo compiling the WWDG on the g4 family does not
work. This adds the correct include filename.
Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
Abort if we find tests that are being skipped incorrectly. Tests should
be skipped using ztest_test_skip().
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enable extended advertising commands in the shell and enable the
runtime check of feature support in the controller.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When using extended advertising the connection can be established on
different PHY. In order to have an updated value of the current PHY
we need to read the PHY of the connection in the connection complete
event.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add application control of initiating phy change procedure and it's
parameters.
The reasons for allowing the application control over the PHY:
- Allow changing to Coded PHY.
- Application may change PHY to react to changes in environment
to balance throughput and range.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add application control of initiating data length procedure and it's
parameters.
The reasons for allowing the application control over the data length:
- Bandwidth control adjusted based on number of active connections.
- Changing data length before switching to coded phy.
- Applying workarounds for interoperability problems.
- Controlling order of ATT MTU and data length procedures.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add Kconfig option so that the application can disable automatic
initiation of the data length procedure. This is symmetric with the
PHY auto initiation kconfig option.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor setting the maximum data length parameters supported on in
auto data length procedure. This makes setting the data length of the
connection a re-usable function.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
After increasing SPI speeds on LPC family SoCs, the slow clock
speeds have been removed and default clock speeds are in use now.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Attached Flexcomm SPI driver to the main clock used by the core.
This means setting the SPI clock the same value as the core clock.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
High Speed Flexcomm device that handles high speed SPI transfer are
mapped to the same High Frequency clock that the ARM core uses.
This allows for higher frequency SPI traffic.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
This fixes some cases where an integer timeout received as a parameter
was not converted to a timeout before being used in standard API.
Changes to the POSIX library were not included as that's being
reworked in a separate PR.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Originally this only dealt with constant timeouts. Add the ability to
recognize integer parameters and convert them as well.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Cloned from counter_basic_api with modifications based on DS3231
limitations:
* Only one device tested per board;
* Counter cannot be stopped or started;
* Alarms are serviced by worker thread, so are not invoked from ISR
and require that test thread yield to allow processing (no
k_busy_wait());
* Multiple Alarms test is disabled as documented in test.
Additional tests were added for DS3231-specific API.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The DS3231 is an I2C real-time clock with internal temperature
compensated oscillator, maintaining civil time to 1 s precision with
nominal 2 ppm accuracy from 0-40 Cel.
The basic functionality is exposed as a counter that is always running
at 1 Hz. Much more functionality is exposed as driver-specific API,
including the ability to translate between the time scale of the DS3231
and the time scale of the Zephyr uptime clock. This allows correlation
of events in the system clock to UTC, TAI, or whatever time scale is
used to maintain the DS3231.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
These helper functions may clarify how much data is available to read
from or write to the circular buffer of a k_pipe.
Fixes#25036
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The Bluetooth 5.2 specification was recently released, and has a new
version identifier (11) assigned to it in the Bluetooth Assigned
Numbers.
Relates to commit fa241f0249 ("bluetooth: Add decoding for BLE 5.2
version string")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
With BT_CTLR_USER_TICKER_ID_RANGE it is possible for vendors to add a
number of ticker nodes for proprietary purposes. The feature depends on
BT_CTLR_USER_EXT.
Signed-off-by: Morten Priess <mtpr@oticon.com>
These look up tables generalize the compat2enabled map in a way we
will need to make the API more flexible in Zephyr.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>