Enable driver for intel lw uart.
Changes from review:
- refactor spinlock to inside of loop
- use menuconfig for kconfig
- add CONFIG_UART_INTEL_LW_AUTO_LINE_CTRL_POLL
Signed-off-by: Teoh Shi Lin <shi.lin.teoh@intel.com>
When rx_timeout is set to a sufficiently small value,
rx_timeout_slab could potentially get set to a greater
than necessary value that causes spurious UART_RX_RDY
events.
Fixes#62828
Signed-off-by: Jacob Preston <jacob.preston@synapse.com>
add basic sensor support for 3-axis accelerometer, currently
this driver support data acquisition and motion detection
features.
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
The test is currently broken in main and blocking
all other development when triggered.
Let's disable it by now as a provisional measure.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The bstests code builds and executes with the embedded
code, but had a call into "free()" which, when building
the embedded code with an embedded C library lands
in the embedded libC free, while it should
always call into the host libC free.
Fix it by calling thru the appropriate trampoline.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
HAS_DTS has become a redundant option. All Zephyr architectures now
select this option, meaning devicetree has become a de-facto
requirement. In fact, if any board does not provide a devicetree
source, the build system uses an empty stub, meaning the devicetree
machinery always runs.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
By providing a devicetree stub file, we make sure some internal macros
required by devicetree.h are generated in devicetree_generated.h. This
makes sure that systems without devicetree can continue working without
extra ifdeffery.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Exception info dump is a very basic feature so it should IMHO be
enabled by default.
For instance, a simple null-pointer exception in the non-secure app
will not be logged unless this option is enabled.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Because shadow variable warning is turned on, a warning was thrown and
could fail some twister tests that don't use the -W option. This commit
gets rid of the warning.
Signed-off-by: David Corbeil <david.corbeil@dynon.com>
The OSEL bits in ALHASCTL register are present only
in ACE1.5 version - MTL. Platforms ACE2.0 do not have
the OSEL bits. Therefore DAI_ALH_HAS_OWNERSHIP
configuration option should be set only for
particular ACE1.5 version
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Replace & with &&. In that case there is no difference in the
behavior but logical operator should be used here.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Align with native_simulator's upstream main
d32b2504ad2b6d6d541bc71a0f9b16ab7b6a3831
Which includes:
* d32b250 Minor format fix
* 7b4f35b native HW counter: Provide new API to reset and control
* 4f815cb INT CNTLR: Bugfix for more than 32 interrupts
* 1d36254 Provide new 64 version of nsi_find_lsb_set
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In llext_copy_symbols the check after llext_read
was looking the result of llext_seek operation instead
of the read.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Let's make the sync_rtc kconfig depend on the SOC_COMPATIBLE
options which are set both by the real and simulated targets,
so this code works in the same way for both.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a note about requirements for specialized drivers, clarifying the
requirements about using Zephyr APIs.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Do not use timeout for UART callback. The UART IRQ bases on the IDLE
line, so waiting for additional bytes is not necessary and it introduce
additional latency.
Another issue with the timeout is that the UART drivers use sysworkq for
implementing timeout. The sysworkq thread may have lower prio than the
host command thread, which may cause a delay in calling the UART
callback, which gives the semaphore to the HC handler.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
The `BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS` is not expected to generate a
response from the controller, but from the spec:
Normally, no event is generated after the
HCI_Host_Number_Of_Completed_Packets command has completed. However, if
the HCI_Host_Number_Of_Completed_Packets command contains one or more
invalid parameters, the Controller shall return an HCI_Command_Complete
event with a failure status indicating the Invalid HCI Command
Parameters error code.
In practice, this can also be generated if flow control is inadvertedly
turned off during operation. Running `hci_cmd_done` is not correct when
the event happens (as there is no corresponding command buffer), and
`ncmd` should not be returned as this command ignores the semaphore when
sending.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Adds coexistence Bsim test for Opcode Aggregator models using loopback.
The test verifies that the Opcode Aggregator server and client can send
messages to each other on the loopback interface.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Adds coexistence Bsim test for Opcode Aggregator models.
The test verifies that the Opcode Aggregator server and client can be
present and functional when operating on the same device.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Refactors the implementation of the Opcode Aggregator
models to allow them to coexist on the same device.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Instead of strlen() use sizeof() in FL() macro. This way
all the checks are done at compile time instead of runtime.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remove the HWSEM locking around stm32_exti_disable().
The STM32 EXTI driver uses the core-local interrupt mask regsiters on
STM32H7x7 asym. dualcore MCUs. There is no need to lock the HWSEM
guarding the EXTI when accessing these registers.
Some sensor drivers toggle their interrupt mask every time the sensor
triggers the IRQ line. Locking the HWSEM fails e.g. in situations where
one coprocessor serivces the sensor and the other coprocessor sets up
its interrupts initially during bootup. This prevents the sensor driver
from locking the HWSEM and causes a kernel panic on the corresponding
CPU.
Note: The opposing stm32_exti_enable() was already correctly without
locking.
Signed-off-by: Martin Gritzan <martin.gritzan@gmail.com>
Adds a goto statement to ensure that model extensions are registered
in Composition Data Page 1 if it is enabled.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Let's make the nrf rtc kconfig depend on the SOC_COMPATIBLE
options which are set both by the real and simulated targets
so the configuration matches in both cases.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
_k_neg_eagain is there for used in assembly where including
errno.h is not possible. However, the usage in ARM was simply
to assign value to swap_return_value in a C file, which is
no need to use _k_neg_eagain as errno.h can be included.
So change that to use -EAGAIN directly. Saves 4 bytes in
built binaries in rodata.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This fixes an issue where the DFU client could get stuck trying to
transmit a message to servers if the DFU client was misconfigured, for
instance missing application key or network key.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
The call to bt_micp_mic_ctlr_mute_get function will return the value of
mute state in bt_micp_mic_ctlr_cb.mute callback. This fixes invalid
function calls by storing the recent mute state value in the
application.
Fixes: MICP/CL/SPE/BI-01-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
If instantiated models don't have any relations at all, then the
extensions list will be empty. We should allow to disable it at all
to not waste RAM.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The test delegates putting the server socket into listening (i. e.
calling listen() on the socket) to a separate thread, which did have a
chance to run before client attempted to establish TCP connection.
This was not visible before, as we did not reply with RST to a
connection attempt on a closed port, so the connection was eventually
establish after SYN retransmission. But as we do reject such a
connection now with RST, the connection attempt failed. Therefore, a
small delay was added after spawning the server thread, to give it a
chance to configure the server socket.
Additionally, lower the CONFIG_NET_TCP_TIME_WAIT_DELAY value so that TCP
contexts are released earlier, and add a respective delay in the test
teardown function. Not doing so also triggered unneeded SYN
retransmissions, as there were no enough TCP context to accept the
incoming connection, before freeing the resources allocated for the
previous one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add Kconfig option to control TCP RST behavior on connection attempts on
unbound ports. If enabled, TCP stack will reply with RST packet (enabled
by default).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Send RST as a reply for unexpected TCP packets in the following
scenarios:
1) Unexpected ACK value received during handshake (connection still open
on the peer side),
2) Unexpected data packet on a listening port (accepted connection
closed),
3) SYN received on a closed port.
This allows the other end to detect that the connection is no longer
valid (for example due to reboot) and release the resources.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a helper function which allows to send a RST packet in response to
an unexpected TCP packet, w/o associated connection or net context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This contribution addresses the support for various types of modems in
gsm driver. As some 4G modems have failed to return correct output
from AT+CREG?, so AT+CEREG? is the right AT command in such situation.
This commit provides the possibility for user to select one type of
AT command. This PR fixes zephyrproject-rtos#63917
Signed-off-by: Tahir Akram <mtahirbutt@hotmail.com>
This patch contains small refactor of lpsram init function (defines
registers and adds new macro).
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.
Fixes#64012
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When objects are initialized, empty strings should be set to length of
zero, instead of length of the full buffer.
So use INIT_OBJ_RES_DATA_LEN() to give both, the buffer size and data
length.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When resource instances are initialized, we must calculate
beginning of the data buffer using the index and maximum
data length. Otherwise buffers would overlap with previous.
Fixes#64011
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
As the lwm2m_registry.c and specificly lwm2m_set()
functions already ensure null-terminator on string and
count that into string lenght, the content type handlers
should do the same.
When string is written, strlen()+1 is the data length.
When string is read, use the data length, so we don't
leak uninitialized strings. If buffer overrun have
removed the null-terminator the strlen() migh be larger
than data_len.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>