Update the descriptions for the various CAN devicetree timing properties
specified in Time Quanta (TQ) to make it clear that these, if present, are
only used for the initial timing parameters.
Deprecate the (Re-)Synchronization Jump Width (SJW) devicetree properties
for both arbitration and data phase timing as these are now only used in
combination with the other TQ-based CAN timing properties, which are all
deprecated.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Update the CAN controller drivers to solely use the sjw and sjw-data
devicetree properties for setting the initial timing when devicetree timing
parameters are specified in Time Quanta (TQ).
Any timing set via the CAN timing APIs will contain either user-provided or
automatically calculated SJW values. This includes any timing parameters
calculated from bus-speed and bus-speed-data devicetree properties.
Update the CAN controller driver tests accordingly and remove the
CAN_SJW_NO_CHANGE definition as it has lost its meaning.
Fixes: #63033
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Change the CAN timing calculation APIs to automatically calculate a default
(Re-)Synchronization Jump Width (SJW) value. The calculated value can be
overwritten by the caller if desired.
This allows automatically scaling the SJW according to the number of Time
Quanta (TQ) used for phase segment 2 instead of relying on a compile-time
fallback value defined in devicetree.
This reduces the can_set_timing()/can_set_timing_data() API functions to
simple setters (with validation).
Fixes: #63033
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Adds command allowing to query information on bootloader.
In this case support is provided to query MCUboot information.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Specification for MCUmgr OS group command allowing to query
for bootloader information.
Provide information on supported MCUboot parameters query by MCUmgr
group OS.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This moves the declaration of z_tls_current inside
k_current_get() so it will not be exposed as a public
variable.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The original idea of z_current_get() was to be the counterpart
of k_current_get() when thread local variable for current has
not been initialized if TLS is enabled, otherwise they are
the same function. Now since z_current_get() is being used
outside of core kernel, rename it under kernel namespace so
other subsystem can conceptually use them too.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Storing this value in milliseconds rather than using k_timeout_t requires
the system to perform division at runtime to convert types. This pulls in
the 64-bit soft division code on platforms without hardware for this.
Perform the conversion at build time instead by using the runtime time
directly.
The init_delay field was moved within the _static_thread_data structure to
avoid introducing a hole for alignment on 32-bit systems when using 64-bit
timeouts.
Use SYS_TIMEOUT_MS instead of K_MSEC so that the initial delay can be set
to forever.
Signed-off-by: Keith Packard <keithp@keithp.com>
This PR fixes the espressif esptool to deal with ELF section alignment
which would otherwise create holes in the resulting binary.
Signed-off-by: Keith Packard <keithp@keithp.com>
All of the time_units conversion routines are now macros which means the
test cannot reference them as functions. Instead, create local static
functions which call each one of them and use those instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
To make this macro usable as an initializer for static or global data, it
cannot have struct values within the expression, instead it must compute
the tick value as a primitive value and then wrap that in the struct as the
final step.
Signed-off-by: Keith Packard <keithp@keithp.com>
The intent of this patch is to leave all of the semantics of the macros
unchanged, only replacing the easy-to-read static inline conversion
function with a pile of ?: operators.
Ick. This is not a cleanup. However, what it does enable is using constant
results while initializing global variables, which cannot be done with
either static inline functions or even statement expressions, even when
those generate constant results.
Signed-off-by: Keith Packard <keithp@keithp.com>
Alignment of the message queue's ring buffer is not necessary.
The underlying implementation uses memcpy (which is
alignment-agnostic) and does not expose any internal pointers
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Fix wrong debug message when port B of tachometer is captured.
Signed-off-by: Evan Chang <MCCHANG1@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
On Intel boards (like intel_ehl_crb and intel_rpl_s_crb) for the
trylock_test some part is executed very fast and since there is no
synchronization, there might be situation when there is no
trylock_failures. Increasing time spend in this part fixes the issue.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Re-add the `WIFI_MGMT_FORCED_PASSIVE_SCAN` option removed in #62751.
Now that `struct wifi_scan_params` is a reasonable size, we can enforce
the passive scan request even when no parameter struct is supplied by
the user.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Instead of providing a comma seperated list of SSIDs, provide the SSIDs
individually. This substantially simplifies the implementation.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Update the storage type of the SSID strings to pointers to the strings,
instead of needing to copy the strings into the struct. This
substantially reduces the parameter struct size.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Fix bug in timeout_expired() function. Coap client was resending
pending messages after 500 ms (COAP_PERIODIC_TIMEOUT) and didn't
wait for retransmission timeout.
Use 64-bit k_uptime_get()
Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
net_context_foreach() is not a systemcall, therefore should not be used
from userspace threads. Usage of this API made SO_REUSADDR/SO_REUSEPORT
userspace tests unfunctional (crashing).
Fix this by using CONFIG_NET_TCP_TIME_WAIT_DELAY instead for tests that
involve TCP connections. Other tests don't really need to wait as
there's no teardown delay on UDP or unconnected TCP contexts.
Additionally, remove the platform exclude for qemu_x86 platform, as this
was the sole reason the tests were crashing on that platform.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Hides types in the IEEE 802.15.4 net_mgmt sub-API that are of no public
interest and improves documentation of the remainder.
All constants that are not meant to be used by applications have been
hidden. Only the API actually being of relevance to application
developers is now publicly visible and documented.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Hides types in the IEEE 802.15.4 driver sub-API that are of no public
interest and improves documentation of the remainder.
Apart from extending and clarifying many details of the driver API, this
change also specifies certain formal properties of API calls, such as
"sleeps" or "isr-ok". Plus it removes semantic ambivalence that had been
resolved and hidden in existing implementation details but is highly
relevant to the way the API can be used and shall be implemented.
As far as possible this change introduces formal requirements language
(MAY, SHALL/MUST, SHOULD) to specify driver implementation requirements.
This change also introduces two definitions - for the moment being of
purely documentary relevance (i.e. to be referred in the documentation):
* IEEE802154_CONFIG_RX_SLOT_NONE
* IEEE802154_CONFIG_RX_SLOT_OFF
These "magic" values are required to clarify the exact semantics of RX
slots as to receiver activity.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Hides types used in the IEEE 802.15.4 L2 sub-API and L2-internal APIs
that are of no public interest and improves documentation of the
remainder.
The changes are mostly minor as the API documentation had already been
improved and clarified in previous changes. Also includes non-visible
documentation to the subsystem-internal Frame API by adding references
to the specification.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Integrates and cross-references OpenThread and native IEEE 802.15.4 docs
as they share a common driver layer.
While OpenThread is of course not an IEEE 802.15.4 subsystem API it is
still included in the ieee802154 documentation group, purely for
convenience to the documentation readers.
For organizational purposes OT is considered a separate area of
maintenance and therefore keeps its dedicated documentation page - but
the two subsystems now cross-reference each other for convenience.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Improves the API documentation including it's structure and integration
into the Zephyr documentation.
Previously the API status of the IEEE 802.15.4 API (and its sub-APIs)
was unclear.
This change adds three APIs in an "unstable" state:
- IEEE 802.15.4 L2 for subsystem developers
- IEEE 802.15.4 drivers for driver developers
- IEEE 802.15.4 net_mgmt for application developers
The corresponding APIs are documented at a group level.
These sub-APIs need to be separately versioned as they have different
audiences, change velocities and levels of stability.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Write documentation for conn_mgr and its subsystems, especially
guidelines for writing connectivity implementations
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Connectivity event enum type was erroneously named
net_event_ethernet_cmd.
This PR corrects the name to net_event_conn_cmd.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Update Zephyr fork of MCUboot to revision:
ae2aeedfe8bb66f7fdddc25271689144d3579959
Brings following Zephyr relevant fixes:
- 268433e zephyr: Allow user-defined boot serial extensions
- 50f8b5f bootutil: Add shared data support for XIP with revert
mode
- 8d0b35a bootutil: Add mode for XIP with revert
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Refactor the codec_cfg_get_freq function to return the assigned
numbers value, instead of a converted value, but with
support for converting the value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For asymetrical features there needs to be a separate mechanism to
unmask features in peer. This must be used in central for unmasking in case
of 'unsupported in peer' condition for CIS Create.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
If a CIS create is requested prior to having a complete feature exchange
the central will initiate a feat exch before enqueing the CIS create.
IF then the feature exchange results in peripheral NOT supporting
CIS create the central needs to allocate an RX node for the NTF
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
The previous ASSERT_TRUE/FALSE macros looked like
they could take extra printf like parameters but did not
(those extra arguments were just dropped).
Define 2 new macros that can take those extra parameters
and fix all uses that intended to print those extra messages.
Also add an extra "\n" as the underlaying print functions
do not add end of lines on their own.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This ASSERT_TRUE should have been an assert equal
(ASSERT_TRUE checks that the first paramters != 0)
and the condition was not correct.
Fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Added tests for the bindesc subsystem, testing definition of
binary descriptors on several qemu architectures, and using
several C standards (c99, c11, etc.).
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Added the bindesc command to west, for working with binary
descriptors. Currently it supports dump, list and search
subcommands, for bin, hex, elf and uf2 file types.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Binary descriptors are data objects stored at a known location
of a binary image. They can be read by an external tool or image,
and are used mostly for build information: version, build time,
host information, etc.
This commit adds initial support for defining such descriptors.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>