Wi-Fi Module MCU Development Overview

Last Updated on2020-02-28 10:18:42


If you have higher development and configuration requirements for the product and the “Plug and Play Solution" cannot meet the demand, you can choose the way of MCU development. You can download the MCU SDK in the third step of the product development "Hardware Debug". The MCU SDK is This is a MCU procedure generated automatically from the product’s function datapoint according to Tuya Serial Port Communication Protocol. MCU engineer can develop this procedure quickly on this basis. This article will introduce you to the specific steps of MCU development.

MCU Development Procedure

Creating a Product on the Tuya Smart Platform and Downloading the MCU Development Package

This section describes how to create a heater product on the Tuya Smart platform as an individual developer.

  1. Visit and register a developer account. Then, log in to the platform using the account.

2)Click Create on the Product page. Choose Home appliances II and select Heater.

  1. Select data points (DPs) based on product requirements. If there are custom functions, add them as required. For details about custom product functions, see

4)Select a favorite App control panel template and scan the QR code to verify the effect. More panel templates are provided for enterprise accounts. To upgrade your account, contact Tuya business personnel.

5)Download an MCU development package with one click.

6)Check the downloaded package. The following figure shows the materials contained in an MCU development package.

Protocol Framework

The SDK package has the following requirements on MCU hardware resources:

  • Flash memory: 4 KB
  • RAM: tens of bytes (depending on the DP data length), or 260 KB or higher if the OTA upgrade function is required
  • The number of nested functions is 9.

Users without sufficient resources can implement protocol interworking without using the MCU SDK.

Protocols are classified into basic and functional protocols. Basic protocols are independent of products. They are common protocols of modules and include module initialization commands and some extended functional commands. Functional protocols are DP data transmitting and receiving commands that the platform automatically generates based on the definition of each product DP. You can refer to details:

Migrating Tuya's MCU SDK

If the MCU resources are sufficient, you can directly download the MCU SDK resource package for development. Roadmap: Step 1: Compile the MCU basic program and migrate the SDK file. Step 2: Verify the macro definition in protocol.h. Step 3: Migrate the protocol.c file and invoke functions. Step 4: Optimize the DP data report and delivery functions. Step 5: Optimize the network configuration and indicator functions. Step 6: Optimize the product testing function.

MCU debug

Tuya provides two simulation assistants to help you improve the interworking efficiency, understand the protocol format, and verify data. One assistant simulates the Wi-Fi module, and the other simulates the MCU. Using both assistants can effectively improve the development efficiency. For details, visit