Replace all register defines and calls with Nordic nrfx HAL.
Simplification of uart shim - assumed only one uart instance.
Added parity bit to configuration options.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As the nRF52840 supports 802.15.4 natively, we should default y
for IEEE802154_NRF5 if IEEE802154 is enabled.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Add fixup info for PWM nodes on STM32F0/F1/F3/F4/L4 and remove the
conflicting Kconfig symbols to fully switch STM32 PWM to device tree.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
In some cases, node label could be generated with "/" character
in name string, which prevents compilation
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
The nucleo_f334r8 uses STM32F3_PINMUX_FUNC_PA8_PWM1_CH1 inside its
pinmux but it is not defined anywhere.
Add the definition into the pinmux file to fix the build of
nucleo_f334r8 when enabling CONFIG_PWM.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
CONFIG_CLOCK_STM32_APB2_PRESCALER does not exist for STM32F0 as it was
removed from the RCC Kconfig by commit d0678201c3 ("drivers:
clock_control: provide support for stm32f0."). This will break the PWM
driver if compiled for STM32F0.
Conditionally disable usage of this symbol for STM32F0 as all PWMs are
on APB1 for this family.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
PWM1 / PWM15 / PWM16 and PWM17 on STM32F0 do not use the same clocks
compared to the other series.
Add the STM32F0-specific clocks where needed.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
Not all PWM clocks belong to the GRP1, for example TIM1 on STM32F0. Add
the group information to the macro to enable supporting these PWMs in
the future.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
The prescalers are currently hardcoded and are not user-selectable. As a
result, the frequency of the timer can be inadequate to the task. For
instance, the frequency of the 16-bit timers (prescaler 10000) is
usually too low to correctly generate of PWM of a few kilohertz.
Hardcoded prescalers are replaced by Kconfigs so the user can choose at
compile time. The default value of each Kconfig matches the hardcoded
prescaler, so the change will be transparent.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
All the PWM between 1 and 20 can be found on the STM32 depending on the
serie and the specific model. Add all the missing PWMs up to PWM20 to
plan for the future needs.
Tested on STM32L496 with available PWMs.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
The registration of each PWM differs only by a few details.
These differences can be factorized in order to create a generic
registration macro.
This has several advantages:
- Less code
- Easier to add new PWM
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
commit 53a924b390
clobbered parts of
commit 9d2f370ddb
which included changes to make cc3220sf_launchxl XIP by default.
This patch reverses the clobber.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Increasing the network buffer count for frdm-k64f so that the
device will not run out of memory so easily.
Fixes#7678
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The PendSV handler sits below the priority of other OS interrupts, but
it was inspecting kernel state before masking those interrupts out!
Move the locking to the top.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit removes the arm_mpu_enabled status flag in the ARM
MPU driver. This flag is not needed, because the value of the
MPU_CTRL register stays the same while the MPU is enabled, and
is cleared to 0 when the MPU is disabled. Therefore, we do not
need to prevent from having the enable or the disable operation
to be called multiple times.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In _arm_mpu_config provide a more detailed description of the
effect of MPU PRIVDEFENA flag when enabling the ARM MPU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
ARM Cortex-M0+, M3, and M4 MCUs have a fixed number of 8 MPU
regions, if MPU support is implemented. Therefore, we can
implement _get_num_regions() to return a constant, if CPU
is one of the above Cortex variants. _get_num_regions() is
invoked often in the code, so this solution increases processing
efficiency. A sanity check is implemented in arm_mpu_init(), to
ASSERT if the number of regions provided by hardware does not
match the expected (default) value.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commits adds a dependency for ARM_MPU on !CPU_CORTEX_M0,
so an accidental selection or ARM_MPU in ARM Cortex-M0 MCUs
will signal a K-config warning.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
If an entropy driver is available during build, use it to gather
entropy rather than relying on sys_rand32_get(), which provides no
guarantees that the provided numbers will be good enough from an
encryption standpoint.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Initially, there was support only for buffered input, and adhoc var
names used. Later, buffered output support was added, with variables
consistently using "tx_" prefix. Now, rename the original RX path
to use symmetric "rx_" prefix.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The nrf_rtc_timer used own method to calculate number of timer cycles
per tick. As the result value was different than the one used by
the kernel, the reported time was incorrect.
This commit fixes the problem described above by using global
sys_clock_hw_cycles_per_tick instead of custom RTC_TICKS_PER_SYS_TICK.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Added support for circular linked list of DMA buffers
This patch checks the last block supplied by the application
and if the next pointer in the last block is valid, the tail
linked list item is linked to the head linked list item
to form a circular linked list
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Because per-interface statistics rely on interface pointer stored in a
net_pkt, it should not be unreferenced before stats are updated.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Default stack size was too small for main thread in qemu_x86
configuration and resulted in stack overflow during initialization.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Functions for per-interface statistics collection used a pointer to a
packet that could've been deallocated in the net_conn callback function.
In result, application could crash when interface related to the packet
was referenced. To fix that, packet interface is stored earlier, so it
can be used instead for statistics collection.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Users are sometimes mistakenly invoking cmake with $ZEPHYR_BASE set as
the source directory.
This user-error can occur if the user believes that the toplevel
CMakeLists.txt file is at the root of the repo, or if the user uses
the wrong path when invoking cmake.
The error given when this user-error occurs is cryptic and undefined,
so we replace it with what should be an easy-to-understand error
message.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
In verbose mode (-v) progress of running test cases number out of total
number is not printed. Thus, if there are many test cases, it is
impossible to follow the progress. This commit adds printing of current
test case and total numbers to the verbose output.
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
The IP stack drops any TCP segment which doesn't fit into our
receive window. However, we still must accept Zero Window Probe
segments, which are segments, usually with data length of 1, which
a peer sends to us after we stayed with zero window for some time.
In this case, we need to repeat an ACK with the old ack number.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
For the native_posix board,
added the command line options -rt and -no-rt to control
if the execution should be slowed down to real time or not.
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME still works, but
now it just sets a default.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Use transfer API for ACL out transfers. No extra buffer is requested,
directly use the net buf and update its len on transfer completion.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Bluetooth net buffers have 1-byte reserve, which can be used by HCI bus
driver (uart, spi...) to set packet type (H4).
This fixes assert when building hci_usb with CONFIG_NET_BUF_SIMPLE_LOG.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Calling bt_send from IRQ context is not safe, at least in HCI SPI case.
In the same way as hci_core, create a thread for TX.
This fixes hci_usb sample for 96b_carbon board.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
SPI driver has its own rx thread, select BT_RECV_IS_RX_THREAD.
This fixes build issue because of undefined CONFIG_BT_RX_PRIO.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
IRQ priorities for CAVS and DW were previously defined in Kconfig.
They are now defined via DTS and removed from Kconfig.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Catch interface up/down events so that we can renew the
address if interface goes down and is then restored.
Fixes#7553
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>