The ADC should be calibrated on init, there is no requirement
to calibrate ADC again on stm32_temp_init, remove it.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Keys' order - bn, n - might differ from the default due to
Length-First Map Key Ordering rules.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Regenerates the encoder and decoder. Treats integers and floating-point
values as separate entities instead of saying that those are numerical
values. Brings some memory savings.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Makes possible to write an empty CBOR array if there are no SenML CBOR
records that needs to be written. This came up when trying to delete a
portfolio object instance.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
With LwM2M v1.1 SenML CBOR is preferred over SenML JSON.
TLV is on by default only with v1.0.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
The peripheral is configured to update the connection
parameters for 5 seconds by default.
There is an abnormal situation with a very low probability.
The central actively disconnects or abnormally disconnects the
Bluetooth connection at the same time.
At this time, the connection disconnection event will be
handled by BT RX.
At this time, sysworkq has sent a parameter update request and
will receive a reply with status = 0x02, because the handle is
invalid at this time.
We can not just cancel work, because work->flag may be
in K_WORK_RUNNING, so work->flag is set to K_WORK_CANCELING
and subsequent conn_cleanup will unable call k_work_rescheduler
successfully.
According submit_to_queue_locked will return ret = -EBUSY.
if (flag_test(&work->flags, K_WORK_CANCELING_BIT)) {
/* Disallowed */
ret = -EBUSY;
As a result, the connection cannot be cleanup correctly.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
The NAPOT mode isn't computed properly in qemu when the full address
range is covered. Let's hardcode the value that the qemu code checks
explicitly until the appropriate fix is applied to qemu itself.
For reference, here's the qemu patch:
https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00961.html
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
QEMU does its dynamic instruction translation in 4096-byte-sized chunks.
Therefore it doesn't vet PMP access for each instruction prefetch but
for the whole "page" at once. If the end of the ROM area lands in the
middle of such a page with a corresponding PMP entry then any instruction
access within that page will fault even if it is located in the PMP
mapped portion.
To work around this QEMU peculiarity, we simply align the end of the ROM
area to a page boundary.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Overall diffstat with the new PMP code in place:
18 files changed, 866 insertions(+), 1372 deletions(-)
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add the appropriate hooks effectively replacing the old implementation
with the new one.
Also the stackguard wasn't properly enforced especially with the
usermode combination. This is now fixed.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The idea here is to compute the PMP register set on demand i.e. upon
scheduling in the affected threads, and only if changes occurred.
A simple sequence number is used to stay in sync with the latest update.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Stackguard uses the PMP to prevents many types of stack overflow by
making any access to the bottom stack area raise a CPU exception. Each
thread has its set of precomputed PMP entries and those are written to
PMP registers at context switch time.
This is the code to set it up. It will be connected later.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This is the core code to manage PMP entries with only the global entries
initialisation for now. It is not yet linked into the build.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Extend sample to show how to use alternative approach of adding
subcommands using new APIs: SHELL_SUBCMD_SET_CREATE, SHELL_SUBCMD_ADD
and SHELL_SUBCMD_COND_ADD.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added test for new macros in the API for adding subcommands:
SHELL_SUBCMD_SET_CREATE, SHELL_SUBCMD_ADD and SHELL_SUBCMD_COND_ADD.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added macro SHELL_SUBCMD_SET_CREATE which creates a set of subcommands.
SHELL_SUBCMD_ADD and SHELL_SUBCMD_COND_ADD can be used from any file to
add command to the set. This approach allows to have subcommands added
from multiple files.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix the descriptions for the ST STM32 FDCAN devicetree bindings. These
are derivates of the Bosch M_CAN, but they target specific SoC
implementations.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Rename the base Bosch M_CAN CAN-FD controller devicetree binding to
match the product name and the upstream Linux devicetree binding.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fold the simple bosch,m-can devicetree binding into the front-end
devicetree bindings. The bosch,m-can compatible is not used in Zephyr.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Change the default initialization priority for CAN transceiver from 70 to
45 to initialize them before the CAN controllers (with default a
initialization priority of 50).
Fixes: #45219
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
MDB debugger may modify debug_select and debug_mask registers
on start, so we can't rely on debug_select reset value.
Let's set correct value on primary CPU without reading initial
value from debug_select.
Internal ID: P10019563-50516
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Client jump to full registration state if registration update fail.
Update keep already opened DTLS session.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Enabled DTLS session cache for support session resume.
Fixed LwM2M queue mode for close connection and reconnect automatically.
Re-connect will do Registration update before it send queued data.
Session resume is helping a case when NAT change address and cause less
network traffic.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
When sending 2 or more confirmable message before first one is
writed to socket all messages use same coap pending structure.
Now coap_pending_init() set data pointer which lock allocation
by each call.
Using data pointer for detecting free is more stable than timeout.
Timeout is initialized only before first socket send. Queued packet
may be triggered later than other and may cause that same block is
allocated multiple time.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
This commit adds the MAINTAINERS entry for the Toolchain Integration,
with @tejlmand as the maintainer and @stephanosio as a collaborator.
The purpose of this is to provide a corresponding MAINTAINERS entry for
the "area: Toolchains" and differentiate the toolchain integration-
related maintenance tasks from the general build system maintenance
tasks.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Fix Broadcast ISO and Synchronized Receiver project
configurations related to IPC use.
Relates to commit cf6a58d3f6 ("bluetooth: hci: rpmsg:
use ipc service library").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This change is controlling of function parameters before
configuring the STM32_DMA_HAL_OVERRIDE mode.
Then, in case the DMA channel is not valid (wrong ID) or busy,
an error occurs before overriding the DMA channel.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fixing a bug where get_regs() was being executed before MMIO mapping
moving the declaration of reg_base after DEVICE_MMIO_MAP
Signed-off-by: Esteban Valverde <esteban.valverde.vega@intel.com>
Consolidate the initialization routines and change the include guard to
conform with the coding guidelines as a preparation for the following
commits which add support for the SPI interface.
Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
This fixes the constant for the mem page and replaces a
magic number with the already defined `BME680_LEN_COEFF2` constant.
Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
Because Minimal LIBC doesn't have PRIuFAST32 and PRIxFAST32 which is
needed when printing traces in zcbor.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
PWM has a single set function now, macros like PWM_USEC() can be used to
specify other units than nanoseconds. This conversion was missed during
API updates.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The pwm field in struct args_index was missed when pwm was renamed to
channel in all drivers. As a result, the PWM shell could no longer be
built.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit adds the indentation style for the C++ source and header
files.
Note that the C++ indentation style has been configured to match that
of the C files because the C++ source files we currently have in the
Zephyr repository follow the style we enforce for the C files.
In the future, it may be preferable to follow the indentation style
recommended by one of the common C++ style guides, such as the Google
C++ Style Guide which recommends 2 spaces for indentation.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit updates the maximum line length for the commit messages
from 72 to 75, in order to align with the checkpatch and gitlint
policies.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>