EFR32MG24
This example functions as a light bulb device type, with on/off capabilities. The steps were verified on SiLabs EFR32MG24 development board.
This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005
.
Initial setup
- Install dependencies as specified in the
connectedhomeip
repository: - Install Simplicity
Commander
and make sure its binary (commander) is in your
PATH
. For example:export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
- Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
- Clone and initialize the
connectedhomeip
repo:cd ~
git clone https://github.com/project-chip/connectedhomeip.git
cd connectedhomeip
git fetch origin v1.0-branch
git checkout FETCH_HEAD
git submodule update --init --recursive
source ./scripts/activate.sh
- Export environment variables:
- If your board is the 10 dBm version, use
BRD4186C
:export EFR32_BOARD=BRD4186C
- If your board is the 20 dBm version, use
BRD4187C
:export EFR32_BOARD=BRD4187C
- If your board is the 10 dBm version, use
Build the image and flash the board
- Build the image for the lighting app:
The image will be generated incd examples/lighting-app/efr32
source third_party/connectedhomeip/scripts/activate.sh
gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
ninja -C out/debug
out/debug
folder. - Connect the EFR32 board with your computer and flash the image to your
EFR32 board:
python3 out/debug/chip-efr32-lighting-example.flash.py --erase
Install bootloader
- Open Simplicity Commander:
commander
- Open the "Select Kit..." dropdown in the upper-left corner and select the kit to be flashed with a bootloader. This menu is populated with all the JLink devices detected and lists them by serial number. For ease of selection, unplug all JLink capable devices except the device to be flashed so that the list is only populated with one kit.
- Select the Flash tile on the left side.
- In the Flash MCU section, click Browse.
Navigate to
connectedhomeip/third_party/silabs/matter_support/matter/efr32/bootloader_binaries
and find the.s37
file that matches theEFR32_BOARD
environment variable you set:- If your board is the 10 dBm version and you used
BRD4186C
, selectbootloader-storage-spiflash-single-1024k-BRD4186C-gsdk4.1.s37
. - If your board is the 20 dBm version and you used
BRD4187C
, selectbootloader-storage-spiflash-single-1024k-BRD4187C-gsdk4.1.s37
.
Click Open to select the file.
- If your board is the 10 dBm version and you used
Click Flash.
Note that after flashing the bootloader, subsequent flashing of the
application should omit the --erase
flag, otherwise the bootloader will have
to be re-flashed. The --erase
flag erases all of the board's flash,
including the bootloader.
Validate the example
- Check logs from your board. Open two terminal windows.
- In the first window:
JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
- In the second window:
The logs will be printed out in the second window.JLinkRTTClient
- In the first window:
- The device should present itself as a USB serial device on your
computer. You may look it up in
/dev/
:
You can open the serial console with minicom or screen. For example, if the device is atls -la /dev/tty*
/dev/ttyACM0
:
The serial console allows you to enter OpenThread commands (for example,screen /dev/ttyACM0 115200
state
). - If the EFR32 board has been paired before, it's recommended that you
factory reset it:
- Long press button PB0 for >10 seconds.
- The LEDs will blink 3 times. Keep holding the button until you see the QR code refresh on the small display.
EFR32MG12
This example functions as a light bulb device type, with on/off capabilities. The steps were verified on SiLabs EFR32MG12 (Mighty Gecko) development board.
This example uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005
.
Initial setup
- Install dependencies as specified in the
connectedhomeip
repository: - Install Simplicity
Commander
and make sure its binary (commander) is in your
PATH
. For example:export PATH=$PATH:/Applications/Commander.app/Contents/MacOS/
- Install JLink on your computer (needed for flashing image), as described in Viewing Logging Output for the EFR32 Lighting Example.
- Clone and initialize the
connectedhomeip
repo:cd ~
git clone https://github.com/project-chip/connectedhomeip.git
cd connectedhomeip
git fetch origin v1.0-branch
git checkout FETCH_HEAD
git submodule update --init --recursive
source ./scripts/activate.sh
- Export environment variables:
export EFR32_BOARD=BRD4161A
Build the image and flash the board
- Build the image for the lighting app:
The image will be generated incd examples/lighting-app/efr32
source third_party/connectedhomeip/scripts/activate.sh
gn gen out/debug --args="efr32_board=\"${EFR32_BOARD}\""
ninja -C out/debug
out/debug
folder. - Connect the EFR32 board with your computer and flash the image to your
EFR32 board:
python3 out/debug/chip-efr32-lighting-example.flash.py --erase
Validate the example
- Check logs from your board. Open two terminal windows.
- In the first window:
JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1
- In the second window:
The logs will be printed out in the second window.JLinkRTTClient
- In the first window:
- The device should present itself as a USB serial device on your
computer. You may look it up in
/dev/
:
You can open the serial console with minicom or screen. For example, if the device is atls -la /dev/tty*
/dev/ttyACM0
:
The serial console allows you to enter OpenThread commands (for example,screen /dev/ttyACM0 115200
state
). - If the EFR32 board has been paired before, it's recommended that you
factory reset it:
- Long press button PB0 for >10 seconds.
- The LEDs will blink 3 times. Keep holding the button until you see the QR code refresh on the small display.
Next steps
When your Matter example has been successfully built, create a developer project.