Rounded up struct smp_bt_user_data takes 8 bytes; this fixes
static assert failing with message:
CONFIG_MCUMGR_BUF_USER_DATA_SIZE not large enough to fit Bluetooth
user data
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Adds details of the stable API change to mcumgr's callback system,
including a link to the migration guide.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds the initial documentation describing the mcumgr callback
system and how to use it, including API reference and samples.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Switches to the new event callback system for the os_mgmt
functionality and removes the old code.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Switches to the new event callback system for the img_mgmt
functionality and removes the old code.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Switches to the new event callback system for the fs_mgmt
functionality and removes the old code.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds an access denied error code that can be used to signal to the
mcumgr client that the requested access to a specific resource or
command/functionality has been denied.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Reworks the event callback system to use a linked list to allow for
chained handlers and support passing a status back to the handler to
indicate if the request should be rejected or allowed. This also
removes the old base callback functionality.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Following the modification of the STM32 OSPI driver, the clock-names
binding is now required
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Instead of calling __HAL_RCC_OSPIM_CLK_ENABLE() to enable the OSPI
manager clock, we now use a new clock binding in the dts.
In order to avoid confusion between the different clocks, the driver
is modified to select the clock based on their names instead of indexes.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 featuring octospi, clock-names are added to use them
instead of indexing for configuring the clock.
For U5 series, a third clock is added for the OSPI manager.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Update release notes 3.3 with the different modifications brought
to the STM32 RTC counter including new functionality, deprecated
and removed Kconfig
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove a set of Kconfig symbols for configuring the RTC on STM32
that are no longer useful
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32 series, add some defines to select the RTC clock source.
This change is necessary to be able to select the RTC clock source in
dts instead of Kconfig
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This add TFM cmake definitions to build mass storage sample for non
secure firmware boards versions. The stm32l562e_dk_ns board was used
to demonstrate. It uses SDMMC/SD with TFM profile large. Tests were
conducted using a 2GB transflash card with FAT-32 partition.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
This enables usb and usb_device tag for tests. It explicitly disable
samples/subsys/usb/dfu for non-secure version of this board due to
building errors, which can be explored in future.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Adds a note on changes needed to applications to update them for
changes introduced into MCUmgr.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
After a soft-reset of the host controller the flash device is not reset.
This can cause the flash device to still be busy writing or erasing when
the host controller boots and initializes the flash. The often results
in errors and the flash device not being initialized.
This fix polls the status register until the WIP flag is off before
initializing the flash device.
Fixes#51713
Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
Adds a test which checks that the fs_mgmt supported hash/checksum
functionality is working and returns the expected response.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a new mcumgr command for returning information on all supported
hash/checksum types that the firmware supports.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This fixes issues with the Bluetooth SMP transport whereby deadlocks
could arise from connection references being held in long-lasting
mcumgr command processing functions.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This replaces an intermediatory structure with a different one which
allows command functions to access the full contents of the streamer
structure that would be otherwise unavailable. This is a foundation
for allowing asynchronous mcumgr messages from the server.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
In order to configure domain clock, clock_control_configure should be
used instead of clock_control_on which is only useful for bus clock gating.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When it needs to access perck clock speed, clock_control driver is using
LL API to read RCC registers and compute frequency.
We're using the exact same method to test the frequency and as a result
we were not able to detect that there was an issue when configuring this
clock.
Add a specific case to this test in order to verify perck domain clock if
perck is used in SPI clk configuration.
We're now able to detect issues (and test is failing).
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Perform some rework in messages displayed in case of failure to ease
readability:
- remove redundant information
- add missing information
- convert registers values to hex
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Test was using "clock-names" property to query domain clock configuration.
This is not working since clock-names was removed in the last step of the
feature implementation and whole macro was always reporting DT_NO_CLOCK.
This issue went undetected because of an additional issue in the exception
case which was testing "zassert_true(1, .." instead of "zassert_true(0, .".
Fix both issues to make the test efficient again.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
-- Handle time calculations across the point at which the controller's
time information from the controller's clock will wrap (in the
microsecond range)
-- Use wrapped time in all ISO-AL time calculations
Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
Add to the cryptographic toolbox the h8 function, defined in the Bluetooth
Core Vol. 6, part E 1.1.1.
Also add test and SMP self test for this function. The data used for those
are from the Bluetooth Core.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Move functions defined in the Cryptographic toolbox of the Bluetooth
specification inside their own files in the following folder:
`zephyr/subsys/bluetooth/bt_crypto`. The functions were previously
implemented in `zephyr/subsys/bluetooth/host/smp.c`.
The cryptographic toolbox functions can now be accessed from outside of the
host.
In addition to that, tests for each cryptographic toolbox functions have
been added.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The pointers to resource values should not be used
directly to update the values.
This will break observations if the server is trying to
observe changes during a software update.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
Fixed how data is read in mcp23sxx_read_port_regs
The data is now stored in an array to get the
actual data from spi
Signed-off-by: Daniel Skatt <daniel.skatt@gmail.com>
Fixes for the following issues that a new version of mypy started
reporting recently:
runners/trace32.py:34: error: Incompatible default for argument
"startup_args" (default has type "None", argument has type
"List[str]") [assignment]
runners/trace32.py:137: error: Incompatible default for argument
"cfg" (default has type "None", argument has type "Path") [assignment]
runners/trace32.py:34: note: PEP 484 prohibits implicit Optional.
Accordingly, mypy has changed its default to no_implicit_optional=True
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Channel SENSOR_CHAN_GAUGE_FULL_CHARGE_CAPACITY was returned in place of
SENSOR_CHAN_GAUGE_FULL_AVAIL_CAPACITY, due to their matching names.
Ensuring that the channel names are unique fixes the issue.
Signed-off-by: Marco Argiolas <marco.argiolas@ftpsolutions.com.au>
"alh0: alh1:" will create only one instance and this needs to be
reverted to original form with two instances
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>