Skip to content

Commit 45918da

Browse files
committed
Apply update for MCUXpresso SDK 2.16.100 RFP
Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
1 parent 5af687e commit 45918da

4 files changed

Lines changed: 97 additions & 34 deletions

File tree

boards/rw612/app_config.h

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,31 @@
1313
#define WIFI_BT_USE_IMU_INTERFACE 1
1414
#define RW610
1515

16+
/* Monolithic configure */
17+
/* Include CPU1 FW */
18+
#if CONFIG_WIFI_BLE_COEX_APP
1619
#define CONFIG_MONOLITHIC_WIFI 1
17-
#define CONFIG_MONOLITHIC_BT 0
18-
#define CONFIG_MONOLITHIC_IEEE802154 1
19-
#if ((CONFIG_MONOLITHIC_WIFI) || (CONFIG_MONOLITHIC_BT) || (CONFIG_MONOLITHIC_IEEE802154))
20+
#else
21+
#define CONFIG_MONOLITHIC_WIFI 0
22+
#endif
23+
24+
/* Include CPU2 FW */
25+
#if (CONFIG_OT_CLI) /* CPU2 FW using combo image (ble + 15.4, 15.4) */
26+
#define CONFIG_MONOLITHIC_BLE_15_4 1
27+
#define CONFIG_MONOLITHIC_BLE 0
28+
#elif !(CONFIG_DISABLE_BLE) /* CPU2 FW using ble only image (ble) */
29+
#define CONFIG_MONOLITHIC_BLE_15_4 0
30+
#define CONFIG_MONOLITHIC_BLE 1
31+
#else /* Not use CPU2 FW */
32+
#define CONFIG_MONOLITHIC_BLE_15_4 0
33+
#define CONFIG_MONOLITHIC_BLE 0
34+
#endif
35+
36+
#if (CONFIG_MONOLITHIC_BLE && CONFIG_MONOLITHIC_BLE_15_4)
37+
#error "The case that CONFIG_MONOLITHIC_BLE and CONFIG_MONOLITHIC_BLE_15_4 both be set is now allowed"
38+
#endif
39+
40+
#if ((CONFIG_MONOLITHIC_WIFI) || (CONFIG_MONOLITHIC_BLE) || (CONFIG_MONOLITHIC_BLE_15_4))
2041
#define CONFIG_MFG_MONOLITHIC 0
2142
#define CONFIG_SOC_SERIES_RW6XX_REVISION_A2 1
2243
#define gPlatformMonolithicApp_d 1

examples/coex_app/readme.md

Lines changed: 71 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
Overview
22
========
3+
34
The example to demonstrate the usage of Bluetooth BT/BLE and WiFi profiles coexistence.
45

