cancel
Showing results for 
Search instead for 
Did you mean: 

x-nucleo-idb05a2 X-CUBE-BLE1 hangs in interrupt handler after hard reset

Avan .12
Associate III

I connected the x-nucleo-idb05a2 to a nucleo L452RE-P board and configured the project using X-CUBE-BLE1 and BLE sample application.

I got it all working (IRQ, RESET, MISO, MOSI) after making sure that there was a required hard reset to start the BLUENRG chip, however the ISR calls eventually :

HCI_TL_SPI_Receive() to fetch initial data by sending {0x0b, 0x00, 0x00, 0x00, 0x00} to initiate a read.

The returned read buffer "header_slave" contains {0x00, 0x02, 0x07, 0x0F, 0x00} which gets rejected because the first byte must 0x02.

This means that the data caused by the first interrupt after a hard reset won't be retrieved which means that the hci_tl_lowlevel_isr() will keep looping forever because the GPIO pin stays high (IsDataAvailable())

What could be the reason why the data from the BLUENRG returns an unexpected value?

Thanks in advance

8 REPLIES 8
Silvio
ST Employee

Hello,

which application are you testing?

Have you started configuring for your board, through the STM32CubeMX tool, one of the BLE1 sample applications?

BR

Silvio

Hi Silvo,

which application are you testing? Answer : SensorDemoBLESensor

Have you started configuring for your board, through the STM32CubeMX tool, one of the BLE1 sample applications? Answer : yes

Could it be that I need to intinialize the Bluenrg first using IFR first before I can use the chip or will it always work right out the box?

I am using STM32CubeMX version 6.6.0, STM32CubeIDe 1.9.0 and X-Cube-BLE1 6.2.3

Thanks

Silvio
ST Employee

Hi Avan,

the BlueNRG device works right out of the box.

You could anyway update it to latest version following the steps below:

  • generate a Virtual_COM_Port project for your board with STM32CubeMX (or use the Virtual_COM_Port binary file for the NUCLEO-L476RG, if you have this board, included in the X-CUBE-BLE1 package)
  • launch the BlueNRG GUI
  • Settings --> baud rate 115200
  • Settings --> FW Stack version --> BlueNRG-MS Fw v7.x
  • Open the COM Port connection
  • Tools --> Stack Updater --> Browse --> bluenrg_7_3a_Mode_2-32MHz-XO32K_4M.img
  • Update

At the end of the updating process you should see at the top-right of BlueNRG GUI the following information: BlueNRG-MS FW v7.3a.

Otherwise, if you have the NUCLEO-L476RG, you could directly use the SensorDemo_BLESensor-App binary file in the X-CUBE-BLE1 to verify that your BlueNRG device is working.

BR

Silvio

To make an update requires a functional board which is not the case.

What is the reason why i get the invalid resonse that doesn't start with the required 0x02?

Silvio
ST Employee

Have you followed all steps in the Getting Started Guide in the X-CUBE-BLE1 pack (folder Documentation) to configure the SensorDemoBLESensor application for your board?

Please, use the same Guide to easily generate the Virtual_COM_Port sample application for your board.

BR

Silvio

Avan .12
Associate III

I followed ​https://youtu.be/jGljm6nxW9s

Using spi2 pb10 clk pc2 miso pc3 mosi pa0 irq pa8 reset pc13 blue push pb13 led pa2/pa3 uart2​ on a nucleo l452 board

Avan .12
Associate III

I found it: in cubemx the default spi data size was set to 4 bits instead of 8 bits​

Silvio
ST Employee

Good!

This information is indeed reported in the Getting Started Guide

0693W00000QLvtnQAD.png 

and in the webinar as well

0693W00000QLvvAQAT.png 

Enjoy your STM32 application!

BR

Silvio