Commit graph

92655 commits

Author SHA1 Message Date
Thomas PUJOLLE 6147589fbf Boards: Shell stack size for Silab's efm32xg24
Set to 4096 to prevent stack overflow while running BT Shell

Signed-off-by: Thomas PUJOLLE <TPU24175@open-groupe.com>
2024-03-20 07:56:45 -05:00
Sylvio Alves 31125f7177 boards: esp32xx: remove minimal libc default config
Let picolibc be the default for the second core
as it is not mandantory to use minimal libc.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-03-20 07:56:17 -05:00
Nithin Ramesh Myliattil 139a40098b Tests: Bluetooth: Host: update rpa expired bsim to cover more use cases
rpa expired bsim is refactored so that every rpa rotation, one of
the adv set belong to an adv_id returns false based on adv_index.
In turn all adv sets under the same adv_Id continues with old rpa.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-03-20 07:55:49 -05:00
Sylvio Alves e48fe49a70 soc: esp32s3: appcpu: add sram dts information
Make sure SoC has defined RAM size.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-03-20 07:55:09 -05:00
Tomi Fontanilles f1fdf461f2 samples: net: cellular_modem: set a RCVTIMEO to echoed packets
So that the sample does not get stuck forever waiting
for an echo packet that will never come.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-20 07:54:44 -05:00
Tomi Fontanilles 9fe86b7dfe samples: net: cellular_modem: improve nRF9160 DK configurations
- Async UART would start receiving some data incorrectly
  without HW RX byte counting at baud rates above 115200.

- Increase the UART buffer sizes to be able to receive
  whole UART TXs of 1500 bytes sent by SLM at once.

- Remove the Kconfig items whose definition is now redundant.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-20 07:54:44 -05:00
Torsten Rasmussen 9104afa069 cmake: change check_init_priorities target into a post build command
Fixes: #70359

Remove check_init_priorities target and instead create a post build
command and place the post build command on native_runner_executable, if
that target is the final target, else use the normal post build list for
Zephyr build target.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-20 07:54:06 -05:00
Mateusz Michalek e0b748a6ce dts: arm: nordic: nrf54l15 write block size
write-block-size correction.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-03-20 07:53:03 -05:00
Johan Lafon 69648c17d7 cmake: dts: look for allowed dts overlays file presence in board/
Hardware model v2 allows the usage of <board>_<revision>.overlay and any
valid <board>_<identifier>_<revision>.overlay dts overlays in the board/
directory but CMake was only looking for the most specific
<board>_<identifier>_<revision>.overlay overlay file.

This commit allows CMake to look for the presence of any allowed overlay
file to fix this issue.

Tested by building the hello_world sample with the Olimex board
lora_stm32wl_devkit revision C.

The following line wasn't appearing before in build log and now does:
"-- Found devicetree overlay: <path>/olimex_lora_stm32wl_devkit_C.overlay"

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2024-03-20 07:39:46 -05:00
Flavio Ceolin e2058a9537 pm: Fix a corner case when policy returns NULL
When the policy returns NULL pm_system_suspend was assuming that
the current state in z_cpus_pm_state was ACTIVE, since that is the
state set after the core wakes and return to this function. The
problem is that in cases where the cpu does not preserve the context,
and returns to this function, z_cpus_pm_state has the value of the
last state used and the cpu use it again.

