This change adds `k_cycle_get_64()` on platforms that
support a 64-bit cycle counter.
The interface functions `arch_k_cycle_get_64()` and
`sys_clock_cycle_get_64()` are also introduced.
Fixes#39934
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The commit adds missing static to the zephyr_smp_alloc_rsp
function definition; it also reorders some of definitions
and removes no longer needed block of forward declarations
of functions.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This change organizes the file structure for the shell.
Files implementing backends are moved to a separate folder.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The mesh shell module owns the composition data for the shell
application, which makes it impossible to use it outside of the
application itself. To support the shell as a generic debugging
component that can be added to any application, we have moved the
composition data out of shell.c, and into the application.
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Add spinlock unlocking before calling timer expiration
handler. Locking was introduced by dde3d6c.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Kconfig USB_DEVICE_REMOTE_WAKEUP option depends only on
USB device controller capability, but is not controlled
by the USB device controller drivers configuration.
Move USB_DEVICE_REMOTE_WAKEUP option to drivers and
make it promptless.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
USB_SCD_ATTRIBUTES is a configuration dependent macro
that does not map any part of the spec and does not
belong to usb_ch9 header.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
bt_ccm_encrypt only works when encrypting in place. To fix this
ccm_auth() inside bt_ccm_encrypt() must take plaintext instead of
enc_data, to not rely on assumption that plain and cypher data are the
same memory.
Signed-off-by: Ilya Makarov <ilya.makarov.592@gmail.com>
Fixes: #40069
Even if not used DMA HAL is required in L4/F7 SD HAL driver.
Add them for these specific series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Change the wording of the warning printed when there is no entropy to
hopefully remove any doubt that there might be security in TLS without
an entropy source. TLS connections with insufficient entropy are
trivially decodable, and should not be relied on for any type of
security.
Signed-off-by: David Brown <david.brown@linaro.org>
Disable CAN bus tests since can1 is disabled by default due to an IRQ
conflict with the USB controller.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix missing auxiliary context release when reception of
Periodic Advertising Chain PDU fails due to header complete
timeout, i.e. no reception of on-air PDU. Also, fix missing
generation of auxiliary reception failure notification when
no auxiliary context was allocated for chain PDU reception.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adjust the Doxygen theme (based on doxygen-awesome) to match the Sphinx
theme. While not perfect, the experience should now be more consistent.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Make it clearer that the listed BLE controller hardware/peripheral
requirements concern the Nordic Semiconductor implementation only,
in the Bluetooth guide.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
This commit adds shell commands for the reset cause API
- show: show the persistent reset cause
- clear: clear the persistent reset cause
- supported: list all supported reset causes
Signed-off-by: Alexander Wachter <alexander.wachter@leica-geosystems.com>
This commit changes the shell argument name from shell to sh
to satisfy the warning
"Violation to rule 5.7 (Tag name should be unique) tag: shell"
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".
The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).
The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The previous bf68b67 commit incorrectly passes minfo.mdm_rssi
value to the modem context data_rssi member during the driver
initialization which causes the `modem info` shell command
to return 0 as RSSI value. Fix that by changing data_rssi
modem ctx member to a pointer that is assigned to the RSSI
variable stored within the modem driver context structure.
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
When an CIS is connected, the peripheral did not have
any information about the QoS settings. This commit
adds information about the PHY and SDU. For some reason
the peripheral won't ever have information about the RTN.
The remaining values in the event (interval, delay and
latency) are still not exposed, nor is framing or
packing, the latter of which are not part of the event.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
As the already existing macro K_MEM_SLAB_DEFINE results in
two variable definitions, the preceding static modifier leads to
a seemingly working solution, though linkage conflicts will occur
when the same memory slab name is used across multiple modules.
The new K_MEM_SLAB_DEFINE_STATIC macro duplicates the functionality of
K_MEM_SLAB_DEFINE with the difference that the static keywords are
internally prepended before both variable definitions.
The implementation has been tested on my Zephyr project (the build
issue faded out). The documentation has been updated altogether
with all incorrect occurences of static K_MEM_SLAB_DEFINE.
Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
add ledc to board dtsi file,
change compatible and device define in pwm driver,
add yaml for board ledc support,
fix missing include for board in gpio include
Signed-off-by: Andrei-Edward Popa <andrei_edward.popa@upb.ro>
Document our policy regarding multi-line strings in devicetree
bindings which has been enforced starting with this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/36189
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit makes absolutely no change to the output unless debug is
manually turned on. Debug can be turned on with this other code change:
--- a/boards/xtensa/intel_adsp_cavs15/tools/logtool.py
+++ b/boards/xtensa/intel_adsp_cavs15/tools/logtool.py
@@ -45,7 +45,7 @@ def main():
else:
etrace = QEMU_ETRACE
- l = Loglist(etrace)
+ l = Loglist(etrace, True)
l.print()
Below are two examples of the new debug output. For instance the empty
and duplicate (due to a bug) slot [33] is now much more obvious:
}; {[31] : 1434444: ssp_set_config(),
}; {[32] : 1485591: ssp_set_config(),
}; {[33] : }; {[33] : 1539091: ssp_set_config(),
In this other example it is now much clearer that [7] misses a
`\n` newline:
}; {[6] : 858361: starting dma_trace_init_complete()
}; {[7] : dma_tr_...() ret=0[00000005] <inf> main}; {[8] : ipc_dma..()
}; {[9] : entering dma_trace_enable
}; {[10] : entering dma_trace_buffer_init()
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Unlike logtool.py, adsplog.py is not shielded from corrupted log data.
Lenghten the error message a bit and be more transparent about the
"invalid slot 0 => ADSP reset" assumption because it is usually but not
always true.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When CONFIG_IO_STRICT_DEVMEM is set the logger script fails with a
cryptic `OSError: [Errno 22] Invalid argument`. Print a clue and
re-raise the OSError.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The mismatch between the slot number and the sequence ("id") made me
suspect a bug for too long. Fix one related comment and add two more. No
code change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add GigaDevice ISP console flash runner. This tool enable uses ROM
bootloader to flash devices using serial port.
The GD32_ISP_Console tool can be found at
http://www.gd32mcu.com/download/down/document_id/175/path_type/1
Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
Changed pwm_pin_set_cycles into pwm_pin_set_nsec
to decrease power consumption. Changed default
value for period to 100000. There is no need in having
period for pwm leds equal to 100 cycles as human eye has ~100 fps.
Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
Fixed compilatione error when shell sample has been build with flag
CONFIG_SHELL_VT100_COMMANDS set to n.
Fixes: #40124
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
net: lwm2m: When mbedtls CONFIG_MBEDTLS_SERVER_NAME_INDICATION is
enabled, a destination hostname must be passed to socket to properly
connect do lwm2m server.
Passing lwm2m context to lwm2m_parse_peerinfo
Signed-off-by: Jair Jack <jack@icatorze.com.br>
_handle_device_abort is only called in one place and it basically does
two instructions. Just remove it.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
On smp environment, we cannot do device power management based only on
the state the current core. For example, do not suspend devices if
there are other cores active, or resume devices if there are other
cores already active.
This change ensure that devices are only suspend when the last active
core become idle and that these devices are resumed only when the first
core becomes active.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Instead of returning PM_STATE_ACTIVE for when the cpu didn't enter a
low power state and a different state when it entered, but has
already left the state and is active again, it changes
pm_system_suspend to return true when the cpu has entered a low power
state and false otherwise.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Each CPU can have its own set of states. Update the policy to get them
from DT and account it when return the best state to the kernel.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>