cancel
Showing results for 
Search instead for 
Did you mean: 

getting started with x-nucleo_BNRG2A1 with nucleo-l552ZE-Q

Ines Barhoumi
Associate

Hi all,

I am using X-NUCLEO-BNRG2A1 with NUCLEO-L552ZE-Q board. I have created a project with STM32CubeMx using X-CUBE-BLE-2 SensorDemoBLESensor Application,

mapping the pins of the expansion board to my nucleo board as :

PA5: SPI1_SCK ==>I switch the J14 jumper of the -nucleo_bnrg2a1 to n1-2 position .

PA6: SPI1_MISO

PA7: SPI1_MOSI

PF13: RST_BLE (as gpio_output )

PA3: IRQ( as external interrupt Mode with rising edge trigger detection )

PA2: CS( as output )

PC13: USER_Btn[B1] (external interrupt Mode with rising edge trigger detection)

PC7: led_green (output Push PULL)

PA9: led red (output Push PULL)

PB7: LD2[Blue] (output Push PULL)

PD8: USART3_TX

PD9:USART3_RX

I also active the EXTI line3 interrupt in NVIC configuration .Then I set the sensorDemoBLESensor and I select basic for BlueNRG-2 / HCI_TL and user board for BlueNRG-2 / HCI_TL_INTERFACE ,when I configure the select component in the software package for ble .

After that, I set the suitable configuration for wireless blueNRG_2 and Device BLE2 Applications., for spi1 and USART3 configuration .

Note: I choose the MCU STM32L562ZETx LQFP144 in stm32cubeMx.

The project successfully built and upload into the MCU, however the application does nothing, it just stuck in the function aci_hal_read_config_data (config_data_stored_static_random_address,&bdaddr_len_out, bdaddr);

it returns BLE_STATUS_TIMEOUT. on the function hci-send _req().

Any help, please!

thank you in advance .

6 REPLIES 6
BLin.3
Associate II

@Ines Barhoumi​ Any luck with this? I am facing the same problem.

Ines Barhoumi
Associate

Hello,

No unfortunately I still have the same problem. In fact, when I continue with debug mode, the execution stops at this line: if (rx_bytes > size) (line240 hci_tl_interface.c) of the function HCI_TL_SPI_Send (): Rx_byte=0 and size=4

And the result value is (-2) (insufficient buffer), so BlueNRG is never ready to activate the interruption. Did you have the same thing ?

WSart.1
Associate II

I'm also facing the same problem. It's very frustrating. I'm getting HWver 8 and FWver 8639, but after that it just hangs on the same part.

WSart.1
Associate II

I don't understand HCI_TL_SPI_Send() function it sends header_master and header_slave and expects some bytes. Where is this written? I can't find any documentation regarding headers on ble. Like, it sends {0x0a, 0x00, 0x00, 0x00, 0x00} to bluenrg, but it's replying 0x00*5. Where is this 0x0a part on the protocol written so I can understand what's happening?

WSart.1
Associate II

Do you want something VERY strange that made it to work for me (once, than you have to repeat procedure)?

If you remove J14 and RESET your nucleo, or power it with the jumper removed. Wait like 5 seconds, and you add the jumper back, it works fine after that (although the HWver is 18 now, not sure why):

BlueNRG-2 SensorDemo_BLESensor-App Application
HWver 18
    FWver 8723
aci_hal_set_tx_power_level() --> SUCCESS
aci_gatt_init() --> SUCCESS
aci_gap_init() --> SUCCESS
aci_gatt_update_char_value() --> SUCCESS
aci_gap_set_authentication_requirement() --> SUCCESS
BLE Stack Initialized with SUCCESS
BlueNRG2 HW service added successfully.
BlueNRG2 SW service added successfully.
BLE Stack Initialized & Device Configured
aci_blue_initialized_event Reason_Code=5
aci_blue_initialized_event Reason_Code=1
Set General Discoverable Mode.
aci_gap_set_discoverable() --> SUCCESS

WSart.1
Associate II

I believe this is bug and I'm unsuccessful figuring it out. I opened a support case with ST number 00125921.