The stm32 platform uses Matter sdk with FreeRTOS.
The stm32 platform is supported on:
Sample Matter applications are provided for the stm32 platform. They can be used
to speed up development. You can find them in the samples with /stm32
subfolder.
-
Set up STLINK tools
apt-get install stlink-tools
-
Building the Application
If the lighting example is to be built:
./scripts/build/build_examples.py --target stm32-$stm32_BOARD-lighting build
-
The output image files are stored in the subdirectories under
out
, the subdirectory name is the same as the argument specified after the option--target
when build the examples. -
After building the application,
ST-LINK
tool is used to flash it to the board. Before flashing the application, you will need to flash the fuse and the co processor binary. The co processor binary and fuse are available here Dynamic Concurrent Mode BLE Thread for Matter (Supports Full BLE Stack 5.2 certified and Minimal Thread Device ready v1.3)sudo st-flash write chip-stm32-lighting-example.bin 0x08000000
There is one commissioning modes supported by stm32 platform:
-
Build and Flash
-
The example will run automatically after booting the stm32 board.
-
Restore factory settings using B1 button by pressing at least 10 seconds
-
Commissioning with Chip-Tool,for example:
./chip-tool pairing ble-thread <node_id> <hex:xxx> <pin_code> <discriminator>
In this example, to commission the device onto a Matter network, it must be discoverable over Bluetooth LE. After powering up the device, the device will advertise automatically for 30 seconds. After this delay, you will need to reset the device to start the commissioning procedure.
In Matter, the commissioning procedure is done over Bluetooth LE between a Matter device and the Matter controller(, where the controller has the commissioner role.
To start the rendezvous, the controller must get the commissioning information from the Matter device. The data payload is encoded within a QR code, printed to the UART console.
The provisioning operation, which is the Last part of the rendezvous procedure, involves sending the Thread network credentials from the Matter controller to the Matter device. As a result, the device joins the Thread network via a OpenThread border Router (OTBR) and can communicate with other devices in the network.