Please see MCXW72
product page for more information.
This reference app is using matter-cli
to send commands to the board through a UART interface.
interface | role |
---|---|
UART0 | Used for logs |
UART1 | Used for matter-cli and flashing |
The user actions are summarized below:
matter-cli command | output |
---|---|
mattercommissioning on | Enable BLE advertising |
mattercommissioning off | Disable BLE advertising |
matterfactoryreset | Initiate a factory reset |
matterreset | Reset the device |
You need a USB-UART
bridge to make use of the second UART interface. The pin configuration is the following:
JP11 pin 1
(UART0 TX)JP12 pin 1
(UART0 RX)J11 pin 4
(GND)The state feedback is also provided through LED effects:
widget | effect | description |
---|---|---|
LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. |
LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. |
LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. |
LED2 | solid on | The device is fully provisioned and has full network and service connectivity. |
RGB LED | on | The LockState attribute of the DoorLock cluster is Unlocked . |
RGB LED | off | The LockState attribute of the DoorLock cluster is Locked . |
The user actions are summarized below:
button | action | state | output |
---|---|---|---|
SW2 | short press | not commissioned | Enable BLE advertising |
SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) |
SW3 | short press | NA | Toggle attribute LockState value |
SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) |
Manually building requires running the following commands:
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_SDK_ROOT=<path_to_SDK> user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/mcxw72 user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw72$ gn gen out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw72$ ninja -C out/debug
Please note that running gn gen out/debug
without --args
option will use the default gn args values found in args.gni
.
After a successful build, the elf
and srec
files are found in out/debug/
. See the files prefixed with chip-mcxw72-lock-example
.
We recommend using JLink to flash both host and NBU
cores. To support this device, a JLink
patch shall be applied, so please contact your NXP liaison for guidance.
core | JLink target |
---|---|
host | KW47B42ZB7_M33_0 |
NBU | KW47B42ZB7_M33_1 |
Note: NBU
image should be written only when a new NXP SDK is released.
NBU
image with blhost
Install Secure Provisioning SDK tool using Python:
pip install spsdk
Note: There might be some dependencies that cause conflicts with already installed Python modules. However, blhost
tool is still installed and can be used.
Updating NBU
Firmware for Wireless examples
It is necessary to work with the matching NBU
image for the SDK version of the application you are working with. This means that when you download your SDK, prior to loading any wireless SDK example, update your NBU
image with the SDK provided binaries:
middleware\wireless\ieee-802.15.4\bin\mcxw72\mcxw72_nbu_ble_15_4_dyn.bin
Place your device in ISP
mode:
SW4
(BOOT_CONFIG
)SW1
(RST
)SW1
SW4
Once the device is connected, you may find the assigned port by running:
nxpdevscan
Run the blhost
command to write the bin
file:
blhost -p <assigned_port> write-memory 0x48800000 <path_to_SDK>/middleware/wireless/ieee-802.15.4/bin/mcxw72/mcxw72_nbu_ble_15_4_dyn.bin
NBU
image with JLink
Steps:
MCXW72-EVK
board into the USB portJLinkExe -device KW47B42ZB7_M33_1 -if SWD -speed 4000 -autoconnect 1
reset halt loadbin <path_to_SDK>/middleware/wireless/ieee-802.15.4/bin/mcxw72/mcxw72_nbu_ble_15_4_dyn.bin 0 reset go quit
Note: If running into issues related to board connection, please refer to Flashing the NBU
image with blhost
. This might be needed when the NBU
core is empty.
Host image is the one found under out/debug/
. It should be written after each build process.
Steps:
MCXW72-EVK
board into the USB portJLinkExe -device KW47B42ZB7_M33_0 -if SWD -speed 4000 -autoconnect 1
reset halt loadfile chip-mcxw72-lock-example.srec reset go quit
Factory data is written in IFR0, sector 1
at a predefined offset, using blhost
. The expanded address is 0x2002680
:
blhost --port <serial_port> flash-erase-region 0x2002680 <factory_data_len> blhost --port <serial_port> write-memory 0x2002680 <factory_data_bin>
where <serial_port>
is the OS assigned port, <factory_data_len>
the length of factory data binary in bytes and <factory_data_bin>
the path to the factory data binary.
Please see OTA guide.
To compile with the Multiple BLE connections support demo example add the gn argument nxp_multiple_ble_connections=true
.
The application will accept multiple BLE connections after commissioning, by pressing the BLE advertise button again. Once discovered by a BLE central, a custom GATT service will be visible on the device.
The user can change the default behavior by implementing the class defined in BLEApplicationManager.h