Comments (11)
Hi!
Can You please share what You trying to achieve? CSR8645 is a ROM device, and firmware cannot be updated, AFAIK. There is a internal EEPROM which stores some configuration variables called PS Keys, and they are rather flexible.
On the SPI_PCM#
pin - from what I've read, spidev_test
is a loopback test for SPI driver testing. If it works, it doesn't mean a working SPI connection, it means that the signal loops back unmodified from MOSI to MISO. Also, from CSR8645 datasheet:
Unfortunately I don't have an RPi, so cannot help with programming. I just need to note that CSR's SPI is non-standard - it requires some initialization before actual transfer (two spare clock cycles on CLK pin while keeping Chip Select deselected). In csrbt
this is done in do_one_xfer()
function - it first uses bitbanging on SPI pins to initialize CSR's SPI port, then uses standard SPI for transfer.
from csr-spi-ftdi.
Hi,
thank you for your fast reply. I would like to change the name of Bluetooth device. I know that I can do it by using proprietary software of CSR plus the development board or a third party interface. However, if I can, I would prefer to avoid to buying new item. Yes, I would like to program the external ROM and I think that I can do this via SPI.
Yes, you are right regarding the SPI_PCM#. Unfortunately I cannot understand the correct behaviour without the proper datasheet. As I said before, my CSR 8645 is contained in a BTM98 v3.1 chip and I do not have the datasheet. I have the datasheet of BTM98 V2.0 and I supposed the same pin out configuration, this is the main issue.
I read the csrbt
file and the do_one_xfer()
function. This is the main function in which I modified the pin out according to previous datasheet, but without success.
However, thank you for your help. I will try again and in the worst case I will buy a third part interface :(.
#define WAIT_LOOP_TIME 10000 /* in ns */
void do_one_xfer(struct USART_DATA *p_data, struct spi_ioc_transfer *tr)
{
// gpio_set_pin(p_data, ECSPI1_SS0, 0); /* hold ECSPI1_SS0 high / low */
int pin, cntr;
struct timespec ts = { 0, WAIT_LOOP_TIME }; /* delay in nanoseconds */
/* first we must reset the CSR 8645 SPI with at least 2 pulses */
pin = 11; /* CS0 */
INP_GPIO(p_data->gpio, pin); // must use INP_GPIO before we can use OUT_GPIO
OUT_GPIO(p_data->gpio, pin); /* set as output */
GPIO_SET(p_data->gpio) = 1 << pin;
pin = 8; /* MOSI */
INP_GPIO(p_data->gpio, pin); // must use INP_GPIO before we can use OUT_GPIO
OUT_GPIO(p_data->gpio, pin); /* set as output */
GPIO_CLR(p_data->gpio) = 1 << pin;
pin = 10; /* clock pin */
INP_GPIO(p_data->gpio, pin); // must use INP_GPIO before we can use OUT_GPIO
OUT_GPIO(p_data->gpio, pin); /* set as output */
GPIO_CLR(p_data->gpio) = 1 << pin;
if (p_data->verbose)
printf("gpio now 0x%08x 0x%08x\n", *p_data->gpio, *(p_data->gpio + 1));
for (cntr = 0; cntr < 6; cntr++)
{
GPIO_SET(p_data->gpio) = 1 << pin;
nanosleep( &ts, NULL);
GPIO_CLR(p_data->gpio) = 1 << pin;
nanosleep( &ts, NULL);
}
for (pin = 8; pin <= 11; pin++)
{
INP_GPIO(p_data->gpio, pin); // must use INP_GPIO before we can use OUT_GPIO
SET_GPIO_ALT(p_data->gpio, pin, 0); /* set as alt 0 */
}
if (p_data->verbose)
printf("gpio now 0x%08x 0x%08x\n", *p_data->gpio, *(p_data->gpio + 1));
if (ioctl(p_data->spifd, SPI_IOC_MESSAGE(1), tr) < 1)
bail(p_data, "can't send spi message", CSRBT_EXIT_ERR1);
// gpio_set_pin(p_data, ECSPI1_SS0, 1); /* hold ECSPI1_SS0 high / low */
}
from csr-spi-ftdi.
Hi!
The device name is kept in PSKEY_DEVICE_NAME (0x0108) PS key contained in internal EEPROM, csrbt will not be able to change an EEPROM, since it needs different procedures to deal with it. So even if You get csrbt working, You will not be able to change the name.
I would suggest You buying cheap FT232RL breakout (<$2 on aliexpress, these contain counterfeit FT232RL chips, but verified to work with csr-spi-ftdi) and using PSTool from CSR BlueSuite with csr-spi-ftdi driver to change the PS key. BlueSuite can be downloaded from csrsupport website freely after registration.
Other options would be to get TI Stellaris Launchpad or Tiva C Launchpad, turn it into CSR programmer with this or this firmware and use that with BlueSuite.
from csr-spi-ftdi.
Ok thank you very much for all the information. I think I will buy a FT232RL and I will use CSR BlueSuite.
from csr-spi-ftdi.
Almost forgot, if You happen to have a computer with LPT port and 32-bit Windows, You have a chance to try a simple LPT programmer with BlueSuite, as described here, but don't forget about voltage level translation!
from csr-spi-ftdi.
Hi,
I just tried with FT232RL and CSR BlueSuite and it worked like a charm. Thank you very much. How can I repay you?
from csr-spi-ftdi.
Hi! Glad You've got it working! You can donate to me via paypal: [email protected], a buck or two will suffice, I think. Thank You!
from csr-spi-ftdi.
Hi,
I have just repaid you with 5 €. Take a beer also for me :)
from csr-spi-ftdi.
Received. Thank You!
from csr-spi-ftdi.
Hi,
I have a brief one more question for you. Is there any key configuration in the EEPROM of CSR 8645 that allows to a connected Bluetooth device to select only the media profile instead of both media and phone profile as default? I'm interested about this because at the moment I have to deselect phone profile in the Bluetooth device manager whenever I receive a phone call.
Thank you
from csr-spi-ftdi.
Hi, I sent You an email (to the [email protected] address) regarding the configuration.
from csr-spi-ftdi.
Related Issues (20)
- Scambio di due costanti
- ADK does not work with driver HOT 11
- CH341A Support? HOT 1
- Connect 2 modules with each other in transceiver mode
- ("Error detecting chip type...") HOT 3
- BlueSuite 2.3
- Saving Kids with CSR SPI
- Pure SPI? HOT 3
- Faulty ST232RL? HOT 2
- Modules on QCC300x chips HOT 18
- ¿I can chance the default sound the headphones bluethoo NIA ? HOT 1
- Transport type usbspi.dll invalid HOT 1
- need help restoring csr8645
- using ArduinoSPI? HOT 4
- FTDI recovery HOT 4
- Error detecting chip type on CSR8630
- Can I use bluesuite to write the Bose firmware into it?
- HC-05 to RN42 - different modules conclusion
- One question about bluetooth interface
- CSR64215 unable to enter programming mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csr-spi-ftdi.