I'm a little confused about the SPI settings I should be using.
I noticed that my Arduino occasionally drops bytes that I'm sending when using the SPI Friend. When investigating this problem, I noticed that the product page (https://www.adafruit.com/product/2633) states the SPI transport can be set up to 4MHz, but the adafruit nrf51 github page describing the protocol (https://github.com/adafruit/Adafruit_Bl ... er/SDEP.md) states that the clock should be <= 2MHz. Meanwhile, looking at the Adafruit_BluefruitLE_SPI library code, there's a line at the beginning that explicitly sets the clock to 4000000 Hz.
Am I misunderstanding the library documentation? Should I be setting my clock divider on the Arudino to be 2 Mhz to avoid data loss?
Bluefruit LE SPI Friend Clock Settings
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- sportscliche
- Posts: 17
- Joined: Sat Mar 10, 2018 1:43 am
Re: Bluefruit LE SPI Friend Clock Settings
I also packet loss with a different microcontroller (MSP430). I tried a variety of SPI clock frequencies and was unable to solve the problem.
- sportscliche
- Posts: 17
- Joined: Sat Mar 10, 2018 1:43 am
Re: Bluefruit LE SPI Friend Clock Settings
I see that this thread is 18+ months old, but I can add some information. Straying off the Arduino path with the SPI Friend can generate significant challenges. There are several issues including ignoring the IRQ pin and implementing suitable delays when talking to the BLE module. If anyone is interested, I have written some bare metal code that enables two-way communication between an MSP430 and the Bluefruit Connect app using the Bluefruit LE SPI Friend. It is written for an MSP430FR5969 Launchpad, but reasonable familiarity with the MSP430 will allow you to adapt it for your specific hardware. Repo is here:
https://github.com/microphonon/MSP430-A ... SPI-Friend
https://github.com/microphonon/MSP430-A ... SPI-Friend
Please be positive and constructive with your questions and comments.