Skip to content

Commit

Permalink
boards: frdm_mcxw71: Add BLE info to doc + Enable second UART instance
Browse files Browse the repository at this point in the history
- Add second UART needed for bt_tester app.
- Update doc with BLE info

Signed-off-by: Yassine El Aissaoui <[email protected]>
  • Loading branch information
yeaissa committed Oct 15, 2024
1 parent 5126d18 commit 0b3e2fe
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
49 changes: 49 additions & 0 deletions boards/nxp/frdm_mcxw71/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,18 @@ The ``frdm_mcxw71`` board target in Zephyr currently supports the following feat
+-----------+------------+-------------------------------------+
| LPTMR | on-chip | counter |
+-----------+------------+-------------------------------------+
| BLE | on-chip | Bluetooth |
+-----------+------------+-------------------------------------+

Fetch Binary Blobs
******************

To support Bluetooth, frdm_mcxw71 requires fetching binary blobs, which can be
achieved by running the following command:

.. code-block:: console
west blobs fetch hal_nxp
Programming and Debugging
*************************
Expand Down Expand Up @@ -140,6 +151,44 @@ should see the following message in the terminal:
*** Booting Zephyr OS build v3.7.0-xxx-xxxx ***
Hello World! frdm_mcxw71/mcxw716c
Bluetooth
=========

BLE functionality requires to fetch binary blobs, so make sure to follow
the ``Fetch Binary Blobs`` section first.

Two images must be written to the board: one for the host (CM33) and one for the NBU (CM3).
- To flash the application (CM33) refer to the ``Flashing`` section above.
- To flash the NBU, follow the instructions below:

* Install ``blhost`` from NXP's website. This is the tool that will allow you to flash the NBU.
* Enter ISP mode. To boot the MCU in ISP mode, follow these steps:
- Disconnect the ``FRDM-MCXW71`` board from all power sources.
- Keep the ``SW3`` (ISP) button on the board pressed, while connecting the board to the host computer USB port.
- Release the ``SW3`` (ISP) button. The MCXW71 MCU boots in ISP mode.
- Reconnect any external power supply, if needed.
* Use the following command to flash NBU file:

.. code-block:: console
# On Windows
blhost.exe -p COMxx -- receive-sb-file mcxw71_nbu_ble.sb3
# On Linux
./blhost -p /dev/ttyxx -- receive-sb-file mcxw71_nbu_ble.sb3
Please consider changing ``COMxx`` on Windows or ``ttyxx`` on Linux to the serial port used by your board.

The NBU file can be found in : ``<zephyr workspace>/modules/hal/nxp/zephyr/blobs/mcxw71/mcxw71_nbu_ble.sb3``

For more details:

.. _MCXW71 In-System Programming Utility:
https://docs.nxp.com/bundle/AN14427/page/topics/introduction.html

.. _blhost Website:
https://www.nxp.com/search?keyword=blhost&start=0

References
**********

Expand Down
8 changes: 8 additions & 0 deletions boards/nxp/frdm_mcxw71/frdm_mcxw71-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
#include <nxp/mcx/MCXW716CMFTA-pinctrl.h>

&pinctrl {
pinmux_lpuart0: pinmux_lpuart0 {
group0 {
pinmux = <LPUART0_RX_PTA16>, <LPUART0_TX_PTA17>;
drive-strength = "low";
slew-rate = "fast";
};
};

pinmux_lpuart1: pinmux_lpuart1 {
group0 {
pinmux = <LPUART1_RX_PTC2>, <LPUART1_TX_PTC3>;
Expand Down
8 changes: 8 additions & 0 deletions boards/nxp/frdm_mcxw71/frdm_mcxw71.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
zephyr,sram = &stcm0;
zephyr,console = &lpuart1;
zephyr,shell-uart = &lpuart1;
zephyr,uart-pipe = &lpuart0;
};

user_led {
Expand Down Expand Up @@ -52,6 +53,13 @@
status = "okay";
};

&lpuart0 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&pinmux_lpuart0>;
pinctrl-names = "default";
};

&lpuart1 {
current-speed = <115200>;
status = "okay";
Expand Down

0 comments on commit 0b3e2fe

Please sign in to comment.