Ambiq UART requires specific busy wait during initialization for
propagating powering control registers, original k_busy_wait()
used here generated a dead loop because k_busy_wait() relays on
timer, who's driver is initialized after UART(UART init in
PRE_KERNEL_1, timer init in PRE_KERNEL_2), replace k_busy_wait()
with checking power status register is more suitable here.
Signed-off-by: Bryan Zhu <bzhu@ambiq.com>
The float_apis group is incorrectly placed in x86/32 header.
This should be in kernel.h enclosing k_float_* functions.
So move it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The `mikroe_mini_m4_for_stm32` board doesn't have its RTC node
enabled, and is failing the following test:
`tests/benchmarks/footprints/benchmark.kernel.footprints.pm`
This board seems to have been missed out from 44b8370, let's
enable the rtc & clk_lsi here.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This can be used to interpret the "status" in the disconnect result event.
To start with a few common reasons are enumerated but can be extended in
the future.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This can be used to interpret the "status" in the connect result event.
To start with a few common reasons are enumerated but can be extended in
the future.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
If observed resource was written during the pMin period, it did
not schedule any wake-up event into the future. Notify message would
then only be generated as a result of any other (like Update) event.
Refactor check_notifications() to follow same pattern as retransmit_req().
Return the next event timestamp, which could be now.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Automatic Wi-Fi station reconnection is forced even when
application requests disconnection. This PR adds a check
in the disconnection event reason to decide whether or not
perform the reconnection.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Make sure that the flash partition is valid.
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Print a finished message, so that it is clear that this in the end
of the sample. This makes it certain that we didn't crash without
output on the last test.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Stop erasing outside of the test partition.
We shouldn't really on this being accesible memory.
This region may be consider as secure when application is non-secure.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable the TF-M NS storage partition for nordic boards.
This partition is otherwise not used, and configured as secure.
Fixes: #59376
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add `compatible` node to Ambiq SoCs, along with secondary common compat,
since they share many similarities.
Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
As the display API now check against valid callback functions and
returns -ENOSYS (or equalent), there is no need to provide
such functions in the driver code
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
The FTM counter modulo register (MOD) holds a 16-bit value, but PWM
set_cycles API allows to set 32-bit cycles values.
Fixes#66226
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The arm_core_tz.c trustzone driver was developed by Nordic and was
previously used by Nordic, but it is not used by us any more. Since we
stopped using it I can see that it has bit rotted (the include path
for tz.h is not available), so no else has started using it either
evidently.
Remove the broken and dead code.
We keep the HAS_ARM_SAU Kconfig as it is selected by a myriad of
platforms and determines if __SAUREGION_PRESENT is defined. I have
been unable to prove that this define is also unused.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This fixes missing connection reference release.
The bt_conn_le_create returns the connection object reference that needs
to be released by API caller.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The bt connect and bt connect-name commands should only
attempt to connect to connectable devices that we are not
already connected to.
This commit moves the check for BT_GAP_ADV_PROP_CONNECTABLE
as well as checks that we do not already have a connection
to that device with the current ID.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The is_substring did not work for true substrings, as it
would always compare [0] to [0], so it would return false
for the substring "BC" being in "ABC".
Removed the tolower as it is not necessary and fixes the issue.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix error writing to the CR register on the first call to SPI configure on
NXP MKE1xF. On the first call, the module clock is not enabled and writing
to the CR register will fail.
Fixes: #66036
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The DMA channel data structure can retain config information.
We need to clear this everytime dma_configure is called on a
channel.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Use helper function to convert string to int for appearance value.
This makes the code more clear, as the big-endian conversion function
gives the wrong impression about the byte order of advertising data.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
It's not good to see struct_tags.json change from one build to the next
when nothing changes.
Python's sets are not deterministic, see long story for older commit
f896fc2306 ("scripts: gen_handles: Sort the device handles")
Simply convert multiple_directories to a sorted list before using it.
Fixes commit 80e78208e6 ("kernel: syscalls: no need to include all
syscalls in binary")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Need to do the ENET module-level clock initialization from zephyr
instead of MCUX HAL, because now there are multiple zephyr drivers with
different init priorities that rely on the module being clocked. MDIO
must be initialized before the ENET MAC, and the MAC driver currently
calls ENET_Init from the HAL to initialize the clock, but MDIO needs the
module clock enabled first on some platforms. So replace the MAC init
with ENET_Up from the HAL, which doesn't include clock init, then do
clock init from a higher priority sys init based on the parent
compatible.
Also, add support for enet clock ungating with clock_control_on on ccm
driver do this with current platforms supported.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- PHY can be set up as rmii but still use 25 MHz MDC, add DT property
value for this case
- Fix KSZ8081 driver spamming phy status in debug level logging,
and fix some other state/logging logic
- Fix PHY driver not rescheduling monitor work if first configuration
fails, change code path to use goto for errors
- Handle case where some phys are not using the gpio pins in phy driver
Make GPIO properties of ksz8081 phy optional since these hardware pins
may be unused on some boards
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This macros needed additional checks before invoking
arch_buffer_validate.
- size can not be less then 0. Some functions invoke this macro
using signed type which will be promote to unsigned when invoking
arch_buffer_validate. We need to do an early check.
- We need to check for possible overflow, since a malicious user
application could use a negative number that would be promoted
to a big value that would cause a integer overflow when adding it
to the buffer address, leading to invalid checks.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.
The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the handler of SI Rx event within
the shim driver itself.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Remove the functions linux_socketcan_setsockopt() and
linux_socketcan_getsockopt() as they are unused.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The patch updates README with detailed description of the requirements
regarding target devicetree needed to correctly build the sample.
Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
When commit 5b4f4253c1 introduced
"nordic,qspi-nor" dts binding the sample wasn't aligned to the change.
From that moment the sample started to be filtered out by the Twister.
The patch adds Nordic's compatible to the test filter.
Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>