cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-M0A Issue with Bringing up the BlueNRG and BlueNRG-MS devices (AN4494)

Leo_Houston
Associate II

I'm trying to follow the test procedure for BlueNRG-MS (SPI) indicated in the Bringing up the BlueNRG and BlueNRG-MS devices - Application note (AN4494).

I am using custom board (Microchip dsPIC33F) to talk to BlueNR-M0A.

SPI Setting: 625K baud rate, SPII mode 0.

Following the Test procedure on Page 5, I got correct packet from BlueNRG-M0A:

Step 4: I received [02,7F,00,00,00]

Step 6: I received [02,7F,00,06,00]

However, on Step 7, I always received [FF, FF, FF, FF, FF, FF].  Note: I sent CTRL byte 0x0B, followed by 4 dummy byte 0x00. 

I have checked codes again and again, have no idea where to look at.

Please help with this issue, and point out a direction.

Thanks.

Leo

10 REPLIES 10

Hi Barry,

 

I did quick test to verify the issue was caused by CS line staying LOW too short.

1. I changed SPI baud rate to 312.5K which I will use on final firmware, Tclk = 3.2us.

2. Set Delay_us(10) between CS Line HIGH and LOW: last step always returned 0x00

3. Set Delay_us(30) between CS Line HIGH and LOW: on last step, most returned right [04, FF, 03, 01, 00, 01], a few response incorrect. Note: I put a while loop on the test, so it will repeat from Step 1 to 7.

4. Set Delay_us(45) between CS Line HIGH and LOW: all returned right.

Note: Delay_us() function has tolerance on delay microseconds. Delay_us(45) will make sure the delay > 32us.

 

I think that's it. I will move forward on my project.

 

Thanks,

Leo