Skip to main content

SiWx917 Quick Start

Build, flash, and run your first TuyaOpen application on a SiWx917 dev kit.

Prerequisitesโ€‹

  • Completed Environment Setup
  • Basic familiarity with C development and serial terminals

Requirementsโ€‹

  • A SiWx917 dev kit (SIWX917_AI_DEV_KIT or BRD2605A)
  • A J-Link debug probe (SWD flashing), or a USB-serial adapter (ISP serial flashing)
  • The USB data cable for the probe / adapter
  • About 5 GB of free disk (the first build pulls the Simplicity SDK and SLC)
  • A Wi-Fi network (2.4 GHz)
info

If your application uses Tuya Cloud features (remote control, AI Agent, OTA), you also need a Tuya Cloud license key. Local-only projects (GPIO, UART, display demos) do not need one.

Stepsโ€‹

1. Clone TuyaOpen and set up the environmentโ€‹

git clone https://github.com/tuya/TuyaOpen.git
cd TuyaOpen
git submodule update --init

Activate the TuyaOpen environment:

. ./export.sh

SiWx917 is an officially supported platform: it is listed in platform/platform_config.yaml, and its board support lives in boards/SIWX917/. The first SiWx917 build downloads Silicon Labs SLC and Simplicity Commander into platform/SIWX917/tools/.

2. Choose a project to buildโ€‹

For your first build, use the switch demo (a simple cloud-connected switch):

cd apps/tuya_cloud/switch_demo

3. Select the board configโ€‹

tos.py config choice

Pick SIWX917_AI_DEV_KIT or BRD2605A. If you previously built for a different board or changed peripheral Kconfig, run tos.py clean first โ€” otherwise SLC skips generation; see Build.

4. Buildโ€‹

tos.py build

Firmware artifacts land in the app's dist/ and .build/ directories. The first build also pulls the Silicon Labs SDKs and tools; see the overview.

5. Flash the firmwareโ€‹

tos.py flash

Two prompts appear in order:

  • Channel: swd (J-Link probe) or serial (ISP UART).
  • Target: M4 ONLY (your application), TA ONLY (NWP radio firmware), or TA + M4 (both).

Wiring for the two channels:

AI dev kit โ€” J-Link (SWD) flashing
AI dev kit โ€” J-Link (SWD) flashing

AI dev kit: external J-Link to the DEBUG header (H5); for the serial (ISP) channel, see Flash over ISP with a serial adapter below.

Flash over ISP with a serial adapterโ€‹

For the serial channel, wire the USB-serial adapter to the module header H2:

AI dev kit โ€” ISP serial flashing
AI dev kit โ€” ISP serial flashing

Before flashing, guide the chip into ISP mode: hold the on-board ISP button, tap RESET, then release ISP โ€” the chip samples GPIO_34 (SWO, H5-6 / H2-7) as reset is released, and a low level there enters the ROM bootloader. Once in, the port runs 115200 8N1: send Ctrl+\ to wake it, then press U to print the flash menu.

This ISP UART is a different pair from the log ULP UART; the two cannot share wires.

TA firmware โ€” check before writing

The radio runs its own firmware (TA), separate from your application, and the application cannot start without it. Writing TA erases the radio's flash first; an interrupted write can leave the device in need of recovery โ€” so write it only when the device actually reports having none. tos.py flash reads the device's TA version and prompts you when it is missing.

BRD2605A โ€” single USB connection (flashing + logs)
BRD2605A โ€” single USB connection (flashing + logs)

BRD2605A: one USB Type-C cable covers flashing and logs โ€” no wiring needed.

6. Open the logโ€‹

The application log leaves on the ULP UART.

  • BRD2605A: the log lands on the on-board J-Link VCOM; tos.py monitor finds it with no wiring.
  • External probe (AI dev kit): wire the USB-serial adapter to the same DEBUG header (H5):

AI dev kit โ€” log UART (ULP UART) wiring
AI dev kit โ€” log UART (ULP UART) wiring

RX and GND alone are enough to read the log. This UART is a different pair from the ISP UART used for serial flashing โ€” the two cannot share wires.

tos.py monitor

7. Provision and verifyโ€‹

Provision the device over BLE with the Tuya Smart app โ€” on SiWx917, BLE is the only available provisioning method. Details in Device Network Configuration.

Expected resultโ€‹

Once Wi-Fi connects, the switch demo starts reporting to the cloud: you can toggle it from the Tuya Smart app panel, and tos.py monitor shows the matching DP reports and commands.