If the flash is used in 4-byte addressing, reading SFDP will fail after
a system reset if the flash isn't power cycled or hardware reset, since
Zephyr will try to use 3-byte addressing while the flash (still) expects
4-byte addressing.
This commit adds the ability to send a reset command to the flash as part
of initialization, which complements the existing reset-gpio
functionality, and is useful on low-pincount flashes which do not have a
hardware reset.
Signed-off-by: Ole Morten Haaland <omh@icsys.no>
Allows filling up struct lwm2m_obj_path by a macro.
For example:
struct lwm2m_obj_path p1 = LWM2M_OBJ(MY_OBJ);
struct lwm2m_obj_path p2 = LWM2M_OBJ(MY_OBJ, 0, RESOURCE);
Similarly, some function calls accept the structure, so it can
be initialized from stack and given by a pointer
lwm2m_notify_observer_path(&LWM2M_OBJ(obj_id, 0, RESOURCE_ID));
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Unit test project for bt_keys_foreach_type().
This part of subsys/bluetooth/host/keys.c unit testing.
Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
I need to register a service for the pull-context so I can
safely close the socket context. Otherwise the socket loop
would crash, because context would be closed while going through
the list where it was located.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Minor change, the semaphore is freed by a caller so it was always
free, but just for being correct, it should be a blocking call,
so any errors would clearly block.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
CoAP layer handles retrying so having a second layer of retry
in the pull-context does not make sense. If we need more retrying
it should be done in CoAP layer.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When URI is written, we must first set the state to DOWNLOADING
so when any error happens on the initialization phase, the
result written on a callbacks are correctly reflected and the state
changes correctly IDLE -> DOWNLOADING -> IDLE (result written).
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Allowing locking the registry from commandline allows
us to test composite observation and observation of
object instances, etc. where multiple values are changed
before the notify message triggers.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The advertiser runs in a loop, pulling advertising buffers from a queue.
Features covered:
Queue overflow
Sending order
Buffer freeing
Dedicated buffer pools
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
In test_busy_wait and test_k_sleep test cases of
tests/kernel/context test we measure not only execution time of the
primitives itself (k_busy_wait and k_msleep respectively) but also
the overall test thread execution time.
The issue here is that we do printing in test threads which
means that we do printing in time-critical sections. That breaks
test if we do printing via some device which isn't fast enough.
Fix that by removing print from time-critical section
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
The build of this driver fails when `CONFIG_NO_OPTIMIZATIONS=y` is set:
error: expression in static assertion is not constant
98 | BUILD_ASSERT(steps > 0, "only positive number valid");
error: expression in static assertion is not constant
99 | BUILD_ASSERT(steps <= 2048, "overflow possible");
Fix this by using a simple macro to avoid the compiler from getting
confused.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Change reduces time consumed when a block needs to be erased.
The change was tested on a mimxrt1060_evk board.
Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Add shell for interacting with regulator devices, to enable
users to test power management settings quickly and verify that their
regulator is functioning as expected. Also allows users to interact with
regulator PMIC devices
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The #48905 introduce a regression on gmac ethernet driver. The GMAC
driver matches two compatibles. This add missing compatible for SAM0
variant.
Fixes: #50970.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Clean up and refactor x86 SoC headers in preparation of adding
new platforms in the future.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
For some reason, running sys-t with catalog message on
Cortex-M0 would result in hard fault in mipi_catalog_formatter()
if log_output_syst.c is complied before the backends (and weird
enough, only with SIZE optimization). This new ordering was
introduced in commit f5587552bb
as it was to group all backend source files under a single
directory.
Workaround the issue by compiling file later after backends
as this issue is causing CI failures. Actual root-cause is TBD.
Relates #50941
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
RC releases clutter the release page, there's no reason for keeping them
after the release is done, filter them out from the workflow so they
don't get created in the first place..
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
- Account for the added random delay when updating remaining duration
- Re-worked JIT re-scheduling update a bit to keep the random delay
information and remaining duration correct
Signed-off-by: Troels Nilsson <trnn@demant.com>
- Remaining duration is now in us instead of ticks to avoid
overflow when ticks have higher resolution
- First advertising event should not reduce remain duration
Signed-off-by: Troels Nilsson <trnn@demant.com>
Add EVENT_OVERHEAD_START_US to ticks_anchor when enabling
advertising, so the first advertising event is not late due
to calculations for aux packets etc.
Signed-off-by: Troels Nilsson <trnn@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Tune the EVENT_OVERHEAD_START_US for typical usecases on
nRF52833 SoC using the central_gatt_write and
peripheral_gatt_write samples.
Manually run the samples for over 30 mins without any
assertions and use the actual profiled value that would
otherwise be printed on assertion.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When ticks_to_expire is in the past, i.e. ticks_to_expire is
0, perform an explicit trigger of ticker worker instead of
setting up the compare which delays the trigger by the
minimum ticks offset margin. The changes reduce latencies
of the O(n) ticker_resolve_collision by upto the minimum
ticks offset margin (3 for nRF SoCs) for each resolution.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When an event's prepare is delayed due to ULL scheduling or
ISR latencies, check and have a verbose assertion that logs
the actual EVENT_OVERHEAD_START_US required.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the config file to support 2 Broadcast Streams in
hci_rpmsg samples for running iso_broadcast and iso_receive
samples on nRF5340 DK.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
We need to give gdb slash-separated paths to ELF files on Windows.
Just make sure we always have slash-separated paths. We use this
technique in various places around the tree.
Fixes: #50789
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fixes following bug:
...
Warning, treated as error:
../espressif_esp32/cache_coex/README.rst:4:Title underline too short.
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This changes to compile the IRQ offload test only if
CONFIG_IRQ_OFFLOAD=y. For architectures that do not support
IRQ offload (or that developers with to disable IRQ offload
during bring-up), compiling the code would result in linking
errors.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Bring back Kconfig option which was previously removed by
9cd5086407 (previously named LOG_MSG_PKG_ALWAYS_ADD_RO_STRING_IDXS).
Renamed to shorten and be more descriptive. It can be useful for
external backends or frontends.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
add common mec_gpio.h to allow access to common gpio_regs
structure for both mec15xx and mec17xx, used in pinctrl driver
Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
This is an AArch64 board. We also add RK3399 SoC support,
as well as a very simple Synopsys 8250dw UART driver.
Signed-off-by: Henri Xavier <datacomos@huawei.com>
It is better to use 64-bit variable types for calculating the number
of elapsed ticks than 32-bit variable types. This guards against the
propagation of calculation errors should the lower 32-bits of the timer
counter roll over multiple times before the timer ISR is serviced.
(Such a scenario can easily occur when pausing the system for an
extended period of time with a debugging device such as a Lauterbach.)
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The Inter-DSP Communication (IDC) is being used to send
sched IPI to other CPU cores. When a core receives an IDC,
it needs to ACK it by clearing the BUSY bit in TDR, and also
needs to the BUSY bit in TDA to signal done after processing.
These two steps are needed to complete one IDC message.
If we do only one (and not both), the other side will not be
able to send another IDC message as the hardware still thinks
the core is processing the IDC message (and thus will not send
another one). So add the step to clear the BUSY bit in TDA so
we can have multiple sched IPIs.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Tests that exercise z_xtensa_cache_[flush|inv|flush_inv]_all()
functions.
These tests are at board level because what is mapped into memory is
SoC/board dependent - no one wants side effects due writing to some
inappropriate address.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
They were basically using the wrong instructions to traverse the cache
by index: `dhi`, `dhwb` and `dhwbi` instead of `dii`, `diwb` and `diwbi`
variants.
Fixes#49112.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Instead of 'reset halt', default the command to reset and halt the target
to 'reset init'.
OpenOCD strictly requires 'reset init' to halt and prepare the device
before flash programming.
See https://openocd.org/doc/html/Flash-Commands.html chapter
"12.2 Preparing a Target before Flash Programming."
For targets implementing the init hook, it will allows to perform some
target specific init improvements (such as speed flash improvements).
Targets not implementing this hook will end up executing the usual and
previous 'halt'.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Follow up to e1e16640b5 adding model name
helpers to access generated macros based on a compatible's matching
entries in vendor prefixes.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Follow up to 5b5aa6ebba adding model name
and existence macros for all compatibles of a node that match an entry
in vendor prefixes.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Adds the needed JLink parameters and cmake includes to support flashing
and debugging the tdk_robokit1 with a segger jlink.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
- Added precise check of the image size.
- loader: Added post copy hook to swap function.
- Added Kconfig option for setting swap using move as the default
swap algorithm.
- zephyr: fixed ram loading for ARM, with correct handling of
the vector table when code has moved to RAM.
- imgtool: Added option to export public PEM.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Instead of using "select" on certain EC configurations, which is
considered unsafe for various reasons, use a "depends on" and rely on
the user to set a proper configuration in the config file.
Update the respective project configurations to comply with the new
configuration scheme.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>