5-
Before building the example application select Wi-Fi module macro in the app_config.h. (see #define WIFI_<SoC Name>_BOARD_<Module Name>).
6+
Before building the example application select Wi-Fi module macro in the app_config.h. (see #define WIFI_`<SoC Name>`_BOARD_`<Module Name>`).
67

78
This document provides step-by-step procedures to build and test the example,
89
and also instructions for running the included sample applications.
910

1011
SDK version
1112
===========
13+
1214
- Version: 2.16.100
1315

1416
Toolchain supported
1517
===================
18+
1619
Coex environment is suited to be run on a Linux-based OS (Ubuntu OS for example), WSL (Ubuntu 20.04 on Windows) or Windows (command line). There are three tools that need to be installed:
1720

1821
- CMake
@@ -22,46 +25,50 @@ Coex environment is suited to be run on a Linux-based OS (Ubuntu OS for example)
2225
Depending on system used installing each tool done differently.
2326

2427
**NOTE:**
28+
2529
1. Make sure that the paths of all these tools are set into the Path system variable.
2630
2. Tri radio coex app currently **only supports arm-gcc** compilation.
2731

2832
Hardware requirements
2933
=====================
34+
3035
- Micro USB cable
3136
- RD-RW61X-BGA/FRDMRW612 board
3237
- Personal Computer
3338

3439
Board settings
3540
==============
3641

37-
PIN NAME | RDRW612-BGA
38-
-------------|--------------------------
39-
FC0_UART_TXD | HD2(pin 3) <---> HD3(TX)
40-
FC0_UART_RXD | HD2(pin 2) <---> HD3(RX)
42+
| PIN NAME | RDRW612-BGA |
43+
| ------------ | ------------------------ |
44+
| FC0_UART_TXD | HD2(pin 3) <---> HD3(TX) |
45+
| FC0_UART_RXD | HD2(pin 2) <---> HD3(RX) |
4146

4247
**NOTE:**
48+
4349
1. For RDRW612-BGA/QFN A1&A2 board, need to confirm the following settings.
4450
- unload JP19, load JP9, JP23
4551
- Connect JP47 to GND.
4652

4753
> _Connecting JP47 to GND only needs to be GND once after power-on, and then it can be removed. Both A1&A2 JP47 and A0 JP30 are grounded to close U51._
4854
>
49-
> <font color=red>_The pins corresponding to U51 on different boards may not be JP47 or JP30, please check._</font>
55+
> `<font color=red>`_The pins corresponding to U51 on different boards may not be JP47 or JP30, please check._`</font>`
56+
>
5057
2. WiFi and BLE use `FC3` UART and OT uses `FC0` UART.
5158

52-
53-
5459
Building the examples
5560
=====================
5661

5762
### 1. Downloading repo:
5863

5964
Download the mcu-sdk-2.0 SDK package:
65+
6066
```bash
6167
$ cd <path-to-sdk>/
6268
```
6369

6470
Download the ot-nxp repo to `<path-to-sdk>/middleware/wireless/coex/third_party/`:
71+
6572
```bash
6673
$ cd <path-to-sdk>/middleware/wireless/coex/third_party/
6774
$ git clone https://github.com/NXP/ot-nxp.git -b v1.4.0-pvw1
@@ -72,6 +79,7 @@ $ git submodule update --init --recursive
7279
---
7380

7481
### 2. Build OT CLI library:
82+
7583
```bash
7684
# NOTE: Make sure the paths of the SDK package and arm-gcc tool are set to the Path system variable.
7785
# For example,
@@ -91,23 +99,22 @@ $ ./script/build_rw612 ot_cli -DOT_NXP_BUILD_APP_AS_LIB=ON -DBOARD_APP_UART_INS
9199

92100
Modify these macros to generate different coexistence images,
93101

94-
coexistence images | COEX_ENABLE_WIFI | COEX_ENABLE_BLE | COEX_ENABLE_OT | Simulation Case
95-
-----------------------|--------------------|-------------------|------------------|--------------------------
96-
WiFi + BLE | ON | ON | OFF | Matter over WiFi
97-
WiFi + OT | ON | OFF | ON | /
98-
BLE + OT | OFF | ON | ON | Matter over Thread
99-
WiFi + BLE + OT | ON | ON | ON | Matter over WiFi + OT BR
100-
102+
| coexistence images | COEX_ENABLE_WIFI | COEX_ENABLE_BLE | COEX_ENABLE_OT | Simulation Case |
103+
| ------------------ | ---------------- | --------------- | -------------- | ------------------------ |
104+
| WiFi + BLE | ON | ON | OFF | Matter over WiFi |
105+
| WiFi + OT | ON | OFF | ON | / |
106+
| BLE + OT | OFF | ON | ON | Matter over Thread |
107+
| WiFi + BLE + OT | ON | ON | ON | Matter over WiFi + OT BR |
101108

102109
> NOTE: If building BLE+OT, the ot libs should set `DOT_NXP_ENABLE_WPA_SUPP_MBEDTLS` to `OFF`.
103110
104111
Modify these options according to your needs,
105112

106-
Options | Value
107-
-----------------------|----------------------------------------------------------------------------
108-
COEX_NXP_BASE | `edgefast` (default) - base on edgefast-shell
109-
COEX_EXAMPLE_BOARD | `rdrw612bga` (default) - RW612-BGA, `frdmrw612` - FRDMRW612
110-
CMAKE_BUILD_TYPE | `flash_debug`(default), `flash_release` (**Use this option if you need to test throughput.**)
113+
| Options | Value |
114+
| ------------------ | ------------------------------------------------------------------------------------------------------- |
115+
| COEX_NXP_BASE | `edgefast` (default) - base on edgefast-shell |
116+
| COEX_EXAMPLE_BOARD | `rdrw612bga` (default) - RW612-BGA, `frdmrw612` - FRDMRW612 |
117+
| CMAKE_BUILD_TYPE | `flash_debug`(default), `flash_release` (**Use this option if you need to test throughput.**) |
111118

112119
```bash
113120
# For coex_cli example,
@@ -119,17 +126,24 @@ $ ./script/build_rw612 coex_wpa_supplicant -DCOEX_ENABLE_WIFI=ON -DCOEX_ENABLE_B
119126
```
120127

121128
After a successful coex_cli build, the `elf` and `binary` files are found in `build_rw612/rw612_coex_cli/bin`:
129+
122130
- coex_cli.elf (the elf image)
123131
- coex_cli.bin (the binary)
124132

125133
After a successful coex_wpa_supplicant build, the `elf` and `binary` files are found in `build_rw612/rw612_coex_wpa_supplicant/bin`:
134+
126135
- coex_wpa_supplicant.elf (the elf image)
127136
- coex_wpa_supplicant.bin (the binary)
128137

129138
Flash Binaries
130139
==============
131140

141+
> Note: Monolithic feature is default enabled, this means it's no need to flash binaries manually.
142+
>
143+
> If want to disable monolithic feature, for CPU1 need set `CONFIG_MONOLITHIC_WIFI` to `0` ; for CPU2 need set `gPlatformMonolithicApp_d` to `0`
144+
132145
At this point flash the image with the following command,
146+
133147
```bash
134148
# PFW is wrapped into SDK package -> <sdk package>/components/conn_fwloader/fw_bin
135149

@@ -145,19 +159,22 @@ J-Link> loadbin C:\xxx\coex_wpa_supplicant.bin, 0x08000000
145159

146160
Prepare the Demo
147161
================
148-
1. Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the board.
149-
2. Open a serial terminal with the following settings:
150-
- 115200 baud rate
151-
- 8 data bits
152-
- No parity
153-
- One stop bit
154-
- No flow control
155-
3. Download the program to the target board.
156-
4. Launch the debugger in your IDE to begin running the example.
162+
163+
1. Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the board.
164+
2. Open a serial terminal with the following settings:
165+
- 115200 baud rate
166+
- 8 data bits
167+
- No parity
168+
- One stop bit
169+
- No flow control
170+
3. Download the program to the target board.
171+
4. Launch the debugger in your IDE to begin running the example.
157172

158173
Running the example
159-
================
174+
===================
175+
160176
The log below shows the output of the coex examples (based on edgefast-shell) in the terminal window:
177+
161178
```bash
162179
Coex APP
163180

@@ -176,25 +193,32 @@ BLE shell initialization
176193

177194
@Coex>
178195
```
196+
179197
1. WiFi Test
180198

181199
> NOTE: All wifi commands require adding `wifi.` prefix.
200+
182201
- Get the Wi-Fi driver and firmware version:
202+
183203
```bash
184204
@Coex> wifi.wlan-version
185205
WLAN Driver Version : v1.3.r48.p10
186206
@Coex> WLAN Firmware Version : rw610w-V2, IMU, FP99, 18.99.6.p6, PVE_FIX 1
187207
Command wlan-version
188208
```
209+
189210
- Get MAC Address:
211+
190212
```bash
191213
@Coex> wifi.wlan-mac
192214
MAC address
193215
@Coex> STA MAC Address: 00:50:43:02:98:23
194216
uAP MAC Address: 00:50:43:02:99:23
195217
Command wlan-mac
196218
```
219+
197220
- Scan the network:
221+
198222
```bash
199223
@Coex> wifi.wlan-scan
200224
Scan scheduled...
@@ -223,8 +247,11 @@ Scan scheduled...
223247
```
224248

225249
2. BLE Test
250+
226251
> NOTE: Please use the command "help" to view the specific commands supported by the example.
252+
227253
- BLE scan devices (the BLE host must initialized before):
254+
228255
```bash
229256
@Coex> bt.init
230257
@Coex> Bluetooth initialized
@@ -249,7 +276,9 @@ Bluetooth active scan enabled
249276
Scan successfully stopped
250277
@Coex>
251278
```
279+
252280
- BLE advertise (the BLE host must initialized before):
281+
253282
```bash
254283
@Coex> bt.init
255284
@Coex> Bluetooth initialized
@@ -258,15 +287,19 @@ Advertising started
258287
@Coex> bt.advertise off
259288
Advertising stopped
260289
```
290+
261291
- BLE connect (the BLE host must initialized before):
292+
262293
```bash
263294
@Coex> bt.init
264295
@Coex> Bluetooth initialized
265296
@Coex> bt.connect C0:95:63:23:55:87 random
266297
Connection pending
267298
Connected: 7D:FD:FD:4D:FD:90 (random)
268299
```
300+
269301
- BLE pairing and bonding:
302+
270303
```bash
271304
GATT peripheral role side,
272305
1. Initialize the Host, press "bt.init",
@@ -285,7 +318,9 @@ GATT central role side,
285318
it could be started from central side by pressing "bt.security <level>", such as "bt.security 2".
286319
6. If the bondable is unsupported by central role, press "bt.bondable off". Then start step 5.
287320
```
321+
288322
- BLE 1M/2M/Coded PHY update:
323+
289324
```bash
290325
GATT peripheral role side,
291326
1. Initialize the Host, press "bt.init",
@@ -307,7 +342,9 @@ GATT central role side,
307342
such as "bt.phy-update 2 2".
308343
6. The message "LE PHY updated: TX PHY LE 2M, RX PHY LE 2M" would be printed if the phy is updated. note, if peer do not support phy update, then this message will not be printed.
309344
```
345+
310346
- BLE Data Packet Length Extension update:
347+
311348
```bash
312349
GATT peripheral role side,
313350
1. Initialize the Host, press "bt.init".
@@ -359,7 +396,9 @@ LE data len updated: TX (len: 50 time: 512) RX (len: 27 time: 328)
359396
7. When LE data len is updated by the peer device, below information will be printed.
360397
LE data len updated: TX (len: 50 time: 512) RX (len: 65 time: 632)
361398
```
399+
362400
- BLE GATT data signing:
401+
363402
```bash
364403
GATT peripheral role side,
365404
1. Initialize the Host, press "bt.init",
@@ -385,7 +424,9 @@ GATT central role side,
385424
perform the GATT data signing sequence, press "gatt.signed-write <handle> <data> [length] [repeat]",
386425
such as "gatt.signed-write 22 AA 1"
387426
```
427+
388428
- BLE GATT Service Changed Indication:
429+
389430
```bash
390431
GATT peripheral role side,
391432
1. Initialize the Host, press "bt.init",

src/configs/ble/app_bluetooth_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#endif
4141

4242
#define CONFIG_BLE_ADV_REPORT_BUFFER_FILTER 1
43+
#define CONFIG_BT_RX_STACK_SIZE 2500
4344

4445
#define CONFIG_BT_SNOOP 1
4546
#define CONFIG_BT_RF_TEST_MODE 1

src/configs/ble/edgefast_bluetooth_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* with specified driver, should be no less than 512.
4343
*/
4444
#ifndef CONFIG_BT_HCI_TX_STACK_SIZE
45-
#define CONFIG_BT_HCI_TX_STACK_SIZE 1024
45+
#define CONFIG_BT_HCI_TX_STACK_SIZE 2048
4646
#endif
4747

4848
/*! @brief HCI TX task priority.

0 commit comments

Comments
 (0)