Periodic advertising synchronization create had a timeout set
to fixed value of 10 seconds. BT 5.3 Core specification defines
synchronization timeout as 6 consecutive periodic advertising
events. When advertiser set the periodic interval to be more than
1.6 second it was possible the application timeout is reached
before time allowed by BT Core specification.
Changed implementation of timeout to depend on the periodic
advertising interval.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for peripheral role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for central role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Stop using redundant DEV_DATA/DEV_CFG macros and use dev->data and
dev->config instead.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add sample which demonstrates how RTC clocks are synchronized
between application and network core.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add a simple sample that tries to answer the silly question: how fast
can I move data from one core to another using OpenAMP?
It depends on a lot of factors but at least we can use this sample as a
skeleton to build tests on top.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
In order to align with macros used to obtain a device reference (e.g.
DEVICE_DT_GET), align the PM macros to use "GET" instead of "REF". This
change should have low impact since no official release has gone out yet
with the "REF" macros.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Following the work done to add TFM support on b_u585i_iot02a,
update other STM32 TFM enabled boards to benefit from the
progress made on TFM flashing instructions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Disable Ethernet on SocketCAN sample because some Ethernet
drivers cannot operate on such small buffers.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.
From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.
Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.
Codebase adapted to those changes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Host receive thread has small default stack size.
Attempt to convert data from binany to string requires
large array. Allocation of such array on stack could
cause stack overflow.
To limit the scope of the array and avoid stack overflow
the array is changed to be static local variable in a function.
Also the array has been prepared to accept max advertising
data sieze of 1650 bytes.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The spi node of the led_ws2812 now includes the frame format
as defined by the dts bindings spi-device.yaml
SPI_FRAME_FORMAT_TI is selected with overlay for target boards.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The STM32 single_wire example was merged in parallel to this sample
and ended up as a sub-folder of this one. Separate both into their
own folders.
Signed-off-by: Martin Jäger <martin@libre.solar>
This PR adds the different handling of temperature sensor for the
STM32L5 soc. In this soc, there are some calibration settings which
need to be applied for temperature conversion.
Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
`tracing_user.h` lost several definitions, which made
CONFIG_TRACING_USER build fail. This fixes the TRACING_USER
config & adds it to the test case.
Moreover, the idle task stack is overflow on qemu_x86, qemu_cortex_m0 &
qemu_riscv64. This makes the test fail. So this commit sets the idle
stack size to 2048 for this sample to avoid it.
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Add optional user data argument to can_set_state_change_callback() to
comply with Zephyr API design guidelines.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
1. Test suites in prior ztest serve no purpose other than logical
ordering of tests into a named-group. Move the construct of setup and
teardown into the test suite and away from individual tests.
Additionally, add the constructs of before/after to the test suites.
This model more closely resembels other testing frameworks such as gTest
and Junit.
2. Test can be added to a suite by using ZTEST() or ZTEST_F() where _F
stands for fixture. In the case where _F is used, the argument `this`
will be provided with the type `struct suite_name##_fixture*`. Again,
this models other modern testing frameworks and allows the test to
directly access the already set up data related to the test suite.
3. Add the concept of test rules (from Junit). Rules are similar to the
before/after functions of the test suites but are global and run on all
suites. An example of a test rule can be to check that nothing was
logged to ERROR. The rule can cause the test to fail if anything was
logged to ERROR during an integration test. Another example would be a
rule that verifies that tests ran within some defined timeout.
Signed-off-by: Yuval Peress <peress@google.com>
Use default arduino header UART in DT overlay for FRDM-K64F board.
This is also consistent with documentation if a shield is to be
used for communication.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample demonstrates the use of the UART driver. The data is
received using an ISR callback and a message queue. For sending data,
the polling API is used.
Signed-off-by: Martin Jäger <martin@libre.solar>
Rename a few CAN API functions for clarity and consistency with other
Zephyr RTOS APIs.
CAN_DEFINE_MSGQ() becomes CAN_MSGQ_DEFINE() to match K_MSGQ_DEFINE().
can_attach_isr() becomes can_add_rx_filter() since a filter callback
function is not an interrupt service routine (although it is called in
isr context). The word "attach" is replaced with "add" since filters are
added, not attached. This matches the terminology used is other Zephyr
APIs better.
can_detach() becomes can_remove_rx_filter() to pair with
can_add_rx_filter().
can_attach_msgq() becomes can_add_rx_filter_msgq() and documentation is
updated to mention its relationship with can_add_rx_filter().
can_register_state_change_isr() becomes can_set_state_change_callback()
since a state change callback function is not an interrupt service
routine (although it is called in isr context). The word "register" is
replaced with "set" since only one state change callback can be in
place.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Align compiler flags of SOF Zephyr build with the build SOF XTOS
and use -fstrict-overflow.
With -fno-strict-overflow, some versions of XCC compiler (e.g. xt-xcc
12.0.8) always emit a "bltu" instruction to check for overflow in loops
like:
unsigned int n;
for(n = 0; n < 1024; n++)
do_arithmetic();
With "-fno-strict-overflow", you'll have:
18: 068076 loop a0, 22 <dummy_dspload+0x22>
1b: 445a add.n a4, a4, a5
1d: 551b addi.n a5, a5, 1
1f: 023657 bltu a6, a5, 25 <dummy_dspload+0x25>
22: fffc86 j 18 <dummy_dspload+0x18>
With "-fstrict-overflow":
16: 038476 loop a4, 1d <dummy_dspload+0x1d>
19: 223a add.n a2, a2, a3
1b: 331b addi.n a3, a3, 1
As this is a common pattern in audio DSP code, change the default
for SOF builds to -fstrict-overflow.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The inner loops of SOF audio algorithms benefit from
compiler optimizations. On Intel cAVS platforms, it was noted
zero-overhead loops ("loop" family of instructions) is not
used for fixed-size inner loops when using -Os (optimize for
size) and the XCC xtensa toolchain.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Getopt has been rework in this way that calling it does not require
extra state parameter and its execution is thread safe.
Global parameters describing the state of the getopt function have been
made available to ensure full API compatibility in using this library.
However, referencing these global variables directly is not thread
safe. In order to get the state of the getopt function for the thread
that is currently using it, call: getopt_state_get();
Extended the library with getopt_long and getopt_long_only functions.
Moved getopt libary from utils to posix.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
It is documented as unsigned in
samples/net/sockets/big_http_download/Kconfig
Signed overflow is undefined behavior, unsigned is not. This fixes the
following warning:
-Wstrict-overflow=1
samples/net/sockets/big_http_download/src/big_http_download.c:346:2:
In function 'main':
error: iteration 2147483648 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
346 | } while (--num_iterations != 0);
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Excluded due to conflicts with adafruit_2_8_tft_touch_v2.
Both boards got a touch controller.
Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
Adding #ifndef CONFIG_LOG2 condition for log_msg_ids and
log_string_sync in sys-t sample. Extending support for
v2 logging in sys-t sample.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The nucleo_h743 allows extra capes to extend its functionality.
In our case it has been extended to use 32MiB SPI-NOR memory
connected to QUADSPI dedicated pins from block2.
Moreover, upper 16MiB of SPI-NOR memory has been used to store
littlefs data to test 4B addressing mode (which may cause problems
when NOR-flash is larger than 16 MiB).
Now the littlefs sample can be used to test this extension:
west build -p always -b nucleo_h743zi ./zephyr/samples/subsys/fs/littlefs
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Fix wrong extra_args definitions wich cause that this args were not used
by CMake during building this samples via Twister in CI.
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
The syscall_perf test cannot be built successfully due to region RAM
overflow on qemu_riscv32_xip and hifive1_revb. The dtim is only 16KB,
To reduce the main stack size to make it can be built successfully.
Base on the spec(fe310-g002-manual-v1p1.pdf), the size of itim should
be 8KB. Modify the definition in its DTS file.
And it also fix some of the gcc warning when testing it by twister.
This PR partially fixes#41399.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
The CTE type is used in two ways by HCI layer:
1) single value representing particular CTE type: AoA, AoD 1 us,
AoD 2 us
2) bit-filed where bits 0-2 represent particular CTE types AoA
AoD 1 us, AoD 2 us
The bit-field is used to inform Controller about allowed types
of CTE, hence single value carries more than one value.
To avoid confusion between these use cases in code that refers
to case 1) all named cte_type (singular form). For case 2)
cte_types (plural form) is used.
There is an enumeration that is used for both cases:
bt_df_cte_type. For cte_type only single value from the
enumeration may be assigned to variable except
BT_DF_CTE_TYPE_NONE and BT_DF_CTE_TYPE_ALL.
For cte_types all enum members may be used. Ocasionally
BT_DF_CTE_TYPE_NONE may be excluded. If that is true,
it is described in code documentation.
Thanks to that applications are released from requirement
to include hci.h header file.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This sample requires to much flash compared to nucleo_l552ze_q
available resources.
Remove it from this sample.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Due to a recent change in TFM, some more space should be allocated
to mcuboot flash partition (some space should be allocate for OTP)
(Cf commit db07170a34f ("Platform: Allocate space in flash for OTP")
in trusted-firmware-m repo)
Take this into account and increase mcuboot flash partition for
nucleo_l552ze_q_ns target.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
OS_MGMT_TASKSTAT depends on THREAD_MONITOR, so when it defaults to y
and THREAD_MONITOR is disabled we get a build error.
Add a depends on to enforce a correct configuration.
Remove default y, as features should be default n.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>