Fix PM minimum residency time and exit latency for rt11xx to reflect
actual delays when entering and exiting low power modes.
Fixes#45750
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
When host issue HCI Reset controller should clear LE Static Random
address. Otherwise controller may incorrectly use one from before
HCI reset insread of rejecting HCI commands.
This was affecting following qualification test cases:
HCI/CCO/BI-51-C
HCI/CCO/BI-53-C
HCI/CCO/BI-54-C
HCI/CCO/BI-56-C
HCI/DDI/BI-06-C
HCI/DDI/BI-07-C
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Datagrams (for DTLS connection) need to be sent using single API call to
mbedTLS and should not result in sending each fragment in a separate
datagram. Check if that is the case, so allow only single fragment data to
be sent and expect an error when multiple fragments were passed to
sendmsg().
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Fragmented data passed to sendmsg() should be sent as a single datagram in
case of datagram sockets (i.e. DTLS connection). Right now that is not
happening now, as each fragment is sent separately, which works fine only
for stream sockets.
There is no mbedTLS API for 'gather' write at this moment. This means that
implementing sendmsg() would require allocating contiguous memory area at
Zephyr TLS socket level and copying all data fragments before passing to
mbedTLS library. While this might be a good option for future, let's just
check if data passed to sendmsg() API consists of a single memory region
and can be sent using single send request. Return EMSGSIZE error if there
are more then one data fragments.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
At least one supported PHY bit shall be set and none of
non-supported or RFU bits should be set.
This was affecting HCI/DDI/BI-05-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This is a follow-up to commit 1b479d6a8a.
Use the `GPIO_OUTPUT_HIGH` flag instead of `GPIO_OUTPUT_INIT_HIGH`
as the latter does not actually configure the pin as an output
(it does not include `GPIO_OUTPUT`) what causes an assertion in
`gpio_pin_configure()` to fail.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Before this change, the doc on `bt_gatt_discover_func_t` gives the
impression that the type of `user_data` depends on `attr->uuid`. That is
partially incorrect. It is more accurate to say that the type depends on
the discovery type because that determines the ATT operation, which in
turn determines if the data is available.
Add documentation on `user_data` for the discovery type
`BT_GATT_DISCOVER_STD_CHAR_DESC`.
Add a hint `bt_gatt_discover_func_t` that `bt_gatt_read` can do a
different kind of attribute lookup, read-by-type, which may be
more convenient in some cases.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Removes label experimental for direction finding feature in
Bluetooth Controller.
The feature stays disabled by default because it requires additional
dedicated hardware to be used. Besides that it significantly enlarges
amount of memory used by the Controller.
End user has to enable the feature explicitly by use of configuration
options.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix preempt timeout scheduling to not skip first prepare in
pipeline when there are no previous preempt timeout
scheduled already.
Fix related to commit 27b8beaa22 ("Bluetooth: Controller:
Fix to handle relative short preempt timeout").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Maximum number of CTE to be send in a periodic advertising chain is
limited by BT 5.3 Vol 4 Part E, section 7.8.80 and is 16.
Maximum number of samples CTE in a periodic advertising chain is
limited by BT 5.3 Vol 4 Part E, section 7.8.82 and is also 16.
Both values are limited by amount of memory reserved in Controller
by Kcofigs, respectfully: CONFIG_BT_CTLR_DF_PER_ADV_CTE_NUM_MAX and
CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX.
Functions ll_df_set_cl_cte_tx_params and ll_df_set_cl_iq_sampling_enable
check limits against Bluetooth specification provided values.
That can end with memory overwrite if number of requested CTEs is
greater that number provided in configuration.
The commit changes mentioned functions to validate HCI commands
parameters against configuration values.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In case there are pending two control procedures: local and remote,
and remote device sends LL_REJECT_IND PDU then assertion happened.
ull_cp_rx function triggers assertion because LL_REJECT_IND is
considered as expected packet for all local and remote control
procedures.
That is not correct. It does not allow local procedure to handle
a response and stops a device on assert.
A remote device should not send LL_REJECT_IND PDU for locally initiated
control procedures, hence local device should not expect to receive
LL_REJECT_IND PDU to be expected one for pending remote control
procedure.
Remote device is allowed to send LL_REJECT_EXT_IND PDU for a locally
initiated control procedures. The LL_REJECT_EXT_IND PDU has a Reject-
Opcode that identifies rejected control procedure, hence is may be
expected by local device.
The commit provides changes that prevent the Controller assertion
in described case.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
CCM during on-the-fly decryption of a received packet starts decryption
when Radio triggers EVETNS_ADDRESS. In case there is possibility a
packet may include Constant Tone Extension, on-the-fly parsing of a
received packet for CTEInfo is enabled.
If there is a PHY 1M enabled the Radio stores received bits with a
delay, that is equal to time required to receive 3 bits. CCM TASKS_CRYPT
related with packet decryption should be delayed by the time the Radio
needs to store received data.
The commit provides changes required to delay start of the CCM
TASKS_CRYPT. It uses NRF_RADIO Bit counter feature. The Bit counter is
configured to trigger NRF_RADIO->EVENTS_BCMATCH on reception of 3rd bit.
The event is connected through PPI with CCM TASKS_CRYPT.
The PPI used is shared with Radio Rate override. That is possible because
direction finding feature is not allowed on PHY Coded and CCM needs a delay
only when used PHY 1M.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
lll_conn_rx_pkt_set function is called before one of radio_switch-
_complete_XXX functions calls in lll_peripheral.c. That prevents
lll_conn_rx_pkt to call any Radio setup related function that touches
NRF_RADIO->SHORTS. NRF_RADIO->SHORTS are assigned in radio_switch_-
complete_XXX functions, hence any change operation on the register done
before is overwritten.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The GitHub Actions runner redirects the stdout and stderr console
outputs and, now that twister properly invokes the Colorama module
initialisation function, the color output is disabled when running the
twister in the CI.
This commit adds the `--force-color` option when invoking the twister
so that the ANSI color escape sequences are output even when the output
is redirected by the GitHub Actions runner (note that the web console
properly displays the color escape sequences).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Colorama, by default, strips out the color escape characters when the
output is redirected, and this may have an unintended consequence of
disabling color outputs when using a utility such as `tee` and in the
CI runners that redirect the stdout and stderr console outputs.
This commit adds a new command line option called `--force-color` to
always force the ANSI color escape sequence output even when the output
is redirected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Update the new API to use K_USER as the flags for both
CONFIG_USERSPACE and CONFIG_TEST_USERSPACE. Also, fix the linker
script to properly include the suites, tests, and rules.
Fixes#44108
Signed-off-by: Yuval Peress <peress@google.com>
The data sections generated by zephyr_linker_sources(DATA_SECTIONS ...)
was missing for the qemu_x86_tiny.
Signed-off-by: Yuval Peress <peress@google.com>
This creates a new GitHub workflow that snapshots open bugs in a
compressed format that is convenient to extract for later analysis in
a Python script, using scripts/make_bugs_pickle.py.
The workflow is only run on demand. This allows us to run it during
the weekly release readiness meeting, right after we have finished the
initial bug triage for the week. That ensures that results are as
fresh and relevant as possible.
The resulting file is uploaded to S3; with the goal of enabling later
tracking and analysis.
Getting the analysis scripts themselves merged into Zephyr is left for
future work. This commit just allows us to get the data.
Co-authored-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This is a simple script which snapshots open bugs in the
zephyrproject-rtos/zephyr repository using the GitHub REST API.
It relies on the 'github' module, which is a de-facto standard for
accessing this API in Python:
https://pygithub.readthedocs.io
We are already using this package in scripts/release/bug_bash.py, so
this is not a new dependency, even though it's a third party package
not available in the standard library.
The resulting bugs are stored in the standard library's 'pickle'
format, as a list of github.Issue.Issue objects. For more on pickle,
see:
https://docs.python.org/3/library/pickle.html
I am choosing pickle because it is standard, easy to use, and we are
already using it in the build system to store the edtlib.EDT object
created by gen_defines.py. This is also therefore not a new
dependency (and even if it were, it's in the standard library).
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is meant to be a place where we can store generic zephyr wrappers
around the de-facto standard github API for python.
The first 'customer' will be a script that snapshots our open bugs at a
particular point in time, which will be added in a later patch.
I think it's useful to factor this file out of there from the
beginning just to keep things clean, even though I don't have a second
customer in mind at the moment.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.
Note that the init function needs to be called per module, hence it is
also called in the `twisterlib.py`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces changes in three places in order to fix the
problem with timer-related tests on FE310-based boards:
* tests/kernel/sleep/kernel.common.timing
* tests/kernel/tickless/tickless_concept/kernel.tickless.concept
* tests/kernel/workq/work_queue/kernel.workqueue
The first change is the modification of the SYS_CLOCK_HW_CYCLES_PER_SEC
value back to 32768 Hz to match FE310's datasheet description.
The second change is CLINT frequency reduction in Renode simulation
model to 16 MHz to correspond with the oscillator frequency given by the
FE310's datasheet and the HiFive1 board schematic. This fixes the first
two tests.
The last change is reducing the MIN_DELAY define to 100. This causes the
RISC-V machine timer driver to update the mtimecmp register more often,
which in turn addresses the `work_queue/kernel.workqueue` problem with
work items finishing prematurely, causing the above-mentioned test to
fail.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Iterate on 3 main namespace to avoid collision in identifiers sharing
the same name at the top level when creating the diff.
Fixes#44940
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The sample did not have defined pass condition and was failing
due to a timeout. Add harness: consol and an explicit regex matching
the sample's output so it can pass on a hw. In addition, a requirement
for a gpio_loopback fixture was added to the sample.yaml.
fixes: #45229
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Configure the testcase.yaml to execute watchdog testcase
wdt_basic_api on each IWDG and WWDG on all the stm32 boards
With two generic stm32 .overlay files as extra config :
one wdg is tested when the other is disabled.
Removing from board overlay.
Giving the list of boards else non-stm32 ones could try building
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set the priority of the wwdg instance to 6
else a build error happens :
static assertion failed: "Invalid interrupt priority.
Values must not exceed IRQ_PRIO_LOWEST"
Signed-off-by: Francois Ramu <francois.ramu@st.com>
1.Remove filter to allow platforms(e.g. qemu_x86) supporting
CONFIG_ARCH_HAS_USERSPACE run testcases when userspace is disabled.
2.Define all testcases in the yaml for consistency and issue parsing
them during setup.
Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
Openocd scripts for STM32H7 SoCs use _CHIPNAME.cpu{0|1} as
target handle.
Specify this thanks to new openocd runner option '-target-handle'.
This is required to allow thread awareness debugging on these targets.
Fixes#45778
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Provide a way to specify the openocd target script handle used to
describe the core target.
In most target scripts '_TARGETNAME' is used, but it can happen that
'_TARGETNAME.foo' or '_CHIPNAME.bar' is used, specially on SoCs subject
to multicore.
Today, this option is required to enable rtos thread awareness,
using '$_TARGETNAME configure -rtos Zephyr' command, which is generated
by this runner.
It could be useful for similar needs in future.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Checking that provided pclken->bus fits bus range in
clock_control_get_rate() is wrong as it could actually be a source
clock and hence not belong to this range.
Also, this kind of check is just not needed since this function should
not be used before call to clock_control_on() or clock_control_configure()
which do the required verification.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When newlibc is enabled, memcpy_chk fails due to
overflow when testing destination address length.
This updates the source and destination range defintion
so that it works as expected.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The check did not properly check the info->flags as a bitfield,
and thus never decoded the data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Assertions in can_mcan failed because the driver expects values
strictly greater than 0
Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
Add CAN transceiver to board DTS
Enable CAN peripheral and set correct pinctrl config in board DTS
Add CAN support in board yaml file
Modify board documentation
Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
The Bluetooth documentation was missing all the Doxygen API information
regarding the standard services implemented in the Host. Import the
Doxygen API doc in a single page.
Fixes#42520.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>