User Manual — TD5322A Chip

Version: V1.15
Date: 2023-11-9


Overview

The TD5322A is a data-transmission chip supporting Bluetooth BLE and SPP, Bluetooth 5.1. It offers a small footprint (SOP-8 package), strong performance, low cost, and powerful features including custom UUIDs, custom advertising payloads, and central/peripheral mode switching. Simple transparent transmission and UART AT commands greatly reduce the difficulty and cost of adding Bluetooth to other electronic products.

Features

  • Transmission range: >50 m (depends on RF transmit power and antenna design)
  • Supports SPP and BLE protocols; supports BLE low-power mode
  • Data rate: BLE 15 kbps, SPP 20 kbps
  • Supports custom UUIDs
  • Supports custom advertising payloads
  • Operating modes: central and peripheral

Applications

Bluetooth UART transparent transmission


Demo Module Introduction (TD601)

The TD601 module is designed to help customers quickly validate and debug functionality.

Pin Definition

  • GND: Ground
  • TXD: UART output
  • RXD: UART input
  • VCC: Power supply, input voltage 1.8–3.4 V
  • STA: Alternating high/low output when Bluetooth is disconnected; high level when connected (may be left floating)

Product Parameters

Parameter Value
Bluetooth protocol BLE5.1
Operating frequency 2.4 GHz
Module dimensions 15.1 × 33.8 mm
Operating voltage 1.8 V–3.4 V
Communication range 65 m
Data rate 20 kbps
Transmit power −20 dBm–4 dBm
Interface UART serial
Baud rate 2400–1000000
Sensitivity −96 dBm
Antenna On-board PCB antenna
Operating temperature −40 °C–85 °C
Operating mode Central and peripheral

Hardware Description

Pin Definition

Pin Name Type Function
1 VCC POWER 1.8–3.4 V; 3.3 V recommended
2 STA I/O Status pin; fast blink when disconnected, steady high when connected (configurable)
3 GND GND GND
4 BTRF / Bluetooth antenna
5 BTOSCI Input Crystal oscillator input
6 BTOSCO Output Crystal oscillator output
7 RXD I/O UART receive
8 TXD I/O UART transmit

Hardware Design Notes

  • VBAT supply voltage: 1.8–3.4 V; do not exceed 3.4 V
  • UART and MCU connection: I/O voltage equals VCC; when connecting UART to an MCU, match logic levels on both sides. RXD and TXD may use 100 Ω or larger series resistors depending on voltage.
  • Bluetooth antenna: Copy the antenna layout from our component library into your PCB.
  • 24 MHz crystal: Specification: 24 MHz, 12 pF, 10 ppm; place the crystal close to the main chip with short traces. Choose a stable, consistent crystal with frequency deviation within ±10 ppm. (Recommended matching crystal, package 495, 3225)
  • Firmware upgrade test points: Reserve test points on VCC, RXD, TXD, and GND for programming; allows rework if batch issues occur.

UART AT Command Protocol

Communication Format

  • Baud rate: 115200 bps (default)
  • Data bits: 8
  • Stop bits: 1
  • Parity: none
  • Flow control: none

2.2 AT Command Set

Note: All commands end with \r\n. In the serial assistant, enable the “Append CR/LF” option, or enter the full command such as AT+BLENAME\r\n. The AT command set below is continuously being expanded; contact us if you need new features.