Fix it setting z_cpus_pm_state to ACTIVE every time the policy returns
NULL.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-03-20 07:38:56 -05:00
Benedikt Schmidt 370c977b4e tests: drivers: build_all: sensor: add sensors of MAX31790
Add instances for the senors of MAX31790 to the
build all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00
Benedikt Schmidt 04f38ffba2 drivers: sensor: add sensors for MAX31790
Add sensors for fan speed and fan fault for the PWM
controller MAX31790.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00
Benedikt Schmidt 961c985ee4 drivers: pwm: split up driver for MAX31790 into a MFD
Split up the driver for the PWM controller MAX31790
into a multi function device driver.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00
Carles Cufi 68eb97ea05 doc: add board terminology section to board porting guide
Add a terminology section to the board porting guide.
This provides a single location where terminologies used for boards can
be found and linked to.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-03-20 13:00:55 +01:00
Tomasz Moń d05d51d869 samples: bluetooth: hci_usb: Use common USB sample initialization
Convert hci_usb sample to use common USB sample initialization code.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-03-20 12:34:46 +01:00
Gerard Marull-Paretas db23787537 boards: nordic: nrf54h20dk: enable nrfutil
Board can be programmed using nrfutil.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-20 11:35:47 +01:00
Gerard Marull-Paretas 78706dffdb scripts: west_commands: runners: nrf_common: update nRF54H support
nRF54H can only be flashed using nrfutil now, so some workaround present
in the nrf_common module are no longer needed, e.g. UICR erasing.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-20 11:35:47 +01:00
Gerard Marull-Paretas acc0a43fb9 scripts: west_commands: runners: nrfutil: provide live feedback
nrfutil runner uses the batch-mode, so no live feedback is provided to
the user. However, batch-mode reports batch progress containing
human-readable strings of the operation being done. This patch changes
the _exec() implementation to parse the subprocess output in real-time,
logging to info the 'batch_update' reports. Note that only the first
batch update of a sequence (percentage = 0) is logged because first,
percentage resolution seems to be pretty bad, and, because logging
messages cannot be easily _appended_.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-20 11:35:47 +01:00
Gerard Marull-Paretas 0387214bfc scripts: west_commands: runners: nrfutil: use x-execute-batch
execute-batch is now named x-execute-batch, as it is an experimental
option.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-20 11:35:47 +01:00
Gerard Marull-Paretas 7bea89ac44 scripts: west_commands: runners: nrfjprog: drop nRF54H support
nRF54Hx series is no longer supported in nrfjprog. nrfutil is now
required.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-20 11:35:47 +01:00
Torsten Rasmussen c531e4c2ac scripts: test for imported ELFFile instead of setting it to None
mypy fails with:
Incompatible types in assignment
        (expression has type "None", variable has type "Type[ELFFile]")

this happens because of the code:
    try:
        from elftools.elf.elffile import ELFFile
    except ImportError:
        ELFFile = None

ELFFile is set to None to allow later code to check if ELFFile was
imported by checking against None. Instead of setting ELFFile to None,
then update testing code to check if the class has been loaded, as:
    if globals().get('ELFFile') is None:

Update the try-catch to `pass`.

Removed ELFFile cargo cult from intel_cyclonev.py and fix pylint
warnings.

Disable duplicate code check. The intel_cyclonev.py is already based
upon openocd.py, so although the duplication detection is correct then
this should not prevent other code changes / fixes to those files from
being applied.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-20 09:59:27 +01:00
Fabio Baltieri c82b38c7be input: pmw3610: run the whole init with spi clock on
Move the pmw3610_spi_clk_on and pmw3610_spi_clk_off calls so that the
"on" call is before the first write. The datasheet calls for doing this
before any write operations, though some writes seems to work without
this in place, other seems to behave erroneously.

The non static functions do it on their own as they can be called
separately.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-20 09:02:50 +01:00
Fabio Baltieri 2c5b992209 input: pmw3610: add few config options
Add config options for resolution, force awake and smart mode.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-20 09:02:50 +01:00
Guillaume Gautier edbfe9a4c7 tests: drivers: adc: adc_api: boards: add stm32 boards
Add STM32 boards overlays for all series supporting ADC DMA.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-20 09:02:04 +01:00
Guillaume Gautier 4102d3c452 tests: drivers: adc: remove adc_dma test
adc_dma test is now redundant with adc_api test, so it can be removed.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-20 09:02:04 +01:00
Guillaume Gautier 5eb045dc83 tests: drivers: adc: adc_api: add dma test
Move ADC DMA tests directly into adc_api test for Kinetis and STM32 boards.
Needs to disable CONFIG_TEST_USERSPACE for this subtest because of caching
issue for STM32H7 (as it was done dor adc_dma test).

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-20 09:02:04 +01:00
Jukka Rissanen b8e5ac18f1 manifest: Update to proper hostap
Hostap changes from Nordic downstream.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen d5dd3a0a54 hostap: Remove PSA crypto support
The PSA is referring to Kconfig symbols that are only found
in Nordic downstream repo so we cannot use it anyway atm.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 57b4ff137d hostap: Replace menuconfig by config
This avoid compliance warning

Found pointless 'menuconfig' symbols without children. Use regular 'config'
symbols instead. See
https://docs.zephyrproject.org/latest/build/kconfig/tips.html#menuconfig-symbols.

WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8
WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 5af390c600 hostap: Fix missing items in Kconfig and CMakeLists.txt files
Various settings in Kconfig and CMakeLists.txt file were
plain wrong or missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen e1729b44ef hostap: Fix compilation issues
The big cherry-picking left some invalid code so remove/fix
it in order to pass the compilation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 675346705f hostap: Fix channel comparison
Due to a typo, channel and frequency were compared causing the
connection to fail for any combination.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b3a6f8c2db hostap: Implement STA disconnect in AP mode
Use the WPA cli command to disconnect a station in AP mode.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 2a144e8bfe hostap: Fix WPA version for WPA3 and WPA2-PSK-256
The WPA version was only been set for WPA-PSK and WPA2-PSK, but for
others it wasn't set. For AP mode this causes issues as WPA-IE is
considered and WPA3/WPA2-PSK-256 aren't allowed, they need RSN.

Explicitly set the version for all to RSN, except for WPA-PSK.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata d8600d57cc hostap: Fix the security mode in AP
For AP we should use the security mode from the SSID as stations can
have a different security than the configure one. E.g., WPA/WPA2 in AP
vs WPA in STA1 and WPA2 in STA2.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 8729141da1 hostap: Fix SSID check
If the interface is in associated state, then current SSID will always
be set, so, add an early check and use SSID info freely after that.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b5ed2b45f1 hostap: Add mode check for disconnect
This way we reject disconnect in AP mode and ap disable in STA mode,
though both have same functionality we treat them differently to keep
it clean.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata bf2863e3e5 hostap: Implement AP connected station events
These are to intimate the applications about connected Stations.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 3bf20deec0 hostap: Implement AP mode events
These events are used by AP mode, tied to AP-ENABLED and AP-DISABLED
events in the hostapd/wpa_supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata ce85b6ce0a hostap: Add a connect/disconnect event helpers
These can be abstracted from the core WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f4b1c6c5d4 hostap: Add checks for mode switching
Don't allow automatic switching between modes, use disconnect/ap disable
to explicitly allow switch.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 967bedeedc hostap: Fix management frame receive
The management frame structure in the WPA supplicant only has a pointer,
so, it need a deep-copy before passing it to WPA supplicant, else driver
ends up freeing causing invalid memory contents.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata e5972171ca hostap: Fix RSSI check for STA mode
RSSI should only be retrieved for STA mode, but the check was wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Kapil Bhatt 8a5a5fb4b8 hostap: Add interactive keyword for commands
The keyword is added into array argv of wpa_cli.
The commands which require to be interactive
this keyword will allow ro print output for them.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f0d856ff72 hostap: Skip searching for exiting networks
Before starting AP mode, we don't need to search for existing networks
and join them, as the use-case is starting SoftAP.

This speeds up the AP mode operation significantly.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 03304184bb hostap: Skip RSSI retrieval for AP mode
RSSI is only applicable for STA mode, as for AP there are multiple
peers. This causes failure and unnecessary delay, so just skip the
retrieval.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen e648f0c24a hostap: Make sure CONFIG_AP gets enabled in AP mode
If user enables AP mode, make sure CONFIG_AP symbol
is enabled so that access point sources get compiled etc.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f35de25ff1 hostap: Basic AP mode support
Implement AP mode Wi-Fi management operations.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata e59910aaa4 hostap: Refactor disconnect and Remove unused variable
WPA supplicant handle is not used anymore.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 8607327721 hostap: Move WPA CLI commands to helper function
This prepares for the upcoming AP mode support and moves re-usable code
to a common helper function.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00