Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

LE SPI Friend issues
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LE SPI Friend issues

by gebov on Mon Apr 05, 2021 4:41 am

Hello,

I am trying to use the LE SPI friend. My firmware version is 0.6.5. I tried updating the firmware version because I am struggling with connection issues and thought that might help but every time I try to update, it gets to 43% and fails with the error message DFU Service disconnected. Is that a problem with the Android APP or the module ?

As for the connectivity issues I am hooking it up to a S32K144 dev board from NXP with FLEXIO. However I have failed so far to achieve anything using the samples provided by NXP. I will try with a different MCU as well to confirm if everything is OK with the communication. For now the board seems to answer to the AT commands from the Android APP.

gebov
 
Posts: 2
Joined: Mon Apr 05, 2021 4:37 am

Re: LE SPI Friend issues

by adafruit_support_carter on Tue Apr 06, 2021 3:22 pm

Do you have a board available that would allow you to use the BLE SPI Friend per the guide?
https://learn.adafruit.com/introducing- ... i-breakout

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Re: LE SPI Friend issues

by gebov on Mon Apr 12, 2021 7:11 am

No sadly, I conducted numerous tests following the guide here https://learn.adafruit.com/introducing- ... -transport
And inspecting the source code for the Arduino module. I am receiving some strange bytes when I send the following message: 0x10 0x01 0x0A 0x01 0xFF which are never consistent - 0x80, 0x7F 0xFF, 0xFE. Some of these are error codes but I cannot see what I am doing wrong. Here is my code. I have based it on the arduiono code in github. I've left comments for reference

PTB->PSOR |= 1<<17; // bring CS high
for(i = 0; i < 4000; i++) // wait a bit
{

}

PTB->PCOR |= 1<<17; // bring CS low

while(1)
{
LPSPI1_transmit_16bits(buffer[0]); // transmit 0x10
LPSPI1_16bits_read = LPSPI1_receive_16bits(); // wait for the reply
if (LPSPI1_16bits_read != 0xFE)
break;
}


for(i = 1; i < 4; i++)
{
LPSPI1_transmit_16bits(buffer[i]); // transmit the rest of the bytes
}

PTB->PSOR |= 1<<17; // set CS high again

I cannot neither receive nor sent any proper response in the Android App. I am starting to think that this board is defective.

gebov
 
Posts: 2
Joined: Mon Apr 05, 2021 4:37 am

Re: LE SPI Friend issues

by adafruit_support_carter on Mon Apr 12, 2021 10:37 am

You would need to find some way to verify the behavior by using it per the guide. It may have something to do with FLEXIO.

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.