samples: Bluetooth: df: Forward GPIO pins from app to network core

To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.

There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.

The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
Piotr Pryga 2022-02-11 18:40:23 +01:00 committed by Marti Bolivar
commit fc6b100bc8
8 changed files with 92 additions and 0 deletions

View file

@ -45,6 +45,9 @@ enabled:
:zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.overlay`
to a new file,
:file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Make sure the same GPIO pins are assigned to Direction Finding Extension in file
:zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf5340dk_nrf5340_cpuapp.overlay`.
as those in the created file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Copy
:zephyr_file:`samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf`
to a new file,

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <&gpio0 0 0>,
<&gpio0 1 0>,
<&gpio0 2 0>,
<&gpio0 3 0>;
};
};

View file

@ -45,6 +45,9 @@ enabled:
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.overlay`
to a new file,
:file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Make sure the same GPIO pins are assigned to Direction Finding Extension in file
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf5340dk_nrf5340_cpuapp.overlay`.
as those in the created file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Copy
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf`
to a new file,

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <&gpio0 0 0>,
<&gpio0 1 0>,
<&gpio0 2 0>,
<&gpio0 3 0>;
};
};

View file

@ -45,6 +45,9 @@ support enabled:
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.overlay`
to a new file,
:file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Make sure the same GPIO pins are assigned to Direction Finding Extension in file
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_tx/boards/nrf5340dk_nrf5340_cpuapp.overlay`.
as those in the created file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Copy
:zephyr_file:`samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf`
to a new file,

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <&gpio0 0 0>,
<&gpio0 1 0>,
<&gpio0 2 0>,
<&gpio0 3 0>;
};
};

View file

@ -44,6 +44,9 @@ enabled:
:zephyr_file:`samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52833.overlay`
to a new file,
:file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Make sure the same GPIO pins are assigned to Direction Finding Extension in file
:zephyr_file:`samples/bluetooth/direction_finding_peripheral/boards/nrf5340dk_nrf5340_cpuapp.overlay`.
as those in the created file :file:`samples/bluetooth/hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.overlay`.
* Copy
:zephyr_file:`samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52833.conf`
to a new file,

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <&gpio0 0 0>,
<&gpio0 1 0>,
<&gpio0 2 0>,
<&gpio0 3 0>;
};
};