Fix a bug where the image's SHA would be interpreted as TLV headers due
to missing a data_off increment.
Signed-off-by: Stuart Alldritt <s.k.alldritt@gmail.com>
There is no guarantess enum will be packed so passing uint8_t as
node_id to bt_mesh_subnet_priv_node_id_get() could (and likely will)
result in writing past stack variable.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The current code calls cpu_freq_policy_reset() once within
the SMP branch of the cpu_freq_timer_handler function, and
then calls it again at the beginning of cpu_freq_next_pstate().
This causes repeated resets of 'pstate_best' and
'num_unprocessed_cpus', which prevents the 'last core' from
being reached. The initiating core should perform a reset
before broadcasting, and other cores should not reset again.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In the current code, 'target_cpus ^= (1U << _current_cpu->id)'
is first used to remove the current core. Then, k_ipi_work_add
performs 'target_cpus ^ (1U << _current_cpu->id)' again when
passing parameters. This will add the current core to the mask
again, causing the current core to receive IPI and directly call
cpu_freq_next_pstate() at the end, which may lead to duplicate
execution.
This commit changed 'target_cpus ^ (1U << _current_cpu->id)' to
'target_cpus' in k_ipi_work_add to avoid the second XOR.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In the function bq274xx_gauge_configure it was being used an hardocded
value of 3.7V instead of using the design voltage parameter defined in
the device tree.
Signed-off-by: Marcelo Cunha <mcunha@petsafe.net>
This patch adds a check for the EOT (End Of Transfer) flag
inside the polling loop in spi_stm32_half_duplex_switch_to_receive().
If EOT is set, the transfer is already complete and the loop
is exited, preventing the lockup.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Since the i index is already being incremented as part of the
for loop statement, the i++ done as part of the loop body should
not be done since this lead to skip of entries of the table and
moreover might lead to invalid access outside of the table.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The net socket service implementation permanently opens a file
descriptor, which should be taken into account by the build system.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When using I2C clock frequency >= 250 kHz, it's been observed that the
nPM1300 would unexpectedly wake up before requested time has expired. Add
a delay between applying a new timer value and triggering hibernate to
mitigate this.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
It was preventing this variant (imx93_evk/mimx9352/m33/ddr) to show up
in the boards documentation. Other similar boards with similar DDR variants
(e.g. imx95_evk/mimx9596/m7/ddr) don't include this 'flash: 0' line.
Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
Without this header the logic in adc_esp32.c will never have either
ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED or
ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED defined. This means
that we always see the warnings aout uncalibrated samples.
Signed-off-by: Yuval Peress <yuval.peress@gmail.com>
Place the 'vectors' region configuration behind the 'sram' and
'rom_region' configurations so that the MPU region for the
vectors takes precedence over the 'sram' region due to higher
region index = higher priority when resolving memory properties
/ permissions for overlapping regions. This is required for the
vectors to work properly if the SRAM base address is also at 0x0.
Fixes#96688.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
`fork()` is defined by POSIX and for creating a new child process.
It is the preferred method of doing so on systems with virtual memory and
the symbol should not be used outside of the context defined by the
POSIX standard.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There is a function, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the function in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There is a macro, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the macro in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There is a macro, `fork()`, inside of the philosophers example that
conflicts with the POSIX `fork()` function.
Since it is customary to avoid using reserved names, adjust the sample
so that the macro in question is called `philosopher_fork()`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
For some reason, a regression happened where the phy monitor was never
happening. Fix by starting the monitor at the end of init function. The
monitor will then reschedule itself from then on.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove useless assignments to `val` parameter in sbs_gauge_set_prop()
and bq27z746_set_prop(). Since `val` is passed by value, modifying it
has no effect. Also remove unused `tmp_val` variable.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Allows applications and projects to specify their own requirements
for the application VERSION file to be re-generated, this fixes an
issue whereby the application git repository is updated with a new
commit but the old commit is still used by a build, users would
need to add a dependency in their application to the git index file
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
If slots have equal version, but a secondary slot is the active one, the
next boot will switch to the primary slot.
Expose this through SMP commands by marking the primary slot as pending.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
As the net_pkt might have already been sent by net_if_try_send_data()
function, the pkt might already contain garbage data. So do not try
to access if after that send call but remember the used iface and family
and use them to update the statistics.
The issue was seen with qemu_x86_64 and qemu_cortex_a53 when CONFIG_SMP
was enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit introduces a compatibility layer for older EUSART hardware
that lacks the RXTO interrupt. It fix the test uart_async_api when using
xg22 soc.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
When running uart_elementary on the xg22 SoC, some tests are failing due
to the lack of checks inside the configuration function. This patch adds
a check for the parity parameter.
I've also noticed an error in the ISR function where we check all the
ISR flags and not only the enabled ones. It has no impact but needs to be
changed in order to be accurate.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The current implementation checking for the validity of the spi slave
number is wrong. First of all, there is an off by one error where it
allows SPI_CHIP_SELECT_COUNT value as a valid slave, when really it
should be that value minus one. Secondly, it doesn't take into account
the fact that having software controlled GPIO CS can technically have
any number of slaves on the bus. So fix by finding the max of these two
values and fixing the off by one mistake. Also, for RW612, only one HW
native CS is available due to SOC pinmux limitations.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The core name is usually sticked to the Cortex(R) trademark with an hyphen,
as in "Cortex(R)-M0+" rather than "Cortex(R) M0+".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Cortex is a registered trademark of Arm Limited and should thus be
annotated as (R), not TM. Update documentation of various boards using the
wrong symbol.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Disabling multithreading is not possible when enabling SMP (logically)
so depend on SMP being disabled to enable
ARCH_HAS_SINGLE_THREAD_SUPPORT.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add system flash size and/or RAM size tags in ST boards YAML files
where the information is missing.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Fix several RAM size that are wrong regarding what is defined in the
related board device tree.
In many cases, SoC DTSI files have been changed to split internal RAMs
and related boards YAML file was not updated accordingly. This is the
case of H5xx, H7xx
In the case of stm32g081b_eval, polarity bytes are not default enabled
hence the internal SRAM size of 36kB, not 32kB.
Stm32mp135f was wrongly set with 256KB RAM and Flash whereas the board
assigns 256MB for each.
Stm32mp157c_dk2 assigned SRAM1, SRAM2 and SRAM3 to Zephyr hence
providing 320kB of system RAM.
Fix several typos setting RAM size to 786 whereas 768 is expected.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The I2C state machine may fail to generate a valid STOP condition.
This may happen when the firmware sets the STOP bit in SMBCTL1 register
approximately half an SMB clock cycle following the last ACK bit in the
transaction.
Note:
1. This issue is not expected to occur when the core clock runs at
the default frequency (15 MHz). However, since more applications
reuquires higher core clock frequency, this commit introduce the
bypass to prevent the potential risk.
2. Only NPCXn variant chips require this workaround.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The display harness initial documentation was a separate, stale (had
references to a personal Github repo), README.rst buried in the
twister/scripts folder.
Move the docs to be a "first class" part of the Twister documentation
alongside other harnesses.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the power domain flow diagram in doc/services/pm/power_domain.rst
to use the current runtime PM API name pm_device_runtime_get instead of
the older pm_device_get. This keeps the documentation consistent with the
renamed device runtime power management APIs.
Signed-off-by: Albort Xue <yao.xue@nxp.com>