Fixes broken CC2520 on quark_se_c1000_devboard configuration after
commit 25d17db.
Fixes#15070
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Update the relevant release notes for the documentation improvement
for version 1.14.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
In order to fit in SRAM, reduce the CONFIG_BT_MAX_CONN from 20 to 16 in
the configuration used for the BBC micro:bit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Implement the Controller counterpart to CONFIG_BT_WAIT_NOP so that it
issues a NOP Command Complete event after booting up, to signal to the
Host that it is ready to receive HCI traffic.
Fixes#15333
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
tinycrypt documentation wasn't included in the table of contents so add
it into the guides section.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When a device is considered unpaired any configuration set in Client
Features shall also be removed.
Fixes#15329
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The erase-block-size and write-block-size are needed for the spi_nor
driver to compile.
scripts/dts/extract/flash.py automatically adds these properties if
this flash device is part of the "chosen" flash node, but they're
otherwise missing.
Signed-off-by: Jim Paris <jim@jtan.com>
The SysTick logic looked logically sound, but it was allowing us to
set a LOAD value as low as 512 cycles. On other platforms, that
minimum future interrupt delay is there to protect the "read, compute,
write, unmask" cycle that sets the new interrupt from trying to set
one sooner than it can handle.
But with SysTick, that value then becomes the value of the LOAD
register, which is effectively the frequency with which timer
interrupts arrive. This has two side effects:
1. It opens up the possibility that future code that masks interrupts
longer than 512 cycles will miss more than one overflow, slipping
the clock backward as viewed by z_clock_announce().
2. The original code only understood one overflow cycle, so in the
event we do set one of these very near timeouts and then mask
interrupts, we'll only add at most one overflow to the "elapsed()"
time, slipping the CURRENT time backward (actually turning it into
a non-monotonic sawtooth which would slip every LOAD cycle) and
thus messing up future scheduled interrupts, slipping those forward
relative to what the ISR was counting.
This patch simplifies the logic for reading SysTick VAL/CTRL (the loop
wasn't needed), handles the case where we see more than one overflow,
and increases the MIN_DELAY cycles from 512 to 1/16th of a tick.
Fixes#15216
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This includes a bugfix for a pyocd requirement on pyyaml
that could not be satisfied using officially supported
releases.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Callbacks called from the RX thread may block, but should avoid doing
it for long periods of time.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is a follow up to commit 436c4262da.
By default the channel 0 of pwm0 is set to the pin that drives led0.
Since the LED is active high, the inversion of polarity is incorrect.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This fixes an issue where if timestamp == service_due_timestamp,
we don't call the periodic service. Then the following call to
engine_next_service_timeout_ms() returns 0 because the service
is still due and lwm2m_engine_service() is called again.
This process repeats several times until the value of
k_uptime_get() changes and then the work is finally handled.
Previously, the resolution of k_uptime_get() was in ms. A recent
change to this API defaults Zephyr so that the resolution is
set via CONFIG_SYS_CLOCK_TICKS_PER_SEC (default 100).
This means the value of k_uptime_get() only changes every 10ms.
Reported-by: Github User pieterjanc
Signed-off-by: Michael Scott <mike@foundries.io>
"It's a Trap!" -- Admiral Ackbar
When moving to the BSD-socket APIs, the original thread running LwM2M
periodic services such as observes and lifetime updates, was replaced
with a re-occuring workqueue job. To save the overhead of creating a
new thread, I used the system workqueue for these jobs.
This was a mistake. If these jobs hit a semaphore or wait for some
reason, it cannot be prempted due to the priority of the system work
queue.
Let's instead add this service handling to the thread that we already
use for polling sockets. This also removes a configuration issue where
the system workqueue stack size needed to be increased. This can now
be adjusted via the LWM2M_ENGINE_STACK_SIZE knob.
Directly fixes semaphore usage in the socket-based DNS code.
This was introduced as a bugfix for non-responsive DNS server hanging
the Zephyr device forever. However, this probably fixes randomly
seeming hangs on the device.
Signed-off-by: Michael Scott <mike@foundries.io>
Bad order of interrupt calls made it unable to transmitt data
using interrupt driven API.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
After the testcase configs are built, there is a step to
filter all the test case information to determine the set
of tests to run.
As this step takes a nontrivial amount of time, add an
informational message about it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Renamed the page "review_process.rst" to "dev_env_and_tools.rst"
as the old name did not cover all its content.
Moved the labels page content into this
"Developemnt Environment and Tools" page.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
There has been some confusion about how GitHub labels
should be used.
This commit adds a new doc page, which tries to clarify this.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added information to the release notes about the new drivers
in native_posix, the new nrf52_bsim board and the BabbleSim
integration in CI and testcases.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
We need to use the ARMV7_M_ARMV8_M_FP Kconfig symbol,
which denotes the Floating-Point capabilities, instead
of the option that signifies the Cortex-M variant. Fix
is of minor importance, as long as the #ifdef block
remains empty.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This is what checkpatch.pl expects, and GitHub's file viewer flags a
missing trailing newline too.
Note that this is different from a blank line at the end of the file. It
just says whether the last line must end in a newline.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Send unknown rsp instead of asserting when encryption related control
PDUs are received in the wrong state.
This would allow an attacker to intentionally crash the device.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Stop the Length request procedure from initiating during the encryption
procedue. This would cause the peer to disconnect the link with error
code LMP_TRANSACTION_COLLISION
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the encryption procedure pending and start it as soon as
there are no other procedures running.
This allows the Host to enqueue the encryption procedure, and not
get disallowed command because a different LL procedure is active.
Fixes#15012
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When calling bt_unpair() the keys were removed from flash, however a
pointer was left to the invalidated keys in case there was an existing
connection. This would then lead to a bogus entry being stored in
flash for a zero-address peer device. Fix this issue by clearing the
conn->le.keys pointer in the bt_unpair() function.
Fixes#15325
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update 1.14 draft release notes with doc changes. Also edited existing
release notes material to make sentence tense consistent (past tense).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The bt_mesh_fault_update() API is meant for updating the publication
message and sending it out to the network, however it was missing the
necessary call to health_pub_update() which is responsible for
updating the publication message.
Fixes#15300
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Casting the rb_data character array to a u32_t can result
in an unaligned u32_t * pointer being passed to
ring_buf_item_put(), since rb_data is only byte-aligned.
Our Altera Max10 CPU build is not configured to detect
unaligned memory access and throw an exception, it is
instead rounding down the memory address
of the data pointer to the nearest 4-byte value, causing
the wrong data to be copied into the ring buffer.
It appears that in the C standard this is considered
Undefined Behavior so the approach this patch takes is
to fix the test, by ensuring that rb_data is aligned to
u32_t.
Fixes: #14869
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The NSIM emulator has severe performance issues when
the MPU registers are reprogrammed on context switch.
Disable runtime reprogramming of the MPU for these
platforms on these two tests, which have a lot of context
switch thrashing. This is done by ensuring userspace
and hardware stack overflow detection via guard areas
is disabled.
I have assurances from the ARC team that the tests run fine
on real hardware and this is an emulation issue.
For 1.15, this will be completely resolved by optimizing
MPU region gap-filling to not take place during context
switch time, which will drastically reduce the number of
MPU registers poked during context switch on nsim_sem.
Meanwhile, for 1.14 we ensure that no runtime reprogramming
of the MPU is done for these tests.
Fixes: #14642
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* fix the stack allocation and initialization
for mpu stack guard when USERSPACE is not configured
* fixes#15163
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Increase the default mgmt event stack size from 512 to 768 because of
stack overflows.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
* it's not reliable to use exc_nest_count to decide nest interrupt.
A better option is to use IRQ_ACT
* ext_nest_count is just used to switch interrupt stack
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Currently coverage is enabled only in platforms which dont have
multiple memory regions. This sample was designed to emulate
different memory regions. This in conjunction with gcov which
might instrument data in different memory regions will not work
as expected. Therefore disabling gcov for this sample.
Fixes: GH-15107
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
We have actual tests now under tests/kernel/mem_protect/userspace
and tests/kernel/mem_protect/mem_protect that exercise all the
memory domain APIs. This old test is superfluous.
Fixes: #15178
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fixes: #15289
Kconfig requires posix style path when sourcing other files.
As abspath in python will use native host style, i.e. backslash '\' in
windows this will cause invalid paths in Kconfig generated file and
thus the file will never be loaded.
This commit uses PurePath to convert the path to posix style, ensuring
Kconfig can load the modules.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>