Application of Bluetooth Embedded System Based on DSP

Abstract: Taking TI ’s TMS302VC54x digital signal processor (DSP) as the embedded controller and ERICSSON ’s Bluetooth module as an example, on the basis of the Bluetooth cable replacement protocol application module, an embedded Bluetooth extension for the cable replacement protocol is proposed. Application mode and its hardware and software implementation.

The Bluetooth protocol standard was released by the Bluetooth Special Interest Group (Bluetooth SIG), and Bluetooth version 1.0 was released in 1999, and Bluetooth version 1.1 was released in February 2001. At present, SIG members have grown to about 3,000. The wireless communication standard specified by the Bluetooth protocol is based on the application-free 2.4GHz ISM band, using GFSK frequency hopping technology and time division duplex (TDD) technology. The communication distance is about 10 meters. 1Mbps. It is mainly suitable for various short-distance wireless device interconnection applications. It can provide point-to-point or point-to-multipoint wireless connection.

1 Bluetooth protocol based on cable replacement

1.1 Bluetooth protocol system

The protocol stack mode described in the Bluetooth protocol specification is shown in Figure 1.

The protocol in the Bluetooth architecture can be divided into four layers:

Core protocols: baseband control protocol (Baseband), link management protocol (LMP), logical link control application protocol (L2CAP), service discovery protocol (SDP);

Cable replacement protocol: RFCOMM;

Telephone transmission control protocol: TCS binary, AT command set;

Optional protocols: PPP, UDP / TCP / IP, OBEX, WAP, vCard, vCal, IrMC, WAE.

In the protocol, a host controller interface (HCI) that provides a command interface for the baseband controller, LMP, hardware status, and control registers is specified. In different application modes, the location of HCI is different. It can be located under L2CAP or above L2CAP.

1.2 Application Mode of Cable Alternative Protocol

The RFCOMM protocol based on the TS07.10 signaling of the ETSI standard provides a serial port simulation application mode based on the L2CAP protocol. In the Bluetooth protocol version 1.0, there are three main upper-layer service modes provided by RFCOMM: 9-pin RS-232 interface simulation mode, empty Modem simulation mode, and multi-serial port simulation mode. A typical RFCOMM application mode block diagram is shown in Figure 2.

1.3 Bluetooth embedded application mode

Based only on the RFCOMM protocol, as a serial cable replacement application, the application range of Bluetooth devices is virtually limited, reducing the application value of Bluetooth devices. At present, there are many types of interfaces between computers and external devices, and the more common ones are RS-232, RS-485, Parallel Port, CAN bus, SPI bus, and I2C bus. If you want to make the Bluetooth device function in various occasions, you must make the Bluetooth device have a variety of interface functions suitable for these applications. Using a DSP digital signal processor as an embedded controller not only realizes the initialization of Bluetooth physical devices and Bluetooth high-level protocols, but also makes use of its flexible interface features to facilitate the effective expansion of Bluetooth cable replacement protocols. The specific application mode is shown in Figure 3.

2 System hardware structure

The composition of this system is divided into two parts on the hardware. The Bluetooth baseband and the radio frequency part adopt the Bluetooth module ROK101007 provided by Ericsson (ERICSSON); the embedded controller adopts the DSP digital signal processor of TMS320VC54X series of American TI company.

2.1 ERICSSON Bluetooth module

ROK101007 is a short-range Bluetooth communication module designed according to the Bluetooth specification version 1.0 (Bluetooth 1.0B Version). It includes three main parts: baseband control chip, flash memory and radio chip. It works in the 2.4GHz ~ 2.5GHz ISM band and supports the transmission of sound and data. Its main functional parameters are:

Bluetooth 1.0B pre-certification;

Level 2 RF power output;

Provide FCC and ETSI error correction processing;

Maximum 460 KB / s UART data transmission rate;

Provide a variety of HCI interfaces such as UART, USB, PCM, I2C;

Provide internal crystal oscillator;

Internal prefabricated HCI framework;

Point-to-point, point-to-multipoint operation;

Embedded shielding protection.

ROK101007 is especially suitable for computers and peripheral devices, handheld devices, port devices. Its embedded Bluetooth protocol architecture and internal system block diagram are shown in Figure 4 and Figure 5.

2.2 DSP processor

TMS320C54X is a 16-bit fixed-point DSP, suitable for real-time embedded applications such as wireless communications. The C54x uses an improved Harvard structure. The CPU has dedicated hardware arithmetic operation logic, a large amount of on-chip memory, enhanced on-chip peripherals, and a highly specialized instruction set, making it have a high degree of operational flexibility and running speed. The main features are as follows:

Fast calculation speed: the instruction cycle is 25/20/15 / 12.5 / 10ns, and the calculation capability is 40/50/66/80 / 100MIPS;

Optimized CPU structure: contains a 40-bit arithmetic operation logic unit, 2 40-bit accumulators, 2 40-bit adders, 1 17 & TImes; 17 hardware multiplier and 1 40-bit barrel Shifter. There are 4 internal buses and 2 address generators. Advanced CPU optimization structure can make DSP efficiently realize various functions in wireless communication system.

Low power consumption mode: 54x series DSP can work under 3.3V or 2.7V voltage, and some DSP cores work with 1.8V voltage to reduce power consumption.

Intelligent peripherals: In addition to standard serial ports and time-division multiplexing (TDM) serial ports, 54x also provides HPI parallel interfaces for multiple buffered serial ports (McBSP) and external processor communication.

2.3 System configuration

In this system, a single 5V power supply is used, and the HCI interface between the embedded system controller and the Bluetooth module uses the UART mode. The block diagram of the hardware structure is shown in Figure 6. The whole system is divided into four parts: transmitter, embedded controller, power management, interface logic.

(1) The transmitter consists of a Bluetooth module ROK101007 and an antenna with an impedance of 50Ω. In the initialization phase, the module receives the HCI command sent by the controller through the UART to realize the initialization operations such as reset, startup, address query, frequency hopping algorithm, and automatic paging of the Bluetooth device, establish a reliable physical link with the nearby Bluetooth device, and The physical link is encrypted accordingly. In the data transmission stage, the HCI data packet sent by the receiving controller (HCI driver module) is converted into a baseband data packet by the HCI firmware wire in the module and sent to the baseband protocol layer (Baseband) for processing. The baseband is sent to the upper layer The data is decoded and turned into a bit data stream that can be sent. According to the set frequency hopping algorithm, the Gaussian frequency shift keying (GFSK) coding method is used to send it through the antenna. When receiving data, the received data is encoded in the reverse process, combined into an HCI data packet format and sent to the controller through the UART port. The specific sending and receiving execution process can refer to the ROK101007 data and application manual and the relevant parts of the Bluetooth protocol.

(2) The embedded controller is composed of TI's fixed-point digital signal processor TMS320C54x, Flash Memory, SRAM, and completes the initialization, data transmission, and protocol implementation of the Bluetooth module.

(3) Interface control logic includes application interface and control interface. The control interface is the HPI interface of the controller, which mainly realizes the online special control of the system and the Flash online programming data transmission port. The HPI control interface is realized through the HPI host interface of the DSP. Application interfaces include RS-232 / RS-485 serial interface logic, parallel interface logic (such as IEEE488 bus), and SI synchronous serial port logic. In different embedded applications, the embedded system and the host are realized through different interface forms. Device controller interface. The application interface is realized by DSP on-chip peripherals (enhanced peripherals) or general-purpose I / O port simulation.

(4) Power management. The system is powered by a single 5V power supply, and you can simply obtain power from the main device interface without the need for additional power devices. The power management module uses TI dedicated circuit, provides two voltage outputs, + 3.3V working voltage and + 1.8V controller core working voltage.

3 System software design

The system is developed with the integrated development tool CCS1.2 dedicated to the DSP5000 series provided by TI. The system software consists of application port communication and protocol module, L2CAP protocol module, HCI interface driver module, HPI communication module and Flash programming module. The main tasks can be divided into: system initialization, Flash programming, establishment of physical links, data transmission and reception. The entire software process is shown in Figure 7.

Since the Bluetooth module itself has a line encryption function, no software encryption function is considered in this system design. In the actual design and application process, the software encryption module can be added depending on its actual application environment and system processing speed. Due to the high anti-interference characteristics of frequency hopping communication, this embedded Bluetooth application system can not only be applied to low- and medium-speed wireless data exchange between various terminal devices and handheld devices, but also widely used in various industrial equipment and military Equipment testing and control field.

Product categories of E-Scooter Battery, we are specialized in manufacturers from China, E-Scooter Battery Supplier suppliers/factory, wholesale high-quality products of  manufacturing, we have the perfect after-sales service and technical support. Look forward to your cooperation!

E-Scooter Battery

E Scooter Battery,Customized Lithium Battery,24V 20Ah For E Bike,Ebike And Escooter Battery

Changxing Deli Technology Co., Ltd. , https://www.delipowers.com

Posted on