es ig ns D N ew USER GUIDE m en de d Friday, 16 May 2014 fo r WT32i DEVELOPMENT KIT N ot R ec om Version 1.11 1 Overview WT32i Development Kit Features: es ig ns Evaluation board for WT32i Bluetooth Audio module containing o WT32i-A Bluetooth module with integrated chip antenna o Powering either through USB or from the on-board battery o ON/OFF button when used with the battery o USB to UART bridge o USB interface o Audio features: Reference design for the WT32i's internal audio codec with by-passable external audio power amplifier (PA) External I2S audio codec (TLV320AIC32IRHB) that connects to the WT32i's I2S interface RCA and 3.5mm audio inputs/outputs for the internal audio codec Switchable microphone or line input Embedded silicon microphone and 3.5mm connector for an external microphone RCA and 3.5mm audio jack connectors for the external audio codec o 5 push buttons with indicator LEDs connected to GPIOs o 850mA rechargeable Li-Ion battery with charger connected to the USB power o Current test points for each power supply and for the board in total o Module IO's available via a pin header USB cable Firmware programming cable fo r N ew D Select MIC for microphone input or LINE for line level audio input Select BY-PASS PA (single ended output) or AUDIO PA (differential output through an external amplifier chip) N ot R ec om Audio interfaces of the internal audio codec of WT32i m en de d *To power from USB, switch to USB position *To power from the battery, switch to BAT position and use the on/off button Jack connector for headset microphone Audio interfaces of the external audio codec Embedded chip microphone Figure 1: DKWT32i interfaces Silicon Labs Page 2 of 13 On/Off button Buttons and LEDs Battery USB WT32i-A es ig ns Supply Audio PA Internal Audio IN/OUT fo r I2S Audio IN/OUT N ew I2S CODEC POR HEADER Reset D USB to UART Bridge USB N ot R ec om m en de d Figure 2: Block diagram of WT32i evaluation board Silicon Labs Page 3 of 13 2 Getting Started with the WT32i Development Kit es ig ns 2.1 Connecting DKWT32i to a Phone Power the DKWT32i either from the USB or from the battery as described in chapter 2.2. Switch on Bluetooth in your phone and search for Bluetooth devices. Locate DKWT32i and connect. If pairing code is required, use 0000. After connecting, plug in headphones and enjoy the sound and music from your phone or use the DKWT32i as a Hands-Free device. NOTE: When using as Hands-Free device, make sure that the audio input is switched for the microphone input (see Figure 1) D 2.2 Default Configuration of DKWT32i N ew The WT32i Development Kit is preconfigured for basic stereo audio streaming and hands-free use cases. DKWT32i is connectable as a Bluetooth audio device just by powering the board either from the USB or from the battery. The pairing code is 0000. Figure 1 describes the switches in the DKWT32i. If powering from the USB, turn the power switch to USB position and plug in the USB cable. o Battery charger is disabled when the power switch is in USB position If powering from the battery, turn the power switch to BAT position and hold the power on/off button pressed for few seconds to turn the board on. To turn power off, press on/off button again. fo r o When the module is powered, the battery charger operates normally by plugging in a USB cable m en de d o When the module is not powered, the battery charger operates with limited voltage and current. See chapter 3.2.10 for details about the charger. There are five buttons connected to GPIO's of the module. In the default configuration Button in PIO10 is volume up Button in PIO9 is volume down Button in PIO0 is pause Button in PIO3 is play Button in PIO4 forward om . 3 Using iWRAP and Learning the Configuration of DKWT32i ec To get started, download and install a terminal software of your preference, for example Putty or Tera Term: http://www.putty.org/ N ot R http://en.sourceforge.jp/projects/ttssh2/releases/ The WT32i development board has a Prolific PL2303HXD USB to UART converter on it and the first time you connect the kit to your PC you might be prompted for a driver installation. In case this happens you can download and install the Prolific drivers for PL2303HXD from the Prolific web site: http://www.prolific.com.tw Choose Products Application > Smart IO > Serial / Parallel and then select PL2303HXD. Direct link to download the driver is: http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 Silicon Labs Page 4 of 13 3.1 Default iWRAP Configuration of DKWT32i N ew D es ig ns To read the iWRAP configuration of DKWT32i, power on the DKWT32i by turning the power switch to USB position and by plugging in the USB to the USB connector labeled "UART" and launch the terminal software. Verify the correct COM port from the device manager and connect with the terminal software using serial connection with 115200 baud rate. Figure 3: UART settings with Putty iWRAP Setting m en de d fo r When connected, type "SET" and press enter. The current settings are prompted to the terminal window. The default configuration with brief descriptions is shown in the table below. Description SET BT BDADDR 00:07:80:56:43:77 BT address of the module in DKWT32i. SET BT NAME DKWT32i The friendly name shown when searching BT device with a laptop, phone, tablet, etc. om Class of device is a parameter, which is received during the device discovery procedure, indicating the type of device and which services are supported. The hex number describing the class of device can be generated with a class of device generator which can be found here: SET BT CLASS 240428 N ot R ec http://bluetoothpentest.narod.ru/software/bluetooth_class_of_deviceservice_generator.html SET BT AUTH * 0000 BT pairing code. SET BT IDENT BT:47 f000 6.0.0 Bluegiga iWRAP USB device identification information. SET BT LAP 9e8b33 Inquiry access code. SET BT PAGEMODE 4 2000 1 Page mode controls whether iWRAP can be seen in the inquiry and whether it can be connected. The default is visible when not connected and not visible when connected. Silicon Labs Page 5 of 13 Paired devices are listed here. SET BT POWER 6 6 6 Default, maximum and inquiry TX power (dBm). SET BT ROLE 0 f 2580 Master/slave role configuration. SET BT SNIFF 190 20 1 8 3c Sniff mode enabled to reduce current consumption. In sniff mode, the time slots when the slave is listening are reduced. SET BT SSP 3 0 Secure Simple Pairing mode configuration. SET BT MTU 667 96 Maximum payload size configuration (bytes). SET CONTROL AUDIO INTERNAL INTERNAL EVENT Internal (analog audio) or external (I2S or SPDIF) audio codec selection. SET CONTROL BAUD 115200,8n1 UART setting configuration. The default is 115200 baud, no parity, one stop bit. SET CONTROL BIND 0 400 R VOLUME UP Configure PIO10 as volume up button. fo r Configure PIO9 as volume down button. m en de d SET CONTROL BIND 1 200 R VOLUME DOWN N ew D es ig ns SET BT PAIR Configure PIO4 as forward button. SET CONTROL BIND 3 8 R AVRCP PLAY Configure PIO3 as play button. SET CONTROL BIND 4 1 R AVRCP PAUSE Configure PIO0 as pause button. SET CONTROL CD 00 0 Carrier detect signal not set. SET CONTROL CODEC SBC JOINT_STEREO 44100 1 Configure the internal audio codec. Sample rate 44100 Hz. SET CONTROL ECHO 7 Configure echo mode (i.e. which events are displayed in terminal window when using iWRAP). ec om SET CONTROL BIND 2 10 R AVRCP FORWARD SET CONTROL GAIN 8 8 The audio gain setting (input gain, output gain). SET CONTROL MICBIAS 8 2 Microphone bias current and voltage setting. SET CONTROL MSC DTE 00 00 00 00 00 00 UART modem signal configuration. The default is modem signals disabled. N ot R SET CONTROL ESCAPE 43 00 1 Selection of the escape character used to switch between command and data modes. The default is "+". Also the configuration of the DTR signal. The default is DTR disabled. Silicon Labs Page 6 of 13 SET CONTROL PREAMP 1 1 Audio preamplifier enabled (i.e. microphone input mode). SET CONTROL READY 00 Configure an IO to indicate that iWRAP is ready to be used. The default is disabled. SET CONTROL VREGEN 2 02 Configure enable pin of the module, i.e the on/off button of DKWT32i. By default this is configured to turn regulators on at rising edge (i.e. when pressing the button) and turn regulators off at following rising edge (i.e. when pressing the button again). PIO1 is used to latch the onboard regulators on. SET CONTROL RINGTONE &-5aaa;f:_6c5a;f:_6c-5a_-6eee;f:_6c-5a;f:_6c-5a Ring tone which will be played when HFP or HSP headset receives a RING event. N ew fo r SET PROFILE A2DP SINK D es ig ns SET CONTROL PIO 00 00 C6 Configure the initial state of GPIO's after the boot. C6 is a hex representation of a bit mask which disables the binding capability from those IO's which are not driven low when entering sleep mode. This is required to enable entering to the sleep mode. Stereo audio profile enabled. Hands-free profile enabled. m en de d SET PROFILE HFP hands-Free SET PROFILE SPP Bluetooth Serial Port Serial port profile enabled. SET PROFILE AVRCP CONTROLLER A/V remote control profile enabled. Table 1: Default configuration of DKWT32i om 3.2 Useful Tips for Configuring and Using WT32i To learn detailed iWRAP command descriptions, please download the latest iWRAP user guide from: ec www.bluegiga.com Products Bluetooth Classic Modules WT32i Bluetooth Audio Module Documentation and Software User Guides. N ot R Following examples show briefly some practical configuration settings to get overview of possible iWRAP settings in an end product and to test these functions with DKWT32i. 3.2.1 Restore Development Board Default Settings or Module Factory Settings It is possible to revert back to the factory settings with a simple command in iWRAP. Example: Return development board default settings SET DEVKIT Silicon Labs Page 7 of 13 Example: Return the module factory settings 3.2.2 Create a Connection to Paired Devices Automatically es ig ns SET RESET Using iWRAP autocall feature it is possible to configure the module to start trying to connect to a paired device. If the connection is lost, iWRAP will try to reopen it automatically. D Example: Call automatically to a paired phone to open hands free connection. Make sure that the phone is set visible in inquiry (typically they are not visible). Connection mode Timeout (ms) fo r Target: 16bit UUID of Hands-Free Audio Gateway N ew SET CONTROL AUTOCALL 111F 5000 HFP 3.2.3 Run a Command by Pressing a Button m en de d In iWRAP it is possible to bind any command to certain GPIO so that the command is executed when there is an event in the GPIO. Example: Make an A2DP connection to by pressing a button in PIO0. SET CONTROL BIND 1 1 FALL CALL 00:07:80:12:34:56 19 A2DP PIO mask (hex) to determine which PIO is to be bind Trigger at falling edge Call to this BT address Target channel Connection mode om Command priority ec NOTE: To test binding with the development board, the default binding in that particular PIO must first be removed. In this case the binding of PIO0 is removed by using command "SET CONTROL BIND 4" N ot R 3.2.4 Change the Initial State of GPIO's By default the GPIOs are inputs with internal weak pull-down. Using the SET CONTROL INIT command in iWRAP it is possible to set the initial configurations which will take place at boot. Example: Set the initial state of GPIOs from pull-down to pull-up. SET CONTROL INIT PIO SET 1ff 1ff PIO mask (hex) to determine which PIOs are set Set PIO high or low Silicon Labs Page 8 of 13 NOTE: Any PIOs that are high, prevent the module from going to sleep unless they are set in the ignore mask of SET CONTROL PIO command es ig ns Example: Set the initial state of GPIOs from weak pull-down to strong pull-down. SET CONTROL PIO 0 1 c6 Set the strength of the pull-up/-down 1 = strong, 0 = weak Set ignore bit to those PIOs that are high so that these PIOs will not prevent the module from going to sleep 3.2.5 Decrease Current Consumption Using the Sniff Mode D Sets the PIO as an output (1) or as an input (0) N ew In sniff mode, the time slots when the slave is listening are reduced. The reduced duty cycle of a slave in a piconet results to lower current consumption when connected to a host. Example: Enable automatic sniff mode to reduce current consumption from 4.7 mA down to 2.5 mA when connected without link activity. SET BT SNIFF 1000 20 1 8 78 fo r m en de d Maximum acceptable interval in milliseconds Minimum acceptable (hex) interval in milliseconds (hex) Number of seconds (hex) the link will stay active before going to sniff mode. When this is set, iWRAP will automatically switch between active and sniff mode depending on the amount of traffic. 3.2.6 Decrease Current Consumption by Limiting the Radio TX Power By default the TX power of WT32i is set to 6 dBm which corresponds to the actual 6.5 (+/-1.5 ) dBm TX power of the module. The TX power control works with 4 dBm steps. In iWRAP it is possible to define the maximum default TX power, maximum TX power and inquiry TX power. The setting takes place when creating a new connection but it does not have impact on existing active connections. om Example: Set the default and inquiry TX power to -2 dBm and maximum TX power to 2 dBm. ec SET BT POWER -2 2 -2 N ot R 3.2.7 Configure the Regulators to Turn Off When the Battery Voltage Falls Below Defined Level It is important not to let the battery be drained to voltages below 2.8V. In DKWT32i there is a power on reset circuit which will cause reset if the power supply falls below 3.0V and thus the board will automatically turn off and the battery is not discharged below safe voltage. In iWRAP it is also possible to define certain level when the module turns off the regulators. Example: Configure WT32i to start sending low battery warning at 3.4V, turn off at 3.3V and cease the low battery warning at 4.0V. Set PIO4 to indicate low battery (the led in PIO4 will lit) SET CONTROL BATTERY 3400 3300 4000 10 Silicon Labs Page 9 of 13 3.2.8 How to Make Remote Control Using AVRCP Profile es ig ns NOTE: To use a GPIO to indicate low battery, binding related to the corresponding GPIO must be first removed. In this case the binding of PIO4 is removed by using command "SET CONTROL BIND 2" When using the AVRCP profile to send remote control commands (play, pause, etc.), the commands are sent to particular BT connection with certain link ID. For the A2DP connections the link ID is detected automatically. Example: Create A2DP connection to a phone and use AVRCP profile to send play and pause commands to the phone. D To send play command N ew AVRCP PLAY To send pause command fo r AVRCP PAUSE 3.2.9 Hang-up a Phone Call or Answer to a Phone Call Using HFP Control m en de d For any other connection type than A2DP the link ID will not be detected automatically, so before sending the command to particular link the user must first specify the correct link ID. HFP control command must be directed to the correct BT connection using specific link ID. To list the active BT connection, type LIST and iWRAP returns a list of the active connections LIST Number of active connections LIST 4 om LIST 0 CONNECTED HFP 256 0 0 1633 8d 8d c0:65:99:66:b3:ae 3 INCOMING ACTIVE SLAVE ENCRYPTED 0 LIST 1 CONNECTED A2DP 672 0 0 1632 8d 8d c0:65:99:66:b3:ae 19 INCOMING ACTIVE SLAVE ENCRYPTED 0 ec LIST 2 CONNECTED A2DP 1008 0 0 1632 8d 8d c0:65:99:66:b3:ae 19 INCOMING ACTIVE SLAVE ENCRYPTED 0 N ot R LIST 3 CONNECTED AVRCP 512 0 0 1629 8d 8d c0:65:99:66:b3:ae 17 INCOMING ACTIVE SLAVE ENCRYPTED 0 Link ID of the HFP connection Profile used in the connection Verify the link ID of the HFP connection and similarly as with in previous example with AVRCP. Then type SET X SELECT Where X, is the link ID of the active HFP connection. Now you can send HFP control command and they will be directed to the HFP connection. To answer to a call, type Silicon Labs Page 10 of 13 ANSWER es ig ns To hang-up a call, type HANGUP 3.2.10 Battery Charger N ew D The battery charger can be powered from either of the two USB connectors. The charger can only be used when powering the board from the battery. When powering the board from the USB, The charger is disabled. The charger is initially calibrated to charge the battery to 4.15V - 4.2V. The charger LED is connected to the battery. If the charger is connected but the module is not powered, the charger is not able to read the calibration settings from the flash and it will use the default minimum values (i.e. charge at minimum current to approximately 3.6V) 3.3 Using the External Audio Codec fo r The external I2S codec used in the DKWT32i is TLV320AIC32IRHB manufactured by TI. The audio connectors to the external codec are labelled according to the pin names of the audio codec. Refer to the datasheet of the codec for details. To route the audio output through the external I2S codec, type following in the terminal software: m en de d SET CONTROL AUDIO INTERNAL I2S EVENT 32 SET CONTROL EXTCODEC PRE 30 18 0200918000008A1037000100008000000FF07C7C787C7C78 30 04 25C01400 30 0a 28C00000000000008000 30 03 330F00 30 05 3F00800F00 30 04 6500A200 RESET om NOTE: The volume up and volume down buttons are controlling the internal audio gain settings of WT32i so they can't be used for the external codec. Play, pause and fast forward buttons will still work normally because these commands are sent to the AVRC link and are not dependent on the codec. Using an external codec other than the in used in DKWT32i will require custom FW. ec 4 Updating the FW N ot R Firmware programming cable delivered with the development kit is plugged to the SPI header for FW updates or to modify PS Keys. SPI can't be used for application purposes. To update the FW, download the latest FW package from: www.bluegiga.com www.bluegiga.com Products Bluetooth Classic Modules WT32i Bluetooth Audio Module Documentation and Software Software Releases . Note: When updating the FW, the iWRAP configurations will be set to factory default of the module. In WT32i Development Board v2, PIO1 of the module is preconfigured to latch on the supply voltage when powering from the battery and the power led is connected to PIO1. This however is not factory default setting of the module. Thus when re-flashing DKWT32i, the power led will not lit and the board can't be used with the battery before configuring PIO1 with iWRAP command SET CONTROL VREGEN 2 2. Silicon Labs Page 11 of 13 5 WT32i Development Board Version History COMMENT WT32i Development Board First Release WT32i Development Board v2 Regulator active hold circuit added to enable resetting the module when powering from the battery. The power led connected to PIO1 (previously 3V3) to indicate when the module has booted and the power has been latched on. D es ig ns BOARD VERSION N ew 6 Find more information Log in to Bluegiga web site at www.bluegiga.com. If you do not have an account yet, you can create one at http://www.bluegiga.com/en-US/support/request-an-account/ fo r 6.1 DKWT32i Design Files The design schematics, CAM files and detailed description about the DKWT32i design can be downloaded from: m en de d www.bluegiga.com Products Bluetooth Classic Modules WT32i Bluetooth Audio Module Documentation and Software Reference Design 7 WEEE Compliance N ot R ec om The crossed-out wheeled bin means that within the European Union the product must be taken to separate collection at the product end-of-life. Do not dispose of these products as unsorted municipal waste. Silicon Labs Page 12 of 13 es ig ns D N ew fo r One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux! SW/HW Quality Support and Community www.silabs.com/simplicity www.silabs.com/quality community.silabs.com om IoT Portfolio www.silabs.com/IoT m en de d Simplicity Studio N ot R ec Disclaimer Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are not designed or authorized for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc.(R) , Silicon Laboratories(R), Silicon Labs(R), SiLabs(R) and the Silicon Labs logo(R), Bluegiga(R), Bluegiga Logo(R), Clockbuilder(R), CMEMS(R), DSPLL(R), EFM(R), EFM32(R), EFR, Ember(R), Energy Micro, Energy Micro logo and combinations thereof, "the world's most energy friendly microcontrollers", Ember(R), EZLink(R), EZRadio(R), EZRadioPRO(R), Gecko(R), ISOmodem(R), Precision32(R), ProSLIC(R), Simplicity Studio(R), SiPHY(R), Telegesis, the Telegesis Logo(R), USBXpress(R) and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com