Skip to main content
asafbit
Associate II
December 20, 2017
Question

BlueNRG-MS IRQ

  • December 20, 2017
  • 2 replies
  • 2619 views
Posted on December 20, 2017 at 10:37

hi.

im running a provided example of HID periphProfiles.

using STEVAL-IDB005V1D on NXP platform (FRDM-KL43)

SPI lines are OK, i can read header from the blueNRG-MS.

the thing is IRQ always high. so that at the moment i configure the IRQ at NXP,

interrupt occurs and making NXP always tries to receive data from BlueNRG.

i've tested the original example earlier on nucleo platform, and it was working fine, but haven't checked the specific state of the IRQ.

Is it suppose to work this way? have i broken something in the porting process?

#bluenrg-ms #irq-bluenrg-ms

Note: this post was migrated and contained many threaded conversations, some content may be missing.
This topic has been closed for replies.

2 replies

asafbit
asafbitAuthor
Associate II
December 20, 2017
Posted on December 20, 2017 at 15:07

RST should be applied until the spi is ready to read.

Antonio Vilei
ST Employee
December 21, 2017
Posted on December 21, 2017 at 10:39

For more information, please refer to the

http://www.st.com/content/ccc/resource/technical/document/application_note/46/0a/77/7b/04/f5/4c/b7/DM00116738.pdf/files/DM00116738.pdf/jcr:content/translations/en.DM00116738.pdf

 document, section 3 about the SPI interface.

Also take a look at Figure 3, which shows more details.

Aleksey Zhurkin
Visitor II
March 27, 2018
Posted on March 27, 2018 at 15:42

Hello, Antonio!

Is it right?

BlueNRG_Stack_Initialization();

while (GPIO_PIN_RESET == HAL_GPIO_ReadPin(BLE_SPI_IRQ_GPIO_Port, BLE_SPI_IRQ_Pin));

uint8_t d[6];

DWT_DelayMSC(1);

// First reply [0x02, 0x7F, 0x00, 0x00, 0x00]

BlueNRG_SPI_Read_All(NULL, 0);

DWT_DelayMSC(10);

// Second reply [0x02, 0x7F, 0x00, 0x06, 0x00]

// [04, FF, 03, 01, 00, 01]

BlueNRG_SPI_Read_All(d, 6);

if IRQ is disabled, there is  0x3 0x00 0x00 0x00 0x00 in the slave header.

Antonio Vilei
ST Employee
March 28, 2018
Posted on March 28, 2018 at 12:21

Hi Aleksey,

What software are you currently using to test the device?

As a reference, you can use the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-ble1.html

 package, based on STM32Cube HAL.

There's also a C++ implementation available for ARM mbed, where it may be a bit easier to see whats steps are necessary to interface with the chip:

https://os.mbed.com/components/X-NUCLEO-IDB05A1-Bluetooth-Low-Energy/

 

Maybe I have misunderstood you question, but please note that the IRQ pin of the BlueNRG-MS chip will be set whenever there are data available.

If you're using the same implementation of the

BlueNRG_SPI_Read_All()

function included in X-CUBE-BLE1, there is no need to explicitly add a delay before calling it, as it already takes care of checking the slave header to make sure that the device is ready.

Best regards,

Antonio