Set the prescaler in register BTR according to the configured bitrate in DTS.
This bug appeared in commit 8b6c1bd4b7
Signed-off-by: Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
```
/home/humanentity/zephyr/drivers/ipm/ipm_handlers.c:23: undefined reference to 'z_impl_max_data_size_get'
```
The error shows when having CONFIG_BT=y and CONFIG_USERSPACE=y, and
is easily reproduced by adding
```C
CONFIG_USERSPACE=y
```
to `samples/bluetooth/peripheral/prj.conf` and building the sample.
E.g.
```
$ west build -p auto -b nrf5340pdk_nrf5340_cpuapp samples/bluetooth/peripheral
```
Signed-off-by: Peter Andersson <pelleplutt1976@gmail.com>
Retain the assumption that the loop will assign a pointer, but
initialize it pointer first to eliminate build warnings.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The fs_seek and fs_tell are expected to return -ENOTUSP if file system
driver lacks implementation of said funcions.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Remove all odr values from Kconfig and always init it
at 12.5Hz. It is responsibility of application to set
the rate to a different value using SENSOR_ATTR_SAMPLING_FREQUENCY.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Create a common binding file that will be included by all bindings
handled by iis2dlpc driver. For now this includes optional drdy-gpios
property and it is shared by the i2c and spi version of the driver.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The LwM2M firmware pull object no longer uses the system workqueue
to execute firmware_transfer(), but directly executes it itself.
Previously, the workqueue would be blocked because firmware_transfer()
indirectly calls a blocking connect(). This would lead to problems
with e.g. modem drivers that use UART to interface with the modem
hardware, as some UART drivers use the workqueue.
Fixes#31053.
Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
As the tcp header struct can be cast to unaligned memory, mark
it as packed and access fields using UNALIGNED_GET/PUT when
needed.
Fixes#31145
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The interrupt numbers for two socs for the gpio peripheral was wrong.
This commits corrects this issue for the relevant socs.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
The watchdog and rng nodes were a sub-node of the gpio node.
This commits corrects this issue for the relevant socs.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
Adds support for ADC on G0 series.
Simple implementation: sequencer not fully configurable,
and only one common sampling time.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
PWM, as other peripherals should not be enabled as part of
default board configuration.
Fix this.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
There are some drivers in the tree that support devices on multiple
different buses, although so far this has not been represented in
device tree using the bus concept. In order to convert these drivers &
bindings to refer to a formal bus in device tree we need to be able to
match bindings which lack an explicit "on-bus: ..." value against any
parent bus. This will also be needed for any external bindings, since
those would not be aware of on-bus (as it's a Zephyhr-specific
extension).
The two drivers I'm particularly targeting is the ns16550 UART driver
(drivers/serial/uart_ns16550.c) and the DW I2C driver
(drivers/i2c/i2c_dw.c). They both support devices with a fixed MMIO
address as well as devices connected and discovered over PCIe. The
only issue is that instead of encoding the bus information the proper
DT way these bindings use a special "pcie" property in the DT node
entries to indicate whether the node is on the PCIe bus or not.
Being able to convert the above two drivers to use the DT bus concept
allow the removal of "hacks" like this:
if DT_INST_PROP(0, pcie) || \
DT_INST_PROP(1, pcie) || \
DT_INST_PROP(2, pcie) || \
DT_INST_PROP(3, pcie)
to the more intuitive:
if DT_ANY_INST_ON_BUS_STATUS_OKAY(pcie)
This also has the benefit that the driver doesn't need to make any
arbitrary assumptions of how many matching devices there may be but
works for any number of matches. This is already a problem now since
e.g. the ns16550 driver assumes a maximum of 4 nodes, whereas
dts/x86/elkhart_lake.dtsi defines up to 9 different ns16550 nodes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Get rid of weak functions adding a new API to register an object to
receive notifications when the system changes power state.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Rename Kconfig BT_CTLR_SCAN_SYNC_ISO_MAX to
BT_CTLR_SCAN_SYNC_ISO_SET, to be consistent with other
Kconfig naming.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
AUX_CONNECT_RSP PDU static buffer definition was missing one
byte required for the Extended Header Flags.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Document with comments, the explanation of node rx count and
the design of the free rx PDU management.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix for scenarios where in active PHY Update Procedure or
Connection Update Procedure could cause temporary depletion
of the free Rx PDUs in the queue between LL/HCI thread
context to LLL context. Symptoms being on-air NACKing during
the above said procedures, causing supervision timeouts due
to procedures not completing at instants.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor the implementation of PA/LNA PPI configuration
which was done on every Tx or Rx as common code to be
executed once per radio reset. And only setup the timeout
and enabling of PPI at every Tx or Rx.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
For PA/LNA implementation use NRF_P0/P1 defines instead of
the deprecated NRF_GPIO to reference GPIO Port 0 registers.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the missing GPIOTE channel disable when GPIOTE channel
is alternately used between PA and LNA use.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression in PA/LNA support wherein the GPIO pins where
left in undefined state after each radio event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression, add back missing call to radio_setup HAL
interface. This is needed to setup the initial PA/LNA GPIO
states.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Various improvements to the west repo-tool.rst page and pages that
link to it:
Rename the page title to "Basics", since it documents, well the
basics, including built-in commands like "help" an "config" that are
not directly related to multiple repositories.
The "multi-repo" term was invented before we started using
"workspace". Drop it from the text and rework things using words like
"workspace", "basics", or "built-ins" instead, which read better.
We've been using west for a long enough time that justifying its
existence prominently at the start of this page is no longer
necessary; move that to the "dustbin of history" page (why.rst).
Try harder to clarify exactly what a "project" is, along with other
workspace related clarifications.
Improve the documentation for the west init and west update commands,
and create :ref: targets for linking directly to them for convenience
elsewhere in the docs.
Slim down the usages for other built-in commands, so we don't have to
keep those up to date as carefully each release. This is about to be
important for west 0.9, which is going to change the detailed
semantics for the "[PROJECT ...]" part of each command synopsis in a
way that will be inconvenient to duplicate for each of these.
Move the "Topologies supported" content lower down. Try to help the
reading flow by letting people get familiar with a workspace and what
you can do with it using the Zephyr GSG workspace that they probably
already have before overwhelming them with other possibilities and
choices.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This fixes an incorrect error message log statement for IPv4 vs.
IPv6 in several net samples.
The error message is in a portion of the files dealing with IPv4
bring-up. If the address is invalid, it logs the invalid address;
however, the IPv4 statement incorrectly refers to ipv6_addr. This
PR corrects it to output ipv4_addr as expected.
Signed-off-by: Steve Winslow <steve@swinslow.net>
This commit adds the board definition files
needed to support the Arduino Nano BLE 33.
Tested: the following have been verified with
my logic analyzer.
* Serial peripherals (UART, I2C, SPI)
* USB
* RTC
Untested:
* PWM. In theory it should work but I don't
have a good enough logic analyzer to test this
* RTC's. The board doesn't have a backup battery.
The peripherals are enabled for modding another
battery in the device tree.
Signed-off-by: Jefferson Lee <jeffersonlee2000@gmail.com>
This commit adds supports for the nRF52840 based BLE Cell board from
Contextual Electronics. This board contains support for BG95 Modem,
BQ52895 charger, SD card etc and can be used as a PI Hat.
In this commit, this board supports UART, I2C, SPI, Modem. Support
for charger, SD card and other things will be added later.
Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
The l length modifier can apply to the c format specifier; in that
case the expected value is of type wint_t. Minimal libc doesn't
define wint_t, and it is complex to do so correctly (must add
<wchar.h>, and use a lot of conditional tricks).
wint_t can differ from wchar_t in rank when wchar_t undergoes default
integral promotion, which it does on xtensa (wchar_t is unsigned
short). So we can use wchar_t as an approximation, except in va_arg
where we need to use a wider type: int covers this case.
Note that we still don't format wide characters, but we do want to
consume the correct amount of data for a default-promoted extended
character.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Whether char is signed or unsigned is toolchain and target specific.
Rather than assume it's signed (which is true for x86, but not for
ARM), do the right thing based on whether the minimum representable
value is less than zero.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
It may not be clear that the length modifiers reference native C types
with specific ranks. Document the core type for each modifier.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This function was designed to support the logging infrastructure's
need to copy values from va_list structures. It did not meet that
need, since some values need to be changed based on additional data
that is only available when the complete format specification is
examined. Remove the function as unnecessary.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Providing a literal width or precision that exceeds the non-negative
range of int does not appear to be rejected by the standard, but it
does produce a build diagnostic so we can't test it. Switch to an
equivalent form that doesn't affect line coverage.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>