The LE Set Extended Advertising Set Random Address command may be
issued at any time after an advertising set identified by
the Advertising Handle parameter has been created using the
LE Set Extended Advertising Parameters command.
This commit fixes the advertising set issueing the set random address
command before the advertising set is created in the controller.
Since the le_adv_set_random_addr function has is used to get the the
own address parameter for the it could not simply be moved, and
moving the own address parameter handling out of this function
would create a potentioal maintaince problem.
Also this function is used for both with and without advertising
extension feature so changing it is not trivial without breaking all
the previous random address handling already put in place.
The simplest solution was therefore to postpone the command until the
parameters has been set using 2 flags.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix filter_dup and options in union with mixed size integral types,
this is not portable, and causes malfunction on big-endian systems.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use bluetooth assert on HCI command send error since this assertion is
always enabled and we should not continue after this has failed.
Log command status failure with information in order to make it more
visible as the HCI status code is more interesting than the -EIO error
code returned by the function.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add BT_ASSERT_MSG assert mechanism that can print assertion messages
when verbose bluetooth asserts are enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Due to the use of UTIL_EVAL*() macros, the UTIL_LISTIFY() macro used
by DT_INST_FOREACH(foo) can cause long build errors when there is a
build error in the expansion for "foo". More than a thousand lines of
build error output have been observed for an error in a single line of
faulty C.
To improve the situation, re-work the implementation details so the
errors are a bit shorter and easier to read. The use of COND_CODE_1
still makes the error messages quite long, due to GCC generating notes
for various intermediate expansions (__DEBRACKET,
__GET_ARG_2_DEBRACKET, __COND_CODE, Z_COND_CODE_1, COND_CODE1), but
it's better than the long list of UTIL_EVAL notes.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
DT_CALL_WITH_ARG() is an internal implementation detail that should
not be used outside of devicetree.h.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Update the hal_nordic module revision so that the nrf_radio_802154
does not use the CONFIG_ENTROPY_NAME symbol which is no longer used
in the Zephyr tree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This allows users to modify the contents of the data being
written after the cmake/flash/CMakeLists.txt has been
executed.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Fix seg_tx occupy when no segment not send
and allocate rx_seg when receive such message.
Fixes: #24101
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
breathe v4.15.0 was just released and fixes some compatibility issues
with latest sphinx, the combo works, however with many warnings that we
still need to either fix or whitelist. This is temporary until we are
able to use those new versions.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The duration is used in math with the uptime clock, not as a timeout.
Correct value expression and rename to clarify units.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
For the ll code we know the exact entropy device as its the one for the
SoC that we are on. So use the new DT macro's to get the entropy device
via DT_INST rather than using CONFIG_ENTROPY_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
dt_int_val, dt_hex_val, and dt_str_val have been deprecated for two
releases and thus are meant to be removed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fix the pending slave set connection latency and timeout values not used
in the connection update procedure when
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS has not been enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
We add a simple test case to verify the behavior
of z_arm_exc_spurious handler. We use the SysTick
interrupt for that so the test is enabled for
platforms that have but do not use the SysTick.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In the Cortex-M exception table we rename z_arm_reserved()
function to z_arm_exc_spurious(), as it is invoked when
existing (that is, non-reserved) but un-installed exceptions
are triggered, accidentaly, by software, or hardware. This
currently applies to SysTick and SecureFault exceptions.
Since fault.S is shared between Cortex-M and other AARCH32
architectures, we keep z_arm_reserved as a defined symbol
there. This commit does some additional, minor, "no-op"
cleanup in #ifdef's for Cortex-M and Cortex-R.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
If the Cortex-M core does not implement the Security Extension,
we should not be adding z_arm_reserved in the corresponding
vector table entry. That is because the entry is reserved by
the ARM architecture.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
If the Cortex-M core does not implement the SysTick peripheral,
we should not be adding z_arm_reserved in the corresponding
vector table entry. If we do have SysTick implemented but we
are not using it as the system timer, we shall install the
reserved interrupt at the vector table entry.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Write 0x0 instead of z_arm_reserved to vector exception
entries that are always reserved for future use by the
ARM architecture. These vector table entries cannot be
fetched to be executed by the Cortex-M exception entry,
so having z_arm_reserved gives a false impression, since
it is a function that may be invoked in the code. This
modification is safe since these vector entries are also
not supposed to be read / written by the code.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Use valid stm32 flash driver compatibles instead of flash
area compatible.
For 'write_block_size' property, use reference to soc-nv-flash.
fixes#23997
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Always try to fallback to video software pattern generator, allowing
to run the sample, even when there is no real sensor connected.
(e.g. mimxrt1064 without mt9m114).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Create a dedicated config symbol for video device initialization.
Generally, video device init is low priority comparing to standard
devices. Moreover some video device can rely on other device init,
like the csi mcux driver which rely on sensor and i2c init.
This fixes a crash in video capture sample, when camera sensor
(mt9m114) is not connected.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
This change ensures that shared memory doesn't hold any pre-reset
values after Soft reset is issued. When the Network Core boots up,
shared memory is always set to zero.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Fix the board redirects. The following boards existed before we moved to
a new style of URL for boards, and thus each have 2 entries (old style
old name to old style new name; new style old name to new style
new name):
- nrf51_pca10028
- nrf52810_pca10040
- nrf52840_pca10056
- nrf52840_pca10059
- nrf52_pca10040
- nrf52_pca20020
The following boards did not exist (or were not referenced) before we
moved to the new style of URL for boards, and thus only have one entry
(new style old name to new style new name):
- nrf51_pca10031
- nrf52811_pca10056
- nrf52833_pca10100
- nrf52840_pca10090
- nrf5340_dk_nrf5340
- nrf9160_pca10090
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add kconfigfunctions that given the property name to an integer type
property will return its value as either an string int or string hex
value.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use the new devicetree API in a file which cross-checks dt reg base
addresses with values from the vendor HAL.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Make sure every flash controller has a node label "flash_controller".
This will make it easier to refer to the SoC NVMC node when necessary.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
OpenThread uses "tx started" notification to start ACK
timeout if the driver does not support it.
In order for this to be achieved tx task needs to run in parallel
to the OpenThread task, otherwise it may delay the gap between
cca and tx or run after transmission has already finished.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Notify about actual data transmission start.
Needed when ACK timeout is disabled in the radio driver.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
When enabled, instead of erasing entire flash page at once, page will
be erased in defined time slices. Erasing single page stalls CPU
for significant time share (~80ms) and partial erase divides the
operation in to the shorter time periods, resuming CPU operation in
meantime and enabling better scheduling of time sensitive operations.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The function calculates the number of octets put, but does not return
it. Call sites check for non-zero values suggesting this is a bug.
See https://habr.com/en/company/pvs-studio/blog/495284/ fragment 12.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Use the size of the target buffer as the maximum length when
formatting with snprintf.
See https://habr.com/en/company/pvs-studio/blog/495284/ fragment 3.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The recent change in 2.2.0 that disables the watchdog
on boot introduced a hard fault when a log message
is generated too early before even the RTC is
initialized.
This commit removes the log message.
Signed-off-by: Steven Slupsky <sslupsky@gmail.com>