Command Function Response Notes
AT AT test; returns ok when communication is normal \r\nok\r\n
AT+RESET Save configuration and restart the chip \r\nok\r\n
AT+RESTORE Restore factory settings and restart the chip \r\nok\r\n
AT+VER Query module software version \r\n +VER=**** \r\nOK
AT+BLENAME Query current BLE Bluetooth name \r\n +NAME=**** \r\nOK
AT+SPPNAME Query current SPP Bluetooth name \r\n +NAME=**** \r\n OK Effective only in BLE & SPP dual-mode versions
AT+BLEMAC Query module BLE MAC address \r\n +MAC:********** \r\n OK
AT+SPPMAC Query module SPP MAC address \r\n +MAC:********** \r\n OK Effective only in BLE & SPP dual-mode versions
AT+BAUD Query system baud rate \r\n +BAUD=**** \r\n OK
AT+UUID Query all UUIDs on the chip
AT+MODE Query supported modes \r\n +MODE=* \r\n OK Effective only in BLE & SPP dual-mode versions0 = BLE only1 = BLE & SPP
AT+SECURITY Query pairing security mode \r\n +SECURITY=* \r\n OK 0 = no PIN pairing1 = simple pairing enabled2 = PIN pairing enabled
AT+PIN Query pairing PIN \r\n +PIN=****** \r\n OK
AT+ADVDATA Query advertising payload data \r\n +ADVDATA:*** \r\n OK
AT+ADVPARAM Query advertising interval \r\n +ADVPARAM:*** \r\n OK
AT+LPM Query low-power mode status \r\n +LPM=* \r\n OK Low-power mode applies only to BLE peripheral mode0 = not in low-power mode1 = in low-power mode
AT+LOG Query chip log output status \r\n +LOG=* \r\n OK 0 = disable chip-initiated log output1 = enable chip-initiated log output
AT+LED Query LED status pin behavior \r\n +LED:X \r\n OK 0 = off when disconnected (low), steady on when connected (high)1 = fast blink when disconnected, steady on when connected (square wave output; chip default is 1)
AT+ROLE Query current chip role \r\n +ROLE=**** \r\n OK SERVER = peripheral (chip default)CLIENT = central
AT+VBAT Query VBAT voltage \r\n +PIN=****** \r\n OK Query VBAT voltage; e.g. 3.3 V returns 330
AT+BAUD=XXXX Set serial baud rate; takes effect after reset \r\nok\r\n Parameters include 2400, 4800, 9600, etc.; see section 2.3
AT+MODE=X Set operating mode \r\n +MODE=* \r\n OK Effective only in BLE & SPP dual-mode versions0 = BLE only1 = BLE & SPP dual mode
AT+BLENAME=XXXX Set BLE channel Bluetooth name; takes effect after reset \r\nok\r\n
AT+SPPNAME=XXXX Set SPP channel Bluetooth name; takes effect after reset \r\nok\r\n
AT+SECURITY=0 Disable pairing; takes effect after reset \r\nok\r\n
AT+SECURITY=1 Enable simple pairing; takes effect after reset \r\nok\r\n
AT+SECURITY=2 Enable PIN pairing; takes effect after reset \r\nok\r\n
AT+PIN=XXXXXX Set pairing PIN to XXXXXX; takes effect after reset \r\nok\r\n BLE channel PIN must be 6 digits (default: 000000)
AT+BLEMAC=XXXX Set BLE MAC address (12-digit hex value); takes effect after reset \r\nok\r\n
AT+SPPMAC=XXXX Set SPP MAC address (12-digit hex value); takes effect after reset \r\nok\r\n Effective only in BLE & SPP dual-mode versions
AT+ADV=X Enable or disable advertising; takes effect after reset \r\nok\r\n 0 = off1 = on (default)
AT+ADVDATA=XXX Set advertising payload data \r\nok\r\n
AT+ADVPARAM=X Set advertising interval 10<=X<=4000, unit ms \r\nok\r\n Longer interval = lower power, longer connection time
AT+RFPWR Set transmit power 0–9 \r\nok\r\n Set RF transmit power (default level is 9)
AT+LED=X Set LED indicator behavior \r\nok\r\n 0 = off when disconnected (low), steady on when connected (high)1 = fast blink when disconnected (square wave), steady on when connected (high)
AT+LPM=0 Disable low-power mode; takes effect after reset \r\nok\r\n
AT+LPM=1 Enable low-power mode; takes effect after reset \r\nok\r\n Effective only in BLE low-power peripheral mode
AT+ROLE=X Set chip role; takes effect after reset \r\nok\r\n Used for central/peripheral mode switching
AT+CONN=XXX Central role initiates connection \r\nok\r\n XXX = MAC address of the target peripheral
AT+SLEEP Soft shutdown \r\nok\r\n
AT>X Switch to specified channel \r\nok\r\n 0 = central channel8 = BLE peripheral channel9 = AT command channel10 = SPP channel
AT+DISC=X Central or peripheral actively disconnects \r\nok\r\n 0 = central disconnects8 = BLE peripheral disconnects10 = SPP peripheral disconnectsNote: run AT>9 to switch to the AT command channel before this command
AT+LOG=X Enable or disable chip-initiated log output \r\nok\r\n 0 = disable chip-initiated log output1 = enable chip-initiated log output

