The FW loader reports and manages exactly two slots:
- slot 0: this is the slot for the application code to update
- slot 1: this is the slot, in which the FW loader is placed
The slot 1 is reported, so tools can fetch metadata about the
FW loader installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.
This change correctly identifies the slot 1 as an active one, marking it
as used and blocking erase operation on that slot.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Adds `test_null_pointer_access` to verify that attempting to write to a
null pointer (address 0x0) correctly triggers a fatal error, confirming
the Physical Memory Protection (PMP) guard functionality.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Currently, clk_div_factor is force to 1 if user request more than 110MHz.
However, in this case, gspi_siwx91x_get_divider() will never return 2 or
more, unless the input clock is >= 220MHz. The si91x is not designed for
such high clock frequency. So, this case has never been tested.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In gspi_siwx91x_config(), clk_div_factor can't be < 1. Therefore, we can
remove the dead code.
This code has been tested with tests/drivers/spi/spi_loopback, with a PLL
clock configured to 160MHz and a bus clock to 80MHz with success. I have
not found the case where change in GSPI_CLK_CONFIG are required.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Until now, GSPI_DATA_SAMPLE_EDGE was enabled as soon as the user requested
> 40Mhz (even if the actual frequency was in fact 40Mhz). However, at 40MHz
and at 80MHz, use of GSPI_DATA_SAMPLE_EDGE generated read errors on the
last bit of the transaction:
Buffer contents are different:
[...],0xaa,0xaa,0xaa,0xaa,
vs:
[...],0xaa,0xaa,0xaa,0xab,
I have not found any case where GSPI_DATA_SAMPLE_EDGE is useful, so this
patch just remove this parameter.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In functions requiring to lock/release resources, it is less error prone to
have only one exit point and user goto to manage errors.
The behavior of the new code is exactly identical to the initial one.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add myself alongside @seankyer and @tomi-font as the engineers
involved in development of this backend.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
The option CONFIG_I2C_DUMP_MESSAGES_ALLOWLIST should automatically be
turned on if the depedencies are satisfied.
Signed-off-by: Keith Short <keithshort@google.com>
Use the newly added API to get specific type of stats (if supported) but
also keep the backwards compatibility.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
nRF70 queries FW to fet the stats, use the new stats API and filter FW
query depending on the type.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add a new API that takes stat type, the networking stack only needs
NATIVE stats per-packet, it doesn't need to update vendor stats
per-packet. This saves unncessary exchanges in case driver needs to
query the firmware for the vendor stats.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add required CMake directives to enable working CONFIG_SRAM_VECTOR_TABLE=y
on STM32F0 series when CONFIG_CMAKE_LINKER_GENERATOR=y.
Builds OK with both ZEPHYR_TOOLCHAIN_VARIANT undefined (uses GNU toolchain
from Zephyr SDK) and set to "iar" (uses IAR toochain from EWARM v9.70.1).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
In 55c49cdb8f the mayority of the
Zephyr wifi drivers was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
will fail to build.
Note that the net_offload struct was updated accordingly in
d45cd6716b
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types. This comment was fogotten.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In b5588ed684 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Note that the net_offload struct was updated accordingly in
d45cd6716b
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In e6daacf3c9 the mayority of the
Zephyr ethernet drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When running the samples/sensor/accel_trig sample with a adxl345 sensor
the logged output values were doubled compared to the expected values.
The sensor_channel_get() path calls adxl345_accel_convert which did not
handle the configured g-range, resulting in invalid sample values except
for the +/-16g range. To fix this issue the configured range is taken
into account and different conversion factors are applied.
adxl345_accel_convert is also made static. It is not used by another file.
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
Like other devices, the USBPHYC should be disabled by default. Add missing
property `status` with value `disabled` on the node in DTSI.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The RPU0 mailbox node in `zynqmp_rpu.dtsi` used incorrect IPI
message buffer base addresses. According to UG1085 (Table 13-3)[1],
RPU0 should use the channel 1 message buffer region at `0xFF99_0080`
for local request/response and `0xFF99_0400` for remote request/
response. The previous values pointed to the APU channel 0
buffer (`0xFF99_0200`), which does not match the hardware mapping.
The same is true for rpu1.
The IPI buffer base looks something like this:
IPI1 - 0xFF990000
IPI2 - 0xFF990200
IPI0 - 0xFF990400
Fix the DTS by updating the RPU0, RPU1 mailbox nodes to use the correct
base addresses from the documentation.
[1] https://docs.amd.com/v/u/en-US/ug1085-zynq-ultrascale-trm
Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
Signed-off-by: Harini T <harini.t@amd.com>
gcc complains about the posibility of ret and gfn being used
unitialiazed (with the input npages == 0).
Let's fix it by initializing ret to 0.
The warnings being:
```
zephyr/CMakeFiles/zephyr.dir/drivers/xen/gnttab.c.obj
In file included from include/zephyr/logging/log.h:11,
from drivers/xen/gnttab.c:31:
include/zephyr/logging/log_core.h: In function 'gnttab_get_pages':
include/zephyr/logging/log_core.h:221:9: warning: 'gfn' may be used
uninitialized [-Wmaybe-uninitialized]
221 | z_log_minimal_printk("%c: " fmt "\n", \
| ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:202:19: note: 'gfn' was declared here
202 | xen_pfn_t gfn;
| ^~~
include/zephyr/logging/log_core.h:221:9: warning: 'ret' may be used
uninitialized [-Wmaybe-uninitialized]
221 | z_log_minimal_printk("%c: " fmt "\n", \
| ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:199:13: note: 'ret' was declared here
199 | int ret;
| ^~~
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add more information to network packet filter documentation to
make it more useful to end users.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When clock get_rate() is called, return by default the calibrated
frequency instead of nominal one. This improves accuracy specially
when internal RC SLOW clock is used.
To guarantee that nominal values can be still be retrieved, add a
new type of clock subsys for such scenario.
west.yml is also updated to add fix into calibration sources.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
According to the docs the millis were in the format `.SSSSSS`. In
reality though, it only accepted exactly `.SSS`, not `.SS` or `.SSSS`
and specifically also not `.SSSSSS`, contrary to the docs. Further, it did
not fail with an error message but simply produced the wrong value.
With this change it accepts everything from `.` to `.SSSSSS` and
produces the correct result. This is compatible with the previous
behavior, with the documentation and with everything in between.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
The as6221 is functionally equivalent to ti tmp108 and ams as6212,
so it is added as a new variant of tmp108.
Signed-off-by: Atilla Filiz <atilla@fi-tech.be>
Don't quote the section names provided to Z_GENERIC_SECTION: the macro
already performs stringification on our behalf.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
bcec3bd04b introduced some of the
non-native API names back into this module. Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Also build the latency monitor support code.
As a sideeffect, we run out of bits in the kernel objects per thread
permissions tracking field. So let's increase it to 6 bytes.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This subsystem does not use the POSIX_API, and the sample only used one
call to the POSIX API to close a socket instead of using the native
networking API.
Let's just use the native networking API, so we avoid pulling-in more
dependencies.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In d45cd6716b the mayority of the Zephyr
networking code was changed to use the Zephyr native net_/zsock_
prefixed types, but some symbols were forgotten.
Let's change them.
Without these fixes/changes the code still builds in most cases as we are
by now setting CONFIG_NET_NAMESPACE_COMPAT_MODE.
But when this is not set, things will fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- split stepper api into stepper and stepper_drv api
- stepper api now comprises only of motion control apis
- stepper_drv api comprises of apis for configuring stepper
drivers
- add documentation about stepper and stepper_drv api
- move stepper.rst in a dedicated stepper folder
- add information about stepper_drv api and relevant functions
in stepper documentation.
- drop motion control functions from all the stepper_drv drivers
- create a common a library for controlling stepper motors by
toggling gpios via h-bridge or step-dir stepper_drivers
- tmc5xxx devices are a combination of motion controller and
stepper driver devices. tmc5xxx devices need to be modelled as
mfds in order to address the split in stepper driver subsystem
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
zephyr,random-mac-address defaults to 0 or 1, which is always
available in generated code. so we can use the value itself.
Signed-off-by: Sven Ginka <s.ginka@sensry.de>
802.15.4 specifies that a device may send a DATA_REQUEST command to the
coordinator after waiting for "macResponseWaitTime", starting after the
acknowledgment to the association request command.
This change adds support to generate DATA_REQUEST frames and sends one
for the association usecase only. The two other usecases, for MLME-POLL
or for beacon-enabled PAN, are not yet supported.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Remove selecting `CONFIG_HAS_HW_NRF_RADIO_IEEE802154` that should be
generated from DTS based on the SoC selection.
Signed-off-by: Michał Grochala <michal.grochala@nordicsemi.no>
Extend the counter_basic_api tests with a dedicated configuration that
enables the MCUX LPTMR driver in alarm mode.
The new testcase:
- Selects CONFIG_COUNTER_MCUX_LPTMR_ALARM
- Runs the existing counter_basic_api suite against nxp_lptmr devices
when built for a board that instantiates the LPTMR
This verifies that the alarm-only LPTMR configuration passes the common
counter API tests without relying on the TOP callback feature.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The counter alarm irq shall set the match value
to the max top value after stopping the timer, otherwise
the next start of the lptmr counter may shortly match the
the previous match value thus cause test_valid_function_without_alarm
run failed.
Signed-off-by: Holt Sun <holt.sun@nxp.com>