The CSR8645 is a Bluetooth 4.1 stereo audio chip supporting the aptX codec for streaming high quality audio. I bought the chip from ebay but I couldn’t find a breakout board for it, so I built one.
Configuring the chip
The chip can be configured through the SPI interface with an USB-SPI device connected to the computer. For this you have to do the following steps:
1. Get a breakout module with the FT232RL USB-UART converter chip where you can access every pin of the FT232RL. Download and run Zadig from http://zadig.akeo.ie. In Options menu choose “List all devices”, choose your FT232RL device, choose libusbK driver and press “Replace driver”. This will install a generic libusb-compatible driver for the chip.
2. Connect the CSR8645 with the FT232RL. The https://github.com/lorf/csr-spi-ftdi has a good explanation how to connect them. To select the SPI pins logic level to 3.3V for the FT232RL connect the VCCIO pin to the 3V3OUT pin. But because the CSR8645 needs 1.8V logic for its SPI pins you need to add resistors in series or a logic converter when you connect the two devices. (According to the datasheet you can connect the 1V8 pin of the CSR8645 to the VCCIO pin to provide the 1.8V logic level for the SPI pins, but only if the two devices share the same power source. In this case you don’t need a logic converter). To enable the SPI communication for the CSR8645 connect the SPI_PCM pin to a high logic level through a resistor.
3. Install the BlueSuite from http://www.tinyosshop.com/download/BlueSuite 2.5.rar and the CSR86XX ROM Config tool from http://www.tinyosshop.com/download/CSRXX_ROM_ConfigTool_3.0.64.rar
4. Replace the usbspi.dll in the installed programs with a custom dll from https://github.com/lorf/csr-spi-ftdi/releases.
5. Open the ROM Config tool or the PSTools from the BlueSuite installation directory and change the settings of the CSR8645. Before you do any changes it is a good idea to save the original settings (PSkeys) and the eeprom content. You can do this with the PSTools (File->Dump/File->Merge to backup/update the PSkeys) or by running the following commands from the BueSuite directory.
- Backup the PSkeys into
pscli.exe dump pskeys.psr
- Merge some settings from
pskeys.psrto the chip:
pscli.exe merge pskeys.psr
- Backup the whole EEPROM content to a file:
e2cmd.exe dump eeprom.hex
- Restore EEPROM contents from a backup file:
e2cmd.exe download eeprom.hex
The ROM Config tool is more user friendly and has more settings than the PSTools. But according to some info from different forums this program shouldn’t be used to write directly to the device (‘Write Device’ button), because it will overwrite some data on the device, or it just writes only a subset of the data, and so it can brick your module. Instead you should write to a file, before and after changing the settings, and then compare the two files and copy the changed keys to the original dump file. Then you can write back the changed dump file using the methods mentioned above.
The CSR8645 has a differential audio output which means that there is two output for each channel (LP+LN and RP+RN). If you want to connect this output to an amplifier you have to transform the differential output to a single ended output, because most of the amplifiers have one input for each channel and a common ground (L+R). Here is the schematic which I built to do the conversion, it is based on LME49721.