Fix calculation of frame length in eth_enc28j60_rx().
The calculation was incorrect because the CRC size was
subtracted only from the lower byte.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Clarify how the bt_conn_create_slave_le() API can be used to get each
of the two possible advertising packet types.
Fixes#14160
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
CONFIG_IEEE802154_CC2520_AUTO_ACK seems to creep back in, but has long
since be removed. We remove old references a few times.
Commit 2facf33f28 - "net: ieee802154: Remove old cc2520 AUTO_ACK
assignments".
Remove them again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch adds more error checking and handling for socket APIs.
Fixes: #13885
Coverity-CID: 190928
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
CONFIG_NET_DHCPV6 doesn't exist so remove references to it in the
sample, leave comments about TODO if/when this might exist.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_DCD_DSR does not exist so the code block associated with it would
never be built, so remove it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In case of relative alarm, nrf counter driver for TIMER peripheral
was not handling correctly case when new value exceeded top value.
Additionally, RTC implementation has been refactored to use similar
code for calculating alarm ticks.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Inside adc_context_request_next_sampling(), it tries to signal an I/O
error if there is a new request while a sampling is in progress.
However, it is not exactly an I/O error. The system is simply busy.
So signal EBUSY instead.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Most of these are from source'ing a file within an 'if PINMUX', and then
adding another 'depends on PINMUX' within it.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. There are no "conditional includes" in Kconfig, so
'if FOO' has no special meaning around a 'source'. Conditional includes
wouldn't be possible, because an 'if' condition could include (directly
or indirectly) forward references to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Also remove some duplicated dependencies for the related symbol
ENTROPY_NRF5_RNG.
The redundant ENTROPY_GENERATOR deps. are in files sourced within a
if ENTROPY_GENERATOR
...
endif
block in drivers/entropy/Kconfig.
The redundant ENTROPY_NRF5_RNG deps. are due to redundant 'depends on'
within an 'if' in the same file.
Tip: Jump to symbols with '/' in the menuconfig and press '?' to check
their dependencies. If there are duplicated dependencies, the
'included via ...' path can be handy to discover where they are added.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The function usart_sam_irq_is_pending (uart_sam_irq_is_pending) return
only the masked value of US_CSR register but it doesn't respect if the
IRQ is enabled or not. For proper function it must check if the IRQ is
enabled for the event.
Signed-off-by: Jiri Kubias <jiri.kubias@leapslabs.com>
Disable low power/deep sleep modes when they are not enabled in Kconfig.
Otherwise if only low power modes are enabled (but no deep sleep),
Zephyr will try to swich to the lowest power mode (deep sleep) anyway,
only to discover that it's not availiable, resulting in no low power
mode at all being used.
By disabling the modes here if they are not enabled in Kconfig,
policy_residency will switch to the lowest low power mode instead.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
In case it was detected that RTT host was not present
backend was still performing single sleep or busy wait
round before dropping data. That was degrading log
processing performance.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Coverity doesn't like that we're storing the return value of
net_buf_findcrlf() near the end of the handler block as "len".
Only to overwrite "len" again once we exit and look for the next
match.
Let's ignore the return value there and also remove the redundant
check for !frag. Either way, we've found a handler, and need to
break the search loop.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/12315
Signed-off-by: Michael Scott <mike@foundries.io>
We can't let i == value_size during the loop which gathers characters
for the length. If we do, the next check of "value[i] != ','" would
access memory beyond the value boundary.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/12290
Signed-off-by: Michael Scott <mike@foundries.io>
The heap, plus a few globals relevant to mbedtls get put in
their own memory partition.
With systems that have power-of-two region size/alignment
constraints, this results in a 64K partition being created,
even though we are using just a whisker above 32K.
Lower the heap size a little so everything fits in 32K.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The "ARM Cortex-M options" menu is already within a 'if CPU_CORTEX_M',
so no need to put 'depends on CPU_CORTEX_M' on it.
Tip: Jump to symbols with '/' in the menuconfig and press '?' to check
their dependencies. If there are duplicated dependencies, the
'included via ...' path can be handy to discover where they are added.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Users often get confused when they change Kconfig sources and then
rebuild only to discover that nothing happens. To fix this we add a
dependency between re-running cmake, and all Kconfig sources, similair
to how touching CMakeLists.txt files cause CMake to re-run.
This fixes#5634
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Adds a new config HAS_MCUX_FTFX to conditionalize the mcux flash driver
on socs that support it. Selects HAS_MCUX_FTFX on all kinetis socs
except kw40z, because even though this soc has the relevant hardware,
its CMSIS header file is not compatible with the mcux flash driver in
ext/.
This change also prevents enabling the mcux flash driver on lpc and imx
rt boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Dictionaries are iterated in a random order by Python 3.5 and before.
This could have caused "Unstable" CI in PR #13921 and maybe others.
Anyway we want builds to be determimistic by default. Explicit
randomness can be added for better coverage but not by default.
1. When running "make kobj_types_h_target" repeatedly one can observe
that the following .h files keep changing in
build/zephyr/include/generated/:
- kobj-types-enum.h
- otype-to-str.h
- otype-to-size.h
Switching kobjects to OrderedDict makes these 3 .h files deterministic.
2. When running this test repeatedly with CONFIG_USERSPACE=y:
rm build/zephyr/*.gperf && make -C build obj_list
... the dict used for --gperf-output seems to be deterministic, probably
because its keys are all integers (memory addresses). However we can't
take that for granted with Python < 3.6 so out of caution also switch
the output of find_objects() in elf_helper.py to a sorted OrderedDict.
PS: I would normally prefer official Python documentation to
StackOverflow however this one is a good summary and has all the
multiple pointers to the... official Python documentation.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
To reproduce the issue this addresses, run "cmake -B96b_nitrogen"
twice with Python 3.5. Observe the order of the flash partition table
changing in:
"build{1,2}/zephyr/include/generated/generated_dts_board.conf" and
"generated_dts_board_unfixed.h"
Dictionaries are iterated in a random order by Python 3.5 and before.
This could have caused "Unstable" CI in PR #13921 and maybe others.
Anyway we want builds to be determimistic by default. Explicit
randomness can be added for better coverage but not by default.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fix multiple definitions of `ram_console'. The ram_console
array is already defined in drivers/console/ram_console.c.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Commit 766101c was a wrong fix as NETUSB_MTU is the actual network MTU.
Instead of using this value in EEM/ECM drivers, a relevant value should
be set for each there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Remove case ranges from printk in order to clean up GNUisms
and make the code standards compliant.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Remove case ranges from the LP3943 LED driver in order to clean
up GNUisms and make the code standards compliant.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This reverts commit 8cb5d083cb.
This was breaking tests on master due to missing dependency that is
still being reviewed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If peer socket closed, the other side should get 0 from recv(), and
should get in stable manner (no matter how much time went from the
closure and/or how many times recv() is called).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The j iterator is used for priorities, and the i iterator is used for
choosing the actual screening register. Therefore the screening register
availability needs to be checked with i.
This commit also improves the readability by doing two things:
* by moving the screening register index check to a place where the
index is going to be actually used
* by using the ARRAY_SIZE macro instead of a hard-coded number as the
upper limit
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This patch unifies the way NRFX_RTC* Kconfig options are handled in
nrfx_config*.h files for particular Nordic SoCs, so that these files
are easier in maintenance. For nRF52810 and nRF9160, this means adding
of support for these options, since it was missing.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The NRFX_UARTE* Kconfig options were handled only in the nrfx_config
for nRF9160. This commit updates remaining nrfx_configs, so that these
options are handled uniformly for all Nordic SoCs.
The NRFX_UART option, although defined in ext/hal/nordic/Kconfig,
were not supported in any of nrfx_config files, effectively making
it impossible to use nrfx_uart.c driver. This commit corrects this.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow up to commit f0cf126015.
Entries in nrfx_config_nrf52810.h are synchronized with the template
from nrfx v1.6.2. In particular, the entries for SPI0, TWI0, and UART0
peripherals are added, so that these peripherals can be actually used
by nrfx drivers in Zephyr.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
JLink V6.44 (2019-03-01) added support for the imx rt1064 soc, including
programming the internal flash on flexspi2. Updates the mimxrt1064_evk
board to use the internal flash and external sdram memories by default,
now that the debug tools support them.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
There are some implicit rules in STM32 family Kconfig.defconfig
fragments organizations.
Add comments to explicit these rules.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
GPIO port H is available on all SoCs of L4 series.
Move Kconfig GPIO_STM32_PORTH symbol deifnition to series Kconfig
fragment Kconfig.defconfig.series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
If system clock runs fast k_cycle_get_32(), which is the timestamp
source, wraps often (few minutes). This patch changes default
timestamp function to use k_uptime_get_32() if system clock
frequency is higher than 1 MHz and k_cycle_get_32() otherwise.
If system clock runs at 1 MHz, counter will wrap every 71.5 minutes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Do not enable by default both I2C and SPI nodes for the peripherals
with the same instance number, since they use the same MMIO base
address and DTC will issue a warning in such situation.
This patch corrects dts files for the following boards:
- nrf51_pca10028
- nrf52_pca10040
- nrf52840_blip
- nrf52840_pca10056
- nrf52840_pca10059
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>