|
| 1 | +# STM32 Getting Started Guide |
| 2 | + |
| 3 | +The stm32 platform uses |
| 4 | +[Matter](https://github.com/project-chip/connectedhomeip) sdk with FreeRTOS. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +- [stm32 Getting Started Guide](#stm32-getting-started-guide) |
| 9 | + - [Supported Chips](#supported-chips) |
| 10 | + - [Matter Example Applications](#matter-example-applications) |
| 11 | + - [Building the Example Application](#building-the-example-application) |
| 12 | + - [Commissioning](#commissioning) |
| 13 | + - [BLE-Thread mode](#ble-thread-mode) |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Supported Chips |
| 18 | + |
| 19 | +The stm32 platform is supported on: |
| 20 | + |
| 21 | +- [STM32WB5MM-DK](https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html) |
| 22 | + |
| 23 | +## Matter Example Applications |
| 24 | + |
| 25 | +Sample Matter applications are provided for the stm32 platform. They can be used |
| 26 | +to speed up development. You can find them in the samples with `/stm32` |
| 27 | +subfolder. |
| 28 | + |
| 29 | +## Building the Example Application |
| 30 | + |
| 31 | +- [Set Up Matter Environment](./BUILDING.md) |
| 32 | + |
| 33 | +- Set up STLINK tools |
| 34 | + |
| 35 | + ``` |
| 36 | + apt-get install stlink-tools |
| 37 | + ``` |
| 38 | +
|
| 39 | +- Building the Application |
| 40 | +
|
| 41 | + If the lighting example is to be built: |
| 42 | +
|
| 43 | + ``` |
| 44 | + ./scripts/build/build_examples.py --target stm32-$stm32_BOARD-lighting build |
| 45 | + ``` |
| 46 | +
|
| 47 | +- The output image files are stored in the subdirectories under `out`, the |
| 48 | + subdirectory name is the same as the argument specified after the option |
| 49 | + `--target` when build the examples. |
| 50 | +
|
| 51 | +- After building the application, `ST-LINK` tool is used to flash it to the |
| 52 | + board. Before flashing the application, you will need to flash the fuse and |
| 53 | + the co processor binary. The co processor binary and fuse are available |
| 54 | + [here](https://github.com/stm32-hotspot/stm32wb-matter-device-over-thread/tree/main/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x) |
| 55 | + Dynamic Concurrent Mode BLE Thread for Matter (Supports Full BLE Stack 5.2 |
| 56 | + certified and Minimal Thread Device ready v1.3) |
| 57 | +
|
| 58 | + ``` |
| 59 | + sudo st-flash write chip-stm32-lighting-example.bin 0x08000000 |
| 60 | +
|
| 61 | + ``` |
| 62 | +
|
| 63 | +## Commissioning |
| 64 | +
|
| 65 | +There is one commissioning modes supported by stm32 platform: |
| 66 | +
|
| 67 | +### BLE-Thread mode |
| 68 | +
|
| 69 | +1. Build and Flash |
| 70 | +2. The example will run automatically after booting the stm32 board. |
| 71 | +3. Restore factory settings using B1 button by pressing at least 10 seconds |
| 72 | +4. Commissioning with |
| 73 | + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool),for |
| 74 | + example: |
| 75 | +
|
| 76 | + ``` |
| 77 | + ./chip-tool pairing ble-thread <node_id> <hex:xxx> <pin_code> <discriminator> |
| 78 | + ``` |
| 79 | +
|
| 80 | +### Bluetooth LE advertising |
| 81 | +
|
| 82 | +In this example, to commission the device onto a Matter network, it must be |
| 83 | +discoverable over Bluetooth LE. After powering up the device, the device will |
| 84 | +advertise automatically for 30 seconds. After this delay, you will need to reset |
| 85 | +the device to start the commissioning procedure. |
| 86 | +
|
| 87 | +### Bluetooth LE rendezvous |
| 88 | +
|
| 89 | +In Matter, the commissioning procedure is done over Bluetooth LE between a |
| 90 | +Matter device and the Matter controller(, where the controller has the |
| 91 | +commissioner role. |
| 92 | +
|
| 93 | +To start the rendezvous, the controller must get the commissioning information |
| 94 | +from the Matter device. The data payload is encoded within a QR code, printed to |
| 95 | +the UART console. |
| 96 | +
|
| 97 | +### Thread provisioning |
| 98 | +
|
| 99 | +The provisioning operation, which is the Last part of the rendezvous procedure, |
| 100 | +involves sending the Thread network credentials from the Matter controller to |
| 101 | +the Matter device. As a result, the device joins the Thread network via a |
| 102 | +OpenThread border Router (OTBR) and can communicate with other devices in the |
| 103 | +network. |
0 commit comments