boards: shields: Add support for X-NUCLEO-BNRG2A1 shield
Add support for X-NUCLEO-BNRG2A1 which is a BLE expansion board based on the BLUENRG-M2SP. Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit is contained in:
parent
d02f86a754
commit
85995e5688
24
boards/shields/x_nucleo_bnrg2a1/Kconfig.defconfig
Normal file
24
boards/shields/x_nucleo_bnrg2a1/Kconfig.defconfig
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Copyright (c) 2024 STMicroelectronics
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SHIELD_X_NUCLEO_BNRG2A1
|
||||
|
||||
if BT
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
choice BT_HCI_BUS_TYPE
|
||||
default BT_SPI
|
||||
endchoice
|
||||
|
||||
config BT_BLUENRG_ACI
|
||||
default y
|
||||
|
||||
# Disable Flow control
|
||||
config BT_HCI_ACL_FLOW_CONTROL
|
||||
default n
|
||||
|
||||
endif # BT
|
||||
|
||||
endif # SHIELD_X_NUCLEO_BNRG2A1
|
5
boards/shields/x_nucleo_bnrg2a1/Kconfig.shield
Normal file
5
boards/shields/x_nucleo_bnrg2a1/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 STMicroelectronics
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SHIELD_X_NUCLEO_BNRG2A1
|
||||
def_bool $(shields_list_contains,x_nucleo_bnrg2a1)
|
BIN
boards/shields/x_nucleo_bnrg2a1/doc/img/x-nucleo-bnrg2a1.webp
Normal file
BIN
boards/shields/x_nucleo_bnrg2a1/doc/img/x-nucleo-bnrg2a1.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
91
boards/shields/x_nucleo_bnrg2a1/doc/index.rst
Normal file
91
boards/shields/x_nucleo_bnrg2a1/doc/index.rst
Normal file
|
@ -0,0 +1,91 @@
|
|||
.. _x-nucleo-bnrg2a1:
|
||||
|
||||
X-NUCLEO-BNRG2A1: BLE expansion board
|
||||
#####################################
|
||||
|
||||
Overview
|
||||
********
|
||||
The X-NUCLEO-BNRG2A1 is a Bluetooth Low Energy evaluation board based on the
|
||||
BlueNRG-M2SP RF module to allow expansion of the STM32 Nucleo boards.
|
||||
The BlueNRG-M2SP module is FCC (FCC ID: S9NBNRGM2SP) and IC certified
|
||||
(IC: 8976C-BNRGM2SP).
|
||||
|
||||
The X-NUCLEO-BNRG2A1 is compatible with the ST Morpho and Arduino UNO R3
|
||||
connector layout (the user can mount the ST Morpho connectors, if required). The
|
||||
X-NUCLEO-BNRG2A1 interfaces with the host microcontroller via the SPI pins, and
|
||||
the user can change the default SPI clock, the SPI chip select and SPI IRQ by
|
||||
changing either one resistor or jumper on the evaluation board.
|
||||
|
||||
Note : This shield is compatible out of the box with Arduino UNO R3 connectors,
|
||||
but CS signal is not the standard Arduino SPI_CS signal.
|
||||
Please refer to "Hardware configuration" section.
|
||||
|
||||
.. image:: img/x-nucleo-bnrg2a1.webp
|
||||
:align: center
|
||||
:alt: X-NUCLEO-BNRG2A1
|
||||
|
||||
More information about the board can be found at the
|
||||
`X-NUCLEO-BNRG2A1 website`_.
|
||||
|
||||
Hardware configuration
|
||||
**********************
|
||||
|
||||
Out of the box, X-NUCLEO-BNRG2A1 shield expects SPI CS to be available on
|
||||
Arduino pin A1 instead of usual Arduino UNO R3 SPI CS D10.
|
||||
This is not a problem as CS signal is software driven gpio on Arduino A1
|
||||
see cs-gpios in x_nucleo_bnrg2a1.overlay
|
||||
|
||||
Shield configuration could be modified by moving resistors or changing jumper as
|
||||
follows:
|
||||
|
||||
- SPI SCK: to use D3 instead of D13, short J14 pins 2 and 3
|
||||
|
||||
Additionally, depending on your host board, some modifications of the BLE
|
||||
expansion board could be made:
|
||||
|
||||
- CS: To use D1 instead of A1, unmount R76 and mount R86
|
||||
|
||||
nucleo_l476rg does not need hardware modifications.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
X-NUCLEO-BNRG2A1 provides a BlueNRG-M2SP chip with the following key features:
|
||||
|
||||
- Bluetooth v5.2 compliant
|
||||
- Embedded BALF-NRG-02D3 integrated matched balun with harmonic filter
|
||||
- BLE data packet length extension
|
||||
|
||||
More information about X-NUCLEO-BNRG2A1 can be found here:
|
||||
- `X-NUCLEO-BNRG2A1 databrief`_
|
||||
|
||||
Programming
|
||||
***********
|
||||
|
||||
You can use the X-NUCLEO-BNRG2A1 as a Bluetooth Low-Energy controller
|
||||
shield with an SPI host controller interface (HCI-SPI). Activate the presence
|
||||
of the shield for the project build by adding the ``-DSHIELD`` arg to the
|
||||
build command:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: your_app
|
||||
:board: your_board_name
|
||||
:shield: x_nucleo_bnrg2a1
|
||||
:goals: build
|
||||
|
||||
Alternatively, set use of this shield in the project's ``CMakeLists.txt`` file:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
set(SHIELD x_nucleo_bnrg2a1)
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _X-NUCLEO-BNRG2A1 website:
|
||||
https://www.st.com/en/ecosystems/x-nucleo-bnrg2a1.html
|
||||
|
||||
.. _X-NUCLEO-BNRG2A1 databrief:
|
||||
https://www.st.com/resource/en/data_brief/x-nucleo-bnrg2a1.pdf
|
20
boards/shields/x_nucleo_bnrg2a1/x_nucleo_bnrg2a1.overlay
Normal file
20
boards/shields/x_nucleo_bnrg2a1/x_nucleo_bnrg2a1.overlay
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2024 STMicroelectronics
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&arduino_spi {
|
||||
cs-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; /* A1 */
|
||||
|
||||
bluenrg-2@0 {
|
||||
compatible = "st,hci-spi-v2";
|
||||
reg = <0>;
|
||||
reset-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */
|
||||
irq-gpios = <&arduino_header 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* A0 */
|
||||
spi-cpha; /* CPHA=1 */
|
||||
spi-hold-cs;
|
||||
spi-max-frequency = <DT_FREQ_M(1)>;
|
||||
reset-assert-duration-ms = <6>;
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue