diff --git a/boards/shields/mchp_rnbd451_bt/Kconfig.defconfig b/boards/shields/mchp_rnbd451_bt/Kconfig.defconfig new file mode 100644 index 0000000000000..9767703276454 --- /dev/null +++ b/boards/shields/mchp_rnbd451_bt/Kconfig.defconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2025 Microchip Technology Inc. +# SPDX-License-Identifier: Apache-2.0 + +config MAIN_STACK_SIZE + default 2048 if BT_HOST_CRYPTO + +config BT_BUF_ACL_TX_COUNT + default 12 + +config BT_BUF_EVT_RX_COUNT + default 13 diff --git a/boards/shields/mchp_rnbd451_bt/Kconfig.shield b/boards/shields/mchp_rnbd451_bt/Kconfig.shield new file mode 100644 index 0000000000000..07c694185d161 --- /dev/null +++ b/boards/shields/mchp_rnbd451_bt/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2025 Microchip Technology Inc. +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_MCHP_RNBD451_BT + def_bool $(shields_list_contains,mchp_rnbd451_bt) diff --git a/boards/shields/mchp_rnbd451_bt/boards/sam_e54_xpro.overlay b/boards/shields/mchp_rnbd451_bt/boards/sam_e54_xpro.overlay new file mode 100644 index 0000000000000..f504a08b25a06 --- /dev/null +++ b/boards/shields/mchp_rnbd451_bt/boards/sam_e54_xpro.overlay @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Microchip Technology Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + + + +&sercom2{ + current-speed = <115200>; +}; + +/*EXT1*/ +&pinctrl{ + sercom0_uart_default: sercom0_uart_default { + group1 { + pinmux = , + ; + }; + }; +}; + +&sercom0{ + status = "okay"; + compatible = "microchip,sercom-g1-uart"; + #address-cells = <1>; + #size-cells = <0>; + + current-speed = <115200>; + data-bits = <8>; + parity = "none"; + stop-bits = "1"; + + rxpo = <1>; + txpo = <0>; + + pinctrl-0 = <&sercom0_uart_default>; + pinctrl-names = "default"; +}; + +&nvmctrl{ + status = "okay"; +}; diff --git a/boards/shields/mchp_rnbd451_bt/doc/img/2080-atmbusadapter-xpro.webp b/boards/shields/mchp_rnbd451_bt/doc/img/2080-atmbusadapter-xpro.webp new file mode 100644 index 0000000000000..82a631030b046 Binary files /dev/null and b/boards/shields/mchp_rnbd451_bt/doc/img/2080-atmbusadapter-xpro.webp differ diff --git a/boards/shields/mchp_rnbd451_bt/doc/img/rnbd451-add-on-board.webp b/boards/shields/mchp_rnbd451_bt/doc/img/rnbd451-add-on-board.webp new file mode 100644 index 0000000000000..0e36179da18ef Binary files /dev/null and b/boards/shields/mchp_rnbd451_bt/doc/img/rnbd451-add-on-board.webp differ diff --git a/boards/shields/mchp_rnbd451_bt/doc/img/same54-with-rnbd451.webp b/boards/shields/mchp_rnbd451_bt/doc/img/same54-with-rnbd451.webp new file mode 100644 index 0000000000000..dbe4e301caad5 Binary files /dev/null and b/boards/shields/mchp_rnbd451_bt/doc/img/same54-with-rnbd451.webp differ diff --git a/boards/shields/mchp_rnbd451_bt/doc/index.rst b/boards/shields/mchp_rnbd451_bt/doc/index.rst new file mode 100644 index 0000000000000..c9d3ccd5990b6 --- /dev/null +++ b/boards/shields/mchp_rnbd451_bt/doc/index.rst @@ -0,0 +1,165 @@ +.. _rnbd451_add_on_shield: + +RNBD451 Add-on Board +############################### + +Overview +******** + +The RNBD451 Add-on Board is an efficient low-cost development platform to evaluate and demonstrate +the features, capabilities and interfaces of our Bluetooth® Low Energy module, RNBD451PE. +The add-on board is compliant to the mikroBUS™ standard and includes an on-board MCP2200 USB-to-UART +converter enabling out-of-box evaluation with no other hardware requirements. + +.. figure:: img/rnbd451-add-on-board.webp + :height: 350px + :align: center + :alt: RNBD451 Add-on Board + + **Figure 1: RNBD451 Add-on Board** + +Requirements +************ + +This shield is compatible with a development board that includes a mikroBUS™ socket. +If a mikroBUS socket is not available, a mikroBUS adapter can be used to provide both an +extension header and a mikroBUS interface. The mikroBUS™ Xplained Pro is an extension Board +for the Xplained Pro evaluation platform, designed to support mikroBUS™ Click boards™ with +Xplained Pro MCU boards. + + +.. figure:: img/2080-atmbusadapter-xpro.webp + :height: 300px + :align: center + :alt: ATMBUSADAPTER-XPRO - mikroBUS Adapter + + **Figure 2: ATMBUSADAPTER-XPRO - mikroBUS Adapter** + + +Environment setup +***************** + +Refer to "`Getting Started Guide +`_" +in "`Developing with Zephyr +`_" +for installation instructions. +After successful installation, the Zephyr SDK environment should be fully set up. +All the sample applications listed here can be found in ``zephyrproject/zephyr/samples/bluetooth``, +assuming the Zephyr SDK document is followed and the west workspace is named as "zephyrproject". + +.. note:: + + When bringing up the RNBD451 Bluetooth Low Energy (BLE) controller after a Power-On Reset (POR), + the Zephyr Bluetooth subsystem sends the **HCI reset command** (the first HCI command) to the BLE + controller. However, in the original design, this command is sent too early for the RNBD451, as + it takes approximately 4xx ms from POR to be ready to accept the first HCI command. + + To address this timing issue, introduce a delay in the Zephyr application to enable Bluetooth. + This delay ensures that the **HCI reset command** is sent at the appropriate time. Add the following + code snippet to the application to introduce a 500 ms delay before calling ``bt_enable()``: + + ``k_sleep(K_MSEC(500));`` + + Additionally, to prevent a voltage drop on the **extension header VCC pin**—which may cause the + RNBD451 to undergo a hardware reset after power-on; set **J100** to the **“BYPASS”** position. For more + information, refer to the `SAM E54 Xplained Pro Design Documentation (New Red PCB)`_. + +Hardware setting +**************** + +Using the SAM E54 Xplained Pro as an example, follow these steps to setup the hardware. + +#. Connect SAM E54 Xplained Pro Standard Extension Header (EXT1) with the mikroBUS Xplained Pro. +#. Connect the RNBD451 to the mikroBUS Xplained Pro. +#. Set the PWR_SEL jumper on the RNBD451 to Mikro 3V3 (to use power supplied by mikroBUS). +#. Connect a USB cable to the Debug USB port. + +.. figure:: img/same54-with-rnbd451.webp + :align: center + :alt: RNBD451 Connected to ATMBUSADAPTER-XPRO and Mounted on SAM E54 Extension Header + + **Figure 3: RNBD451 Connected to ATMBUSADAPTER-XPRO and Mounted on SAM E54 Extension Header** + +.. note:: + + When using a different Extension Header on the SAM E54 Xplained Pro, update the + ``rnbd451.overlay`` file accordingly. + For more details, refer to the `SAM E54 Xplained Pro + User Guide`_. + +For more information about interfacing with the ATMBUSADAPTER-XPRO mikroBUS adapter, +refer to the `RNBD451 Add-on Board Primary User Guide`_ + +Sample application project configuration (prj.conf) +*************************************************** + +To select the HCI Host mode and the H4 driver, while disabling the built-in controller, +add the following configurations:: + + CONFIG_BT_HCI=y + CONFIG_BT_H4=y + CONFIG_BT_CTLR=n + +To disable Bluetooth Controller to Bluetooth Host flow control, which is not supported +by RNBD451, add the following:: + + CONFIG_BT_HCI_ACL_FLOW_CONTROL=n + +To prevent the net-buffer from being drained during scan activity in the Central Multilink application, which can result in +Controller unresponsive error, increase CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT from 3 to 12. + + CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=12 + + +Build the Applications +********************** + +Navigate to the project root directory. For example, if the Zephyr workspace was setup +following the Application Development section in the Zephyr Project Documentation, +use the following command. + +``cd zephyrproject`` + +Append the above mentioned ``prj.conf`` configurations to each ``prj.conf`` in Example #1~#5. +Build the applications located in ``zephyr/samples/bluetooth`` using the following commands: + ++----+---------------------+------------------------------------------------------------------------------------------------------------+ +| No | Example name | Build command | ++====+=====================+============================================================================================================+ +| 1 | Peripheral | west build -p always -b sam_e54_xpro --shield mchp_rnbd451_bt zephyr/samples/bluetooth/peripheral | ++----+---------------------+------------------------------------------------------------------------------------------------------------+ +| 2 | HID Peripheral | west build -p always -b sam_e54_xpro --shield mchp_rnbd451_bt zephyr/samples/bluetooth/peripheral_hids | ++----+---------------------+------------------------------------------------------------------------------------------------------------+ +| 3 | Peripheral Identity | west build -p always -b sam_e54_xpro --shield mchp_rnbd451_bt zephyr/samples/bluetooth/peripheral_identity | ++----+---------------------+------------------------------------------------------------------------------------------------------------+ +| 4 | Central Multilink | west build -p always -b sam_e54_xpro --shield mchp_rnbd451_bt zephyr/samples/bluetooth/central_multilink | ++----+---------------------+------------------------------------------------------------------------------------------------------------+ +| 5 | Central/Gatt Write | west build -p always -b sam_e54_xpro --shield mchp_rnbd451_bt zephyr/samples/bluetooth/central_gatt_write | ++----+---------------------+------------------------------------------------------------------------------------------------------------+ + + +For more information on building the applications, refer to the `Building +`_ +section. + +Flash the Applications +********************** +To flash the built application, use the following command: + +``west flash`` + + +References +********** + +.. target-notes:: + +.. _SAM E54 Xplained Pro Design Documentation (New Red PCB): + https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/BoardDesignFiles/SAM-E54-Xplained-Pro-Design-Documentation-Rev11.zip + +.. _SAM E54 Xplained Pro User guide: + https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/UserGuides/70005321A.pdf + +.. _RNBD451 Add-on Board Primary User Guide: + https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/UserGuides/RNBD451-Add-On-Board-User-Guide-DS50003476.pdf diff --git a/boards/shields/mchp_rnbd451_bt/mchp_rnbd451_bt.overlay b/boards/shields/mchp_rnbd451_bt/mchp_rnbd451_bt.overlay new file mode 100644 index 0000000000000..d83dbb17ec654 --- /dev/null +++ b/boards/shields/mchp_rnbd451_bt/mchp_rnbd451_bt.overlay @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Microchip Technology Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + chosen { + zephyr,bt-hci = &bt_hci_uart; + }; +}; + +&sercom0{ + bt_hci_uart: bt_hci_uart { + compatible = "zephyr,bt-hci-uart"; + status = "okay"; + }; +};