BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash Introduction While BC127 Discovery Boards ship with Melody firmware programmed on them to speed up customer development, it is possible to re-program the boards and attach a debugger to them for development purposes. It is best if before you create a backup of the board contents and make a note of the module frequency trim before you start any development. The module Bluetooth address is printed on the module label. There are instructions on how to do this below. BlueCreation cannot help you recover the lost trim value, and you will need to re-trim the module if you lose it. Required equipment To Program a BC127 Discovery Board you will need the following equipment: 1) CSR DEV-SYS-1808-1A (for example available at http://www.digikey.com/product-detail/en/DEV-PC1309C/DEV-PC-1309C-ND/1678539) 2) CSR BlueFlash (Latest release available, at time of writing this document 2.5.8.667) 3) BC127 Discovery board 4) 1 UBS<->miniUSB cable, as supplied with BC127 Discovery board 5) The *.xdv and *.xpv files you would like to program your board with 6) 5 male to female jumper cables to connect the DEV-PC-1309C and your BC127 Discovery Board Procedure 1. Set-up 1.1. If you have not already, download and install CSR BlueSuite from CSR Support. 1.2. Connect your Discovery Board to your PC 1.2.1.Power on and install the DEV-PC-1309C according to CSR instructions 1.2.2.Plug in mini USB cable into power source wall charger or PC USB and connect it to the mini USB port on your development board. If the USB cable is connected to a PC the development board will start enumerating. This is not important. (Figure 1) 1.2.3.Ensure SPI/PCM# jumper is set to SPI mode ( Pins 1 and 2 shorted) 1.2.4.Set the DEV-PC-1309C Interface voltage to 3V3 following CSR instructions Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 1 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash 1.2.5.Connect the DEV-PC-1309C SPI signals and Ground to your Discovery board using the PCM/I2S/SPDIF header. The header pin out is described in Figure 1 Figure 1: BC127 Discovery Board PCM header Pin out Figure 2: DisKit connected to DEV-PC-1309C 2. Backup BC127 Discovery Board crystal trim value using CSR PSTool Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 2 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash 2.1. Open PS tool and select USB<->Serial Port to use and press "OK" Figure 3: PSTool Start Screen 2.2. You are not connected and the device Bluetooth address is displayed on the right hand pane. Take a note of that. Figure 4: PSTool connected and displaying Bluetooth address 2.3. Type "trim offset to crystal" in the Filter field. This will display only keys which match the string filter Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 3 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash you have written. 2.4. Select the single result from the pane below the filter field Figure 5: PSTool select crystal trim key 2.5. From the right hand pane, get value, write it down, and store it as you will need to set is after you program your device to ensure radio performance is not affected. 2.6. Close PSTool using the "Close" button. 3. Program Using BlueFlash 3.1. Open BlueFlash Figure 6: BlueFlash start up 3.1.1.Normally, BlueFlash will recognise your USB<->SPI converter and connect to it and the board on start up. Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 4 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash 3.1.2.If it does not, use the drop down menu to select the USB<->SPI port you want to use 3.1.3.Once connection is successful, you will see "Processor Running" 3.2. Stop the processor by clicking on the "Stop Processor" button Figure 7: Processor Stopped 3.3. Backup current firmware and settings 3.3.1.Click on "Dump" and select a file and location for your backup 3.4. Load new firmware 3.4.1.Click on "Choose File" and select the image file you would like to program to your BC127 Discovery Board Figure 8: File selected 3.4.2.Click on "Download" to start the process Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 5 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash Figure 9: Downloading in progress 3.4.3.Wait for the download to complete Figure 10: Download finished 3.5. Start processor 3.5.1.Press on "Start Processor" to start the processor Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 6 of 7 BC127-AN_PROG-DISKIT Application Note: Programming BC127 Discovery Board using CSR BlueFlash Figure 11: Processor started 3.5.2.Close BlueFlash 4. Restore Bluetooth Address and Frequency trim 4.1. Follow the same steps as in 2 above, except where you would read off the value in 2, now enter the new value and press "Set" 4.2. Close PSTool with the "Reset & Close" button to apply the restored settings. Blue Creation. St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t. +44 (0)1223 420 252 e. info@bluecreation.com www.bluecreation.com Page 7 of 7