Bluecore, the leader of Bluetooth single-chip chip maker CSR, is a widely used Bluetooth single-chip series. It is widely used in Bluetooth headsets, Bluetooth mobile phones and hands-free devices, and is also the first choice of many Bluetooth engineers. The author used Bluecore5-MM (hereinafter referred to as BC5) and Freescale's Coldfire architecture 32-bit processor MCF5251 to develop an in-vehicle infotainment device that integrates USB music playback, iPOD control, Bluetooth hands-free and streaming music playback. Below, first briefly introduce the hardware structure of the device, and then discuss the problems and solutions encountered in the development from the device software structure, BC5 software development mode, memory and DSP development.
This article refers to the address: http://
Hardware Structure Figure 1 shows the hardware structure of the car entertainment device, including power management, audio input and output and sound source management, processor and its peripheral circuits, USB interface and its power supply protection, CAN interface and other parts.
Figure 1 Car entertainment equipment hardware structure
As shown in Figure 1, the system uses a dual processor architecture of the BC5-MM+32-bit external embedded processor, and the Bluetooth part is implemented with BC5-MM. Below, we first introduce the key features of the chip, and then introduce the circuit design of its RF subsystem. Its chip characteristics are as follows:
(1) Integrated RF and baseband control of the Bluetooth system, 16-bit MCU with RISC structure and Kalimba DSP with performance up to 64MIPS in a single chip. Among them, the MCU part implements the Bluetooth protocol stack and application software, and the DSP is used to implement audio and voice processing and encoding and decoding of streaming media music files.
(2) It has an independent audio input and output system.
(3) The wireless transmission power is up to +8dBm, the receiving sensitivity is -90dBm, no external amplifier is needed, and only the printed circuit board antenna can meet the requirements of the Bluetooth radio frequency specification Class 2, and the communication distance can reach 10m.
(4) It has various interfaces such as USB, I2C, SPI, UART, etc. It can be connected to an external host controller to realize complex applications. Among them, BC5-MM and the main processor communicate through UART, SPI interface is used for debugging, downloading and setting of key PSKEY attributes of BC5-MM program.
The Bluetooth RF subsystem design is shown in Figure 2. Because the BC5-MM integrates Bluetooth RF and baseband control, RF subsystem design can be achieved with external filters and PCB antennas. The filter uses a Bluetooth balanced filter DBF81F04 with low insertion loss and high attenuation characteristics to ensure the reliability of Bluetooth communication. The PCB antenna adopts F-type antenna, and the feedback point position needs to be determined according to the frequency center point of Bluetooth 2.4GHz. In addition, in the audio input and output system design, it should be noted that the audio input has the maximum voltage requirement. Therefore, when designing the peripheral microphone input circuit, it is necessary to select the circuit amplification parameter to control the input voltage.
Figure 2 RF subsystem circuit diagram
Software Development Figure 3 shows the software structure diagram of the in-vehicle infotainment device with dual processor structure. The software design of the MCF5251 is not described here. The BC5 software includes firmware, operating system, profile and application. The function of the firmware is to connect with the hardware and provide the implementation of the underlying driver, including the Bluetooth underlying protocol stack and various peripherals on the chip, such as IO, UART, Timer, ADC, etc.; the operating system Virtual Machine (VM) completes memory management and tasks. Scheduling and message processing functions; the function of the profile is to define the functions that should be included in a certain type of device and its standard implementation, to ensure interoperability between devices. The application is developed on the profile and a series of APIs provided by the VM. The task and the corresponding message are defined. Under the control of the VM, the message queue mechanism is used to asynchronously send messages for communication. The software development environment is Roadtunes-SDK. The SDK provides a complete Bluetooth protocol stack and source code for various profiles and provides a software solution for in-vehicle applications. The following describes the key technologies in connection management and memory issues and DSP development.
Figure 3 car device software structure diagram
Connection management The in-vehicle infotainment equipment designed by the author needs to implement hands-free calling, phone book downloading, streaming music playing and music remote control applications. Each application is based on the corresponding connection and in the corresponding profile. . Among them, the hands-free corresponds to the HFP profile, the phone book download corresponds to PBAP, the streaming media music corresponds to A2DP, and the music remote control corresponds to AVRCP, and it is important to manage these connections reasonably. First, the connections are classified, HFP and A2DP are the primary connections, PBAP is the secondary connection of HFP, and AVRCP is the secondary connection of A2DP. After the mobile phone and the device establish a hands-free connection, the device actively establishes a PBAP connection with the mobile phone, downloads the phone book and sends it to the main processor through the UART for resolution. After the mobile phone and the device establish a streaming media connection, the device actively establishes AVRCP with the mobile phone. Connect for remote control of streaming music.
The system is logically quite reasonable, but it is found that there is a high probability of crashing at this time. After analysis, after each connection is established, both devices need interactive link monitoring timeout time, low power consumption setting, LMP version information, support features and other information, which consumes a considerable amount of memory in a short period of time, while PBAP phone book download and The UART transfer also consumes a significant amount of memory, which causes BC5 to fail to allocate memory for the corresponding Bluetooth message. Because the various behaviors of the Bluetooth device have a corresponding message sequence and order, once a certain link is lost, the subsequent behavior is also uncontrollable. If the operation continues, the program will be disordered, and then the reset is a necessary choice.
The BC5's MCU memory is 48KB and is shared by the current ring buffers and protocol stack specific operations, profiles, and applications for which voice or data is allocated. Therefore, you need to carefully design in software development, and sacrifice a certain speed performance to ensure that the program will not fail due to insufficient memory.
The reasonable connection management scheme is as follows: After the A2DP connection is completed for 5s, the AVRCP connection is initiated. After the HFP connection is completed for 10s, the PBAP connection is established, and there are no two ongoing connections, that is, if the AVRCP connection has not been established yet. When the establishment time of the PBAP arrives, the PBAP connection is delayed by 10s, and the operation of the phone book is not performed immediately after the PBAP connection is established, which requires a large amount of memory operation, thus solving the problem.
DSP development
The BC5 has a built-in DSP with up to 64 MIPS of performance and can perform two functions, echo cancellation and streaming music file decoding, in software. CSR provides CVC for echo cancellation and noise suppression for BC5 DSP, and provides codec implementation for SBC and MP3, which provides great for hands-free calling and streaming music playback functions for in-vehicle infotainment devices. Convenience. At the same time, the in-vehicle infotainment equipment designed by the author needs to have a self-diagnosis function for the audio system, which requires a standard 1 kHz sound signal and detects the microphone. This part of the function is implemented on the BC5 DSP. The following briefly introduces the characteristics and development methods of the DSP, and then introduces the implementation of the microphone detection in the self-diagnosis function.
CSR defines Kalimba's class assembly development language for its DSP and provides a number of useful operators that can be called directly by developers to implement custom functions. The interface between the DSP and the peripheral is only PIO. It cannot directly interface with the UART, USB, CODEC or Bluetooth data link. It needs to complete the specific application with the MCU. The MCU and the DSP exchange based on the interrupt in a message manner, and the message data is transmitted and received by the shared memory of the DSP and the MCU, and the MCU and the DSP both have corresponding mechanisms for transmitting and receiving messages.
Microphone detection requires sampling and arithmetic processing of the generated sound signal. First, the MCU sets the sampling rate and gain of the microphone ADC, and sets the connection between the ADC data stream and the DSP input port. The DSP performs an FFT operation on the input ADC data, and then sends the operation result to the MCU as a long message. Subsequent processing in the MCU. The setup code for the MCU is as follows:
/*VM_PCM_INTERNAL_A means left adc and left dac*/
PcmRateAndRoute(0, PCM_NO_SYNC, 8000, 8000, VM_PCM_INTERNAL_A);
/* Set the gains on the codec */
CodecSetInputGainA(13);
/* plug Left ADC into port 0 */
StreamConnect(StreamPcmSource(0), StreamKalimbaSink(0));
StreamKalimbaSink(0) is the input port of the DSP. It is a first-in, first-out ring buffer. Kaimba provides operators for operating it, including reading data, writing data, querying the remaining space and the current valid data space. Before operating it, you need to query the remaining space and query the current valid data space, so as to ensure the continuity of the input data in the time domain, and update the read and write pointers after the operation, so as to ensure the correctness of subsequent operations.
The input real part of the FFT operation is the microphone sampling data, and the imaginary part is zero, which is a placeholder operation, that is, the output of the operation result occupies the address space of the input data. According to the FFT principle, when the order is input, the output is reversed, and the order of output is reversed. The inverse algorithm depends on the number of points of the FFT operation, and 128 points are selected here. According to the principle of Fourier transform, the frequency resolution depends on the number of operating points and the sampling rate of the ADC. The calculation formula is as follows:
Δf=fs/N=8000/128=62.5Hz
The reverse sequence is 0 64 32 96 16 80 48 112 8 72 40 104 24 88 56 120 4...
In order to ensure the correct operation, multiple operations are required. First, a timer is set to refresh the real data of the FFT input in real time. Secondly, the imaginary part is completely cleared before each FFT operation, and the real data that has not been assigned is completely cleared. . The timer period is determined by the sampling rate of the ADC and the number of operating points. Since the zero-padding operation of the FFT input data does not affect the operation result and frequency resolution, the timer period is set to 14 ms here, so that the input data does not overflow.
After the operation is completed, the real part and the imaginary part need to be modulo-calculated. According to the above reverse order output, it is judged whether the peak value appears at the 56th point at 1 kHz, and the microphone is working normally, otherwise the work is not normal.
Conclusion The author uses BC5 and MCF5251 to realize the in-vehicle infotainment equipment. The equipment is stable and reliable, and has high practical value. This paper discusses the application development experience and key technologies of BC5, and helps Bluetooth engineers who develop with BC5 to deepen their understanding of design and development.
10 inch tablet is the most important size on tablet market. Which kind of clients like more? The answer is loving bigger size or storage, longer working time, etc. Since Android Tablet 10 inch is usually equipped with full HD screen, memory support up to 8GB, storage up to 256GB, battery up to 7000mAh-working 5-8hours. However, 8 inch android tablet mainly up to 4GB ram 64GB ROM, 4000mAh battery. At this store, you can see more than ten different 10 inch tablets on sale and one 10 inch windows tablet with magnetic keyboard option, and high level CPU and SIM Card option. Besides, you can also see amazon tablet 10 inch with competitive cost, especially take above 1000pcs. Except android tablet, 14 inch 64Gb Student Laptop for online learning, 15.6 inch celeron n5095 business laptop, 15 inch intel i3, i5, i7 10th or 11th generation Gaming Laptop and 16 inch laptop with 4gb graphics card and 16gb ram 512GB ssd alternatives also.
Any other special requirements, just fee free to contact us. Will try our best to support you.
10 Inch Tablet,10 Inch Tablets On Sale,Android Tablet 10 Inch,Amazon Tablet 10 Inch,10 Inch Windows Tablet
Henan Shuyi Electronics Co., Ltd. , https://www.shuyiaiopc.com