AT Commands for Central (Host) Mode Only

Command Function Response Notes
AT+ROLE Query current chip role \r\nok\r\n
AT+ROLE=1 Set as central \r\nok\r\n
AT+ROLE=0 Set as peripheral \r\nok\r\n
AT+ROLE Query whether current role is central or peripheral Central returns “CLIENT”Peripheral returns “SERVER”
AT+SCAN=1 Start scanning \r\nok\r\n
AT+SCANM=0,0 Set number of devices to find and scan timeout in central mode (unit: seconds) \r\nok\r\n 0 <= device count <= 15 (default 5)0 <= timeout <= 40 (default 5)Default returns 5,5
AT+SCANPARAM=0,0,0 Set scan type, scan interval, and scan window \r\nok\r\n First value: 0 = passive scan, 1 = active scan (default 1)Second value: central scan interval (default 20)Third value: central scan window size (default 15)Note: scan interval must be greater than scan window
AT+CLRBIND Clear saved peripheral addresses \r\nok\r\n
AT+TARGETUUID Set target UUID (service/characteristic) to connect \r\nok\r\n Must include NOTIFY and WRITE/WRITE NO RESPONSE properties, otherwise connection fails

2.3 Baud Rate List

Supported serial baud rates: 2400, 4800, 9600, 14400, 19200, 38400, 56000, 57600, 115200, 230400, 256000, 460800, 530000, 1000000.


3. Bluetooth Transparent Transmission — BLE

3.1 BLE UUID Reference

  1. Service UUID is FF00.
  2. Characteristic 1 UUID is FF01, property is notify.
  3. Characteristic 2 UUID is FF02, property is write.

To query the chip’s current UUID configuration, use:

AT+UUID\r\n

UUIDs support 16-bit or 128-bit formats. To use other UUIDs, the chip supports custom UUID configuration as follows:

AT+UUID=[UUID index],[target UUID value]\r\n
AT+RESET\r\n

Examples:

  1. Change the UUID labeled “3” in the diagram to FF47:

    AT+UUID=3,FF47\r\n
    AT+RESET\r\n
    
  2. Change the UUID labeled “3” in the diagram to 00112233445566778899AABBCCDDEEFF:

    AT+UUID=3,FFEEDDCCBBAA99887766554433221100\r\n // enter byte-by-byte in reverse order (every two characters)
    AT+RESET\r\n // after modification, re-pair or restart Bluetooth on the phone for correct display
    

Other: to restore factory default UUIDs, run AT+RESTORE to reset the chip to factory settings.


3.2 BLE Testing Instructions

For Android app testing, we recommend our Demo app (in the Demo APP directory; currently BLE mode only; SPP mode is under development).

Other professional test tools: nRF Connect (Android version provided in this directory; iOS version available on the App Store).

For iOS app testing, we recommend “BLE Tools”, searchable on the App Store.

Contact us anytime for custom app development.

Test steps:

We use BLE Tools (iOS version, downloaded from the App Store)

  1. Launch the BLE Tools app;
  2. Select the device with the matching Bluetooth name, such as “TD5322A”, and tap Connect.
  3. After connecting, the interface shows the device name and services.
  4. Locate the required service, which is FF01;
  5. Tap “Listen”;
  6. Send test characters from the serial port (e.g. using a PC serial debug tool);
  7. The phone displays the received characters.
  8. Locate the required service, which is FF02;
  9. Tap “Write”;
  10. Enter test characters;
  11. Bluetooth transparent transmission forwards the data to the UART on the Bluetooth chip (can be verified with a PC serial