Preview only show first 10 pages with watermark. For full document please download

En-52-ek Evaluation Kit User`s Guide

   EMBED


Share

Transcript

RN-52-EK-UG RN-52-EK Evaluation Kit User’s Guide © 2013 Roving Networks. All rights reserved. RN-52-EK-UG Version 1.1r 3/20/13 Copyright © 2013 Roving Networks. All rights reserved. Roving Networks is a registered trademark of Roving Networks. Apple Inc., iPhone, iPad, iTunes, Made for iPhone are registered trademarks of Apple Computer. Roving Networks reserves the right to make corrections, modifications, and other changes to its products, documentation and services at any time. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. Roving Networks assumes no liability for applications assistance or customer’s product design. Customers are responsible for their products and applications that use Roving Networks components. To minimize customer product risks, customers should provide adequate design and operating safeguards. Roving Networks, Inc. 102 Cooper Court Los Gatos, CA 95032 +1 (408) 395-5300 www.rovingnetworks.com www.rovingnetworks.com Roving Networks products are not authorized for use in safety-critical applications (such as life support) where a failure of the Roving Networks product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Version 1.1r 3/20/13 Advanced Information page 2 RN-52-EK-UG 1.0 OVERVIEW This document describes the hardware and software setup for the Roving Networks RN-52-EK evaluation kit. This kit contains the hardware you need to evaluate the RN52 Bluetooth audio module. The RN52 module is mounted to an evaluation board that demonstrates the module’s key features. The board contains: • • • • • • Dual-channel audio output and input Easy access to GPIO pins Built-in amplifier for stereo audio output 6 pushbuttons to control audio playback Status LEDs Connections for the programmer and UART interfaces The RN52 supports the following Bluetooth profiles: • • • • • A2DP stereo audio (sink mode with an SBC CODEC) AVRCP media player remote control HFP/HSP for accepting a phone call from a mobile phone SPP (allows the module to receive serial data over the UART) iAP profile discovery for iOS devices You use the evaluation kit to configure and program the Bluetooth module using the command interface, create connections, and transfer data. The command interface is made up of simple ASCII commands. See “Resources & Related Documents” on page 12 for information on available documentation. 2.0 EVALUATION KIT DESCRIPTION The evaluation kit includes the hardware required to connect the evaluation board to your computer. See Table 2-1. To evaluate the module on the evaluation board, you need a computer with a USB port running the Microsoft Windows or Mac OS-X operating system. Note: Before beginning your evaluation, you may need to install the driver for the USB cable. You can download the driver (as well as other tools and utilities) from the Roving Networks website at http://www.rovingnetworks.com/support.php. TABLE 2-1: EVALUATION KIT CONTENTS Hardware Description Evaluation board Contains the Bluetooth module and connectors. Mini-USB cable Links your computer to the evaluation board. Stereo mini-speakers Rechargeable battery powered speakers. Figure 1-1 provides the RN-52-EK evaluation board and pin information. www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 3 RN-52-EK-UG FIGURE 1-1: RN-52-EK EVALUATION BOARD Differential Audio In/Out (J7) Status LEDs Volume Up Previous Track Pause/ Play USB to Module (HCI Mode) Next Track USB to UART (SPP & Command Mode) Volume Down GPIO Pins SPI (J4) Audio In PCM In/Out AIO0, GPIO9 (J3) Audio In 3.5 mm TRR Power On Pairing Mode Audio Out 3.5 mm TRR www.rovingnetworks.com PCM In/Out, AIO0, GPIO9 (J3) Differential Audio In/Out (J7) 2 4 6 8 10 12 14 16 2 4 6 8 10 1 3 5 7 9 11 13 15 1 3 5 7 9 Pin Description 1 2 3 4 SPI (J4) 1 2 3 4 5 6 Pin Description Pin Description UART_TX 1 SPKR_R- 1 SPI_MISO VBUS 2 MIC_L+ 2 SPI_MOSI UART_RX 3 SPKR_L- 3 SPI_SCK AIO0 4 MIC_R+ 4 SPI_SS 5 GPIO9 5 SPKR_R+ 5 3.3 V 6 GND 6 MIC_L- 6 GND 7 GND 7 SPKR_L+ 8 PCM_IN 8 MIC_R- MIC Left (J8) 1 2 9 GND 9 GND 10 PCM_OUT 10 MIC_BIAS 11 GND 12 PCM_SYNC 13 GND 14 PCM_CLK 15 GND Pin Description 16 3.3 V 1 MIC_R 2 GND Pin Description MIC Right (J6) 1 MIC_L 1 2 2 GND Version 1.1r 3/20/13 Advanced Information page 4 RN-52-EK-UG 3.0 HARDWARE SETUP To set up the evaluation hardware, perform the following steps: 1. Connect the min-USB cable to your computer’s USB port and to the evaluation board’s UART connector. This connection provides power to the board and provides a data connection to the command console. Note: 2. 3. Windows should automatically install the drivers for the cable. If it does not, download and install the FTDI drivers from the Support page on the Roving Networks website at http://www.rovingnetworks.com/support.php. Note the COM port to which you have attached the cable. Connect the portable mini-speaker 3.5 mm TRR plug to the stereo audio out connector (J9). The mini speakers are powered via rechargeable batteries. Figure 1-2 shows the completed hardware setup for the evaluation board. FIGURE 1-2: 4.0 COMPLETED HARDWARE SETUP POWER UP THE BOARD To power up the board, connect the board to a power source via USB. Then press and hold the board’s power on button until the speakers issue a two tone alert. The board’s status LEDs give you a visual confirmation that the board is powered up and operating. See Table 4-1. TABLE 4-1: STATUS LEDS LED www.rovingnetworks.com Status Description Blue and red Flashing The RN52 module is discoverable. Blue only Flashing The module is connectable. Red only Flashing The module is connected. Version 1.1r 3/20/13 Advanced Information page 5 RN-52-EK-UG 5.0 USING THE EVALUATION KIT This section assumes that you have a working knowledge of Bluetooth operation and communications. To program the Roving Networks devices you need a Bluetooth-enabled PC (either builtin or using a USB Bluetooth dongle). You can only program one device at a time. Once programmed and configured, device settings are saved (independent of power down) until they are explicitly changed or the factory defaults are restored. 5.1 Command Mode vs. Data Mode The Bluetooth device operates in two modes: data mode (default) and command mode. While in data mode, the module is essentially a data pipe. When the module receives data, it strips the Bluetooth headers and trailers and passes the user data to the UART. When data is written to the UART, the module constructs the Bluetooth packet and sends it out over the Bluetooth connection. Thus, the entire process of sending/receiving data to the host is transparent to the end microprocessor. See Figure 1-3. FIGURE 1-3: DATA & COMMAND MODES Host Bluetooth User Data A B UART Bluetooth Module Bluetooth Interface A B Command Mode GPIO9 Driven Low with a Jumper The default configuration for the Bluetooth device is: • • • • • Bluetooth slave mode Keyboard default authentication mode (no pin code required) Serial port 115,200 Kbps baud rate, 8 bits, no parity, 1 stop bit Serial port flow control disabled Low power mode off You configure the device by putting it into command mode and sending ASCII commands over a serial port. Once you change the configuration parameters, they persist until you change them or perform a factory reset. NOTICE You can only configure the Bluetooth audio module locally using your computer’s serial port. You cannot configure the module remotely over the Bluetooth link. www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 6 RN-52-EK-UG You need a terminal emulator to complete the setup. Note: 5.2 Roving Networks suggests using either the TeraTerm (Windows OS) or CoolTerm (Mac OS-X) terminal emulator program. Configure the Module Using over the UART Set up the RN-52-EK hardware as described in “Hardware Setup” on page 5. With the Bluetooth device connected and powered on, run a terminal emulator and open the COM port to which the cable is connected. The terminal emulator’s communication settings should be the default serial port settings. Note: 5.3 You can use local configuration at any time when the device does NOT have a Bluetooth connection, as well as under certain conditions. If the device is in configuration mode and a connection occurs, the device exits configuration mode and data passes back and forth from the remote device. Enter Command Mode The RN52 module enters command mode when GPIO09 goes low. The RN52 module leaves command mode and enters data mode when GPIO09 goes high. With the RN-52-EK evaluation board, you use a jumper to switch between command and data modes. Launch a terminal emulator and specify the adapter’s default settings. Figure 1-4 shows the serial port settings dialog box for TeraTerm (open this dialog box by choosing Setup > Serial Port). FIGURE 1-4: SERIAL PORT SETTINGS IN TERATERM To place the module on the RN-52-EK evaluation board into command mode, connect a jumper to header pins 3 and 5 (GPIO9) on J3. See Figure 1-5. When entering command mode the module sends CMD to the UART. www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 7 RN-52-EK-UG FIGURE 1-5: GPIO9 LOCATION GPIO9 Type the following commands into the Tera Term console: + // Turn on local echo v // Display the firmware version d // Display the current settings q // Show the connection status To switch into data mode, remove the jumper from header pins 3 and 5 (GPIO9) on J3. When leaving command mode the module sends END to the UART. Figure 1-6 shows the Tera Term console after these actions. FIGURE 1-6: www.rovingnetworks.com COMMAND MODE ACTIONS IN TERA TERM EMULATOR Version 1.1r 3/20/13 Advanced Information page 8 RN-52-EK-UG 5.4 Making a Bluetooth Connection By default, the Bluetooth adapter acts as a slave and the PC is the master. You connect to the Bluetooth adapter using your computer’s Bluetooth device manager, which varies depending on the operating system. Regardless of the operating system, the process is the same: discovery, pairing, and connecting. 5.4.1 DISCOVERY When you turn on the RN-52-EK, the blue LED should blink and the adapter should be discoverable. Open your PC’s Bluetooth device manager and choose to add a new device. The Bluetooth device manager’s icon is located in the bottom right corner of your screen in the taskbar for Windows and in the upper right corner for Mac OS-X. The Bluetooth device manager displays a list of discoverable Bluetooth devices. The board displays as RN52-XXXX, where XXXX is the last 4 digits of the module’s MAC address. 5.4.2 PAIRING To pair with the evaluation board, double-click the board’s name in the list. The firmware automatically stores up to 8 pairings from remote hosts in a first in, first out fashion. The default authentication mode is keyboard (no pin code required). When the Bluetooth device manager completes pairing, it issues a message that the Bluetooth device is installed on COMX where COMX is unique to your computer. In some cases, the Bluetooth device manager creates two COM ports; in this situation, only use the COM port labeled “outgoing.” The evaluation board’s red LED flashes to indicate that the device is connected. If the remote Bluetooth device does not require authentication, a connection can occur without the pairing process. However the Bluetooth specification requires that if either device involved in the pairing process requires authentication, the other device must participate to ensure a secure link. Roving Networks modules default to an open mode, such that the module does NOT require authentication. However, most PCs require authentication. See “Security Modes” on page 10 for more information on using pass keys. The adapter may use simple secure pairing (SSP) if it is attempting to pair with devices that support the Bluetooth specification version 2.1 + EDR. SSP does not require the user to remember the pin code, but it asks to confirm the 6-digit number if the device has a display capability. Once connected, the device is in data mode allowing data to flow in both directions. For configuration and programming, the device must be in command mode. See “Enter Command Mode” on page 7 for more information. Note: Only one client can connect to a slave device at a time. As a master, the device can make multiple connections, but only in a point-to-point, serialized fashion. Roving Networks devices do not currently support multi-point master mode. Figure 1-7 shows some pairing/connecting examples. www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 9 RN-52-EK-UG FIGURE 1-7: 5.4.3 PAIRING/CONNECTING WITH THE BLUETOOTH ADAPTER CONNECTING To establish a Bluetooth connection, open the adapter’s COM port from your application or a terminal emulator. When the COM port is open, the adapter’s red LED flashes. The device remains connected until you close the COM port or remove power from the board. 5.5 Security Modes The Bluetooth adapter supports authentication. If the local or remote Bluetooth device has authentication enabled, you must enter a pin code the first time you attempt to connect. The pin code is a series of numbers or characters from 1 to 16 characters in length. The default pin code is 1234. After you enter the pin code, the Bluetooth devices compare them. If they match, a link key is generated and stored. Usually, but not always, the remote device stores the link key. For subsequent connections, the devices compare link keys. If they are correct, you do not need to re-enter the pin code. If the remote device is a PC or PDA, the user generally is prompted to enter this pin code. To remove the stored link key on the remote device, you typically “unpair” or remove the device from the Bluetooth manager. You can change the pin code to remove the link key on the Bluetooth adapter, forcing a new pin code exchange to occur upon subsequent connection attempts. Note: www.rovingnetworks.com Only one master can connect to the Bluetooth adapter at a time. Version 1.1r 3/20/13 Advanced Information page 10 RN-52-EK-UG 6.0 AUDIO DEMONSTRATION In this demonstration, you play an audio stream on the RN-52-EK using a computer or smartphone. The evaluation board broadcasts the audio through the mini-speakers. To perform the demonstration: 1. 2. 3. Connect the RN-52-EK to a host device (PC or smartphone) that has an audio source. Connect the mini-speakers to RN-52-EK board’s audio out connector (J9). Open the audio source on the host device. Roving Networks recommends using a media player (e.g., Microsoft Media Player, iTunes, Android). Start the audio stream on the media player. 4. When the RN-52-EK is connected to an audio source compatible with Bluetooth AVRCP, the audio control buttons are used to: • • • • Control the volume output Go to the previous track Go to the next track Start/stop playing the current track Figure 1-8 shows the location of the audio control buttons. FIGURE 1-8: AUDIO CONTROL BUTTONS Volume Up Previous Track Pause/ Play Next Track Volume Down 7.0 HSP/HFP DEMONSTRATION In this demonstration you explore the hands-free profile setting. This demonstration requires a microphone. Roving Networks recommends using a PC headset/microphone (with two-plugs). To perform the demonstration: 1. 2. 3. 4. www.rovingnetworks.com Connect the RN-52-EK via a USB cable to a PC that has an audio source. Using Bluetooth, pair and connect the RN-52-EK to a smartphone that supports the A2DP and HFP/HSP Bluetooth profiles. Connect the headset/microphone to the RN-52-EK board’s audio out connector (J9). Open an audio source on the PC, such as a music player, and begin playing audio. Version 1.1r 3/20/13 Advanced Information page 11 RN-52-EK-UG 5. From another phone, initiate a call to the smartphone that is paired with the RN-52-EK. The A2DP stream pauses and the ringtone plays on the headset/microphone. 6. On your PC, identify the virtual serial port connection to the RN-52-EK UART USB port. 7. In a terminal emulator, open this port with the settings: 115,200 Kbps baud rate, 8 bits, no parity, 1 stop bit. 8. Connect a jumper to header pins 3 and 5 (GPIO9) on J3. Refer back to Figure 1-5 on page 8. The terminal emulator displays CMD, indicating that the RN52 module is in command mode and you can connect to it via the UART. 9. Try the following commands: - D—Display settings - H—Help - Q—Connection status (a non-zero value indicates the device is connected) 10. To exit command mode, remove the jumper from GPIO9. The terminal emulator displays the message END, indicating that the mdoule is no longer in command mode. 8.0 RESOURCES & RELATED DOCUMENTS For more information, refer to the following sources: • RN52 Bluetooth Audio Module Data Sheet • Bluetooth Audio Module Command Reference User’s Guide 9.0 DOCUMENT REVISION HISTORY 9.1 Version 1.1 • Updated the evaluation kit contents. • Updated Figure 1-2. • Added the evaluation board’s bill of materials. 9.2 Version 1.0 Initial release. www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 12 RN-52-EK-UG Appendix 1. RN-52-EK Schematic Figure 1-9 shows the RN-52-EK schematic. Table 1-1 describes the board’s bill of materials. PCM_IN PCM_OUT PCM_SYNC MI C_R+ MI C_L + MI C_BI AS L ED0 L ED1 SPI _MOSI SPI _SCK SPI _MI SO SPI _SS 37 36 35 34 33 32 31 30 29 28 PCM_CL K MI C_L 38 39 MI C_R- SPKR_L 42 41 40 SPKR_R+ 43 SPKR_R- SPKR_L + 44 SPI _SS SPI_MISO SPI_SCK SPI_MOSI L ED1 L ED0 MIC_BIAS MIC_L+ MIC_R+ MIC_LMIC_RAGND SPKR_RSPKR_LSPKR_R+ SPKR_L + GND L ED0 L ED1 3.3V R8 47R D3 Blue LED PI O3 R2 47k 17 UART_CTS UART_TX UART_RX R1 22k C4 10nF USBDUSBD+ Wake S5 3.3V 11 12 BTN_PREVI OUS BTN_VOL DOWN PI O9 USBD- MI C_L - UART_TX UART_RX PI O9 1 3 5 7 9 11 13 15 10 BTN_PLAY MI C_R- D1 GND VBUS MBR120 J2 1 VBUS 2 D3 6 D+ MTAB 5 VBUS AI O0 3.3V PCM_I N PCM_OUT PCM_SYNC PCM_CL K C9 47nF C12 1uF USB Mini B / RSVD USB 2 4 6 8 10 12 14 16 C8 47nF C10 47nF 47nF C11 MI C_BI AS J3 EXT Connector 9 BTN_NEXT Vol Down S2 Next S6 R7 2k2 VBUS MI C_R MI C_L SPKR_RSPKR_L SPKR_R+ SPKR_L + R6 2k2 MI C_L MI C_R BTN_VOL UP BTN_VOL DOWN BTN_PL AY BTN_NEXT BTN_PREVI OUS J11 1 2 Battery 1 3 5 7 9 J7 1 2 MI CL J8 MI CR 1 2 J6 2 4 6 8 10 VBUS MI C_L + MI C_R+ MI C_L MI C_RMI C_BI AS 1 Mic Vin 3.3V TC1262- 3.3V 4J5 3 5 2 1 PI O2 PI O4 BTN_VOLUP BTN_NEXT BTN_PLAY BTN_PREVI OUS BTN_VOLDOWN PI O7 PI O6 PWREN C6 1uF SPKR_L SPKR_L + SPKR_R+ R70 SPKR_R- 1 2 3 4 5 6 7 8 9 10 11 12 J10 C22 1uF C14 1uF C21 1uF C18 1uF C13 1uF 2k2 R15 22k R17 22k R16 47k R11 47k R13 22k R12 22k C2 VBUS 100nF UART_RX UART_TX UART_CTS UART_RTS 30 TXD 2 RXD 32 RTS 8 CTS 31 DTR 6 DSR 7 DCD 3 RI 3.3V U2 3 C7 1uF SPI MASTER 1 2 3 4 5 6 J4 22 CBUS0 21 CBUS1 10 CBUS2 11 CBUS3 9 CBUS4 Vout SPI _MI SO SPI _MOSI SPI _SCK SPI _SS 3.3V VBUS IN2- IN2+ BYPASS IN1+ IN1- C15 10uF 2 3 4 7 8 R14 47k 10 R10 47k C3 1 C16 100nF Vo1 6 9 U4 TPA6112 100nF C1 28 27 18 14 15 U1 FT232RQ 100nF USBDM USBDP RESET OSCI OSCO Vo2 SHUTDOWN V DD 3.3V R9 470 D2 Red LED 16 UART_RTS M1 RN52 Module 14 8 BTN_VOL UP USBD+ 7 MI C_L + MI C_R+ 6 Prev S3 Play / Pause S4 Vol Up PI O4 PI O2 AI O0 3 PI O3 1 2 4 5 13 15 PI O7 PI O6 PWREN UART_RX UART_TX UART_RTS UART_CTS USBD+ USBDGPIO9 GPIO10 GPIO11 GPIO13 GPIO5 GPIO12 GPIO4 AIO0 GPIO2 GPIO3 GND S1 PA D 11 GND 5 3V 3OUT 1 V CCIO 19 V CC 20 GND 17 GND 4 GND 24 A GND 33 T HPA D 16 T E ST 26 T ab 4 GND 2 18 GND 19 GPIO7 21 GPIO6 20 GND 50 PWR E N 22 V DD GND 49 GND 48 24 PCM_IN 26 PCM_CL K 23 PCM_OUT GND 47 GND 46 PCM_SY NC 27 GND 25 GND 45 VBUS C20 100uF C23 100uF C17 100uF C19 100uF J1 GND 1 VBUS 2 D3 D+ 6 Headphones 1J9 2 5 3 4 MTAB USB Mini B / CSR UART 5 page 13 Version 1.1r 3/20/13 Advanced Information www.rovingnetworks.com RN-52-EK SCHEMATIC FIGURE 1-9: RN-52-EK-UG TABLE 1-1: RN-52-EK BOARD BILL OF MATERIALS Reference C1, C2, C3 Value Description Vendor 100 nF Capacitor, Ceramic, -20%, 80%, 16V, Y5V, 0402 C4 10 nF Capacitor, Ceramic, 10%, 50V, X7R, 0402 Yageo CC0402KRX7R9BB103 C6, C7, C18 1 μF Capacitor, Ceramic, -20% / 80%, 16V, Y5V, 0603 Yageo CC0603ZRY5V7BB105 C8, C9, C10, C11 47 nF Capacitor, Ceramic, 10%, 16V, X7R, 0402 Taiyo Yuden EMK105B7473KV-F Capacitor, Ceramic, 10%, 16V, X5R, 0402 TDK Corporation C1005X5R1C105K C12, C13, C14, 1 μF C21, C22 Yageo Vendor P/N CC0402ZRY5V7BB104 C15 10 μF Capacitor, Ceramic, 20%, 10V, X5R, 0603 TDK Corporation C1608X5R1A106M C16 100 nF Capacitor, Ceramic, -20% / 80%, 16V, Y5V, 0603 Yageo CC0603ZRY5V7BB104 C17, C19, C20, 100 μF C23 Capacitor, Ceramic, -20%, +80%, 6.3V, Y5V, Taiyo Yuden 1206 D1 MBR120 Schottky Diode, 1 A, 20 V, SOD-123F ON Semiconductor MBR120ESFT1G D2 Red LED Clear, Red LED, 10 mA, 1.8 V, 638 nm, 130 degrees, 1206 Lite-On Inc LTST-C150CKT D3 Blue LED Clear, Blue LED, 20 mA, 3.3 V, 470 nm, 130 degrees, 1206 Lite-On Inc LTST-C150TBKT J1, J2 USB Mini B / CSR Connector USB RCPT MINI B 5PS R/A UART, USB Mini B / SMD CSR USB JAE DX2R005HN2E700 J3 – Generic 0.1" Pitch 2x8 Male Pin Header – – J4 – Generic 0.1" Pitch 1x6 Male Pin Header – – JMK325F107ZM-T J5 Audio Jack, Pink Connector, jack stereo, 5POS 3.5 mm SMD CUI, Inc. SJ1-3515-SMT-PI J9 Audio Jack, Green Connector, jack stereo, 5POS 3.5 mm SMD CUI, Inc. SJ1-3515-SMT-GR M1 – RN-52 Module Roving Networks RN-52 R1, R12, R13, R15, R17 22 kΩ Res, 5%, 0.1 W, 0402 Panasonic - ECG ERJ-2GEJ223X R2, R10, R11, R14, R16 47 kΩ Res, 5%, 0.1 W, 0402 Panasonic - ECG ERJ-2GEJ473X R6, R7, R70 2k2 Res, 5%, 0.1 W, 0402 Panasonic - ECG ERJ-2GEJ222X R8 47R Res, 5%, 0.1 W, 0402 Panasonic - ECG ERJ-2GEJ470X R9 470 Res, 5%, 0.1 W, 0402 Panasonic - ECG ERJ-2GEJ471X S1, S2, S3, S4, Pushbutton S5, S6 Tactile and Jog Switches 6x6 260gf Red SMT Mountain Switch 101-TS6923T2605-EV U1 FT232RQ IC USB FS Serial UART 32-QFN FTDI FT232RQ-REEL U2 TC1262-3.3V Linear Voltage Regulator Microchip TC1262-3.3VDBTR U4 TPA6112 IC Amp Audio Power .15 W AB 10MSOP Texas Instruments TPA6112A2DGQR www.rovingnetworks.com Version 1.1r 3/20/13 Advanced Information page 14