Last Updated on : 2025-04-07 09:39:46download
This topic describes the basics of the chip platform used in TuyaOS development. For more information, visit Tuya Developer Forum.
To get the latest version, visit the TI website.
Reuse the TI official development board. For the latest version instructions, refer to the official documentation.
UART
This platform has one UART, used for authorization, debugging, and log output.
UART | Feature | Pin |
---|---|---|
UART 0 | TX | DIO20 |
UART 0 | RX | DIO22 |
You can configure it in the TuyaOS_CC2340.syscfg
file. The corresponding code is CONFIG_GPIO_UART2_0_TX_CONST
.
SPI
SPI | Feature | Pin |
---|---|---|
SPI0 | CS | / |
SPI0 | CLK | DIO24 |
SPI0 | SDI | DIO21 |
SPI0 | SDO | DIO19 |
I2C
I2C | Feature | Pin |
---|---|---|
I2C0 | SCL | DIO25 |
I2C0 | SDA | DIO0 |
PWM
By default, the SDK only supports Channel 0 to optimize resource usage. For additional channels, you can configure them by yourself.
Channel | Pin |
---|---|
0 | DIO24 |
ADC
By default, the SDK only supports Channel 0 to optimize resource usage. For additional channels, you can configure them by yourself.
Channel | Pin |
---|---|
0 | DIO7 |
1 | DIO6 |
2 | DIO5 |
3 | DIO2 |
4 | DIO1 |
5 | DIO0 |
6 | DIO25 |
7 | DIO24 |
8 | DIO23 |
9 | DIO22 |
10 | DIO21 |
11 | DIO20 |
Key control
DIO10:
Startup time detection pin
DIO15: Set this pin to high after entering the main
function.
The TI CC2340R5 chip is developed based on the Code Composer Studio (CCS) integrated development environment, and the firmware is flashed with UniFlash.
It is recommended to download the offline version, as shown below:
After downloading, install it using the default settings. Select the following component:
If you encounter issues during CCS installation, refer to Project Import and Build errors in CCS.
Download the SDK, and scroll down to select the version simplelink_lowpower_f3_sdk_8_40_00_61
. You can install it using the default settings. It is recommended not to change the installation path.
If your SDK version is simplelink_lowpower_f3_sdk_8_40_00_61
, replace the file in the directory C:\ti\simplelink_lowpower_f3_sdk_8_40_00_61\source\ti\ble5stack_flash\lib_projects\ CC2340R5\OneLib\lib\ticlang\m0p
with: OneLib.a.
If the toolchain is not recognized when you open the CCS after installation, follow the path in the figure below and click the Refresh button.
After the above environment is installed, you can start software development. Follow the steps below to import the software project.
Go to the download page and click Download options.
Download the file as specified in the following figure. After downloading, install it using the default settings.
If you use the official development board, just plug the USB into the computer.
To connect your own development board using XDS110, the minimum wiring is as follows:
XDS110 | Device |
---|---|
VCC | VCC |
GND | GND |
SWDIO | DIO16_SWDIO |
SWDCK | DIO17_SWDCK |
nRST | RSTN |
TuyaOS_CC2340.bin
is the application firmware, sometimes also called production firmware. For the CC2340 chip, the OTA firmware is the same as the production firmware.
.hex
from .out
.noheader_bin
via .hex
.noheader_bin
adds a header
to generate .bin
. The header
contains information such as the signature.Connect the XDS110 debugger correctly. Then, open UniFlash, enter CC2340, and select the device as shown in the figure.
Click Start and follow the steps below.
\vendor\cc2340_ble\sdk\bootloader\mcuboot.hex
) and add application firmware.0x3000
.Choose Settings & Utilities > Chip Erase (retain sectors specified in CCFG).
Go back to the Program interface and click Load Images to start flashing.
After firmware is flashed, reset the device to start running.
Measure the average power consumption of typical one-second advertising. It is 16.06 μA at 0 dBm.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback