2022-07-21 04:29 AM
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
2022-07-22 01:47 AM
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
2022-07-22 04:33 AM
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
2022-07-22 06:49 AM
Hi Avan,
the BlueNRG device works right out of the box.
You could anyway update it to latest version following the steps below:
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
2022-07-22 07:38 AM
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?
2022-07-22 07:56 AM
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
2022-07-22 08:24 AM
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
2022-07-22 08:57 AM
I found it: in cubemx the default spi data size was set to 4 bits instead of 8 bits
2022-07-22 09:08 AM
Good!
This information is indeed reported in the Getting Started Guide
and in the webinar as well
Enjoy your STM32 application!
BR
Silvio