Wi-Fi Module MCU Development Overview
Last Updated on：2020-01-08 09:27:24
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.
This section describes how to create a heater product on the Tuya Smart platform as an individual developer.
2）Click Create on the Product page. Choose Home Appliances II and select Heater.
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.
The SDK package has the following requirements on MCU hardware resources:
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：https://docs.tuya.com/en/mcu/mcu-protocol.html
If the MCU resources are sufficient, you can directly download the MCU SDK resource package for development.
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.
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 https://docs.tuya.com/en/mcu/mcu_debug_assistant.html.