Last Updated on : 2024-06-24 05:50:57download
This topic describes how to flash firmware to the module and authorize its connection to the Tuya Developer Platform. Tuya provides two solutions for flashing and authorization.
Flashing and authorization combined: flash firmware and authorize modules using Tuya’s Cloud Module Burning Authorization Platform.
Flashing and authorization separated: flash firmware using the chip-specific flashing tool, and authorize modules using Tuya’s Cloud Module Burning Authorization Platform.
The first solution is intended for the release stage, while the second one is for development and debugging.
This topic applies to BN series modules that have the nRF52832 chip at their core.
This solution is intended for the release stage. A module can connect to the Tuya Developer Platform after it is authorized.
The overall procedure:
A USB to UART converter, a module built with nRF52832 (this topic uses TYBN1 module), and a circuit diagram.
Module pin | USB to UART converter pin |
---|---|
IO18_D (TXD) | RX |
IO20_D (RXD) | TX |
VCC | VCC3.3V |
GND | GND |
Module pin | J-Link pin |
---|---|
SWDIO | SWDIO |
SWC | SWCLK |
GND | GND |
For more information, see Authorize Bluetooth LE Series Modules.
This solution is for development and debugging purposes. You can authorize the module once and then flash firmware to it multiple times. For modules that have been authorized, you only need to flash the updated firmware to them after you modify the code.
Connect the device and J-Link and select SWD as the target interface. If you get a screen as shown below, it means a hardware connection is successful.
Install the Nordic Semiconductor pack to Keil MDK.
Flash the Nordic stack.
Flash the user firmware.
View logs with J-Link RTT Viewer.
You can output logs through RTT. TY_LOG_ENABLE
and TUYA_APP_LOG_ENABLE
are used to enable/disable logging, which is disabled by default.
Open the chip flashing tool and flash firmware to the device.
In the Cloud Module Burning Authorization Platform, enable Only Auth.
Click Run to authorize the module.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback