cancel
Showing results for 
Search instead for 
Did you mean: 

Integrated new Bluetooth BLE code, into an existing old project based on IAR5.4 ?

Micha Valach
Associate III
Posted on December 29, 2016 at 07:30

Hello,

I'm newbie in the Bluetooth business, I purchased theSTM32L476RG Nucleo+Nucleo BLE expensionboard (X-Nucleo-IDB05A1withSPBTLE-RF module) .

Then I installed the

IAR 7.5 workbench

,copy the

X-Cube-BLE1directories including the samples code - and everything

works like a charm !!!

As we would like to enhance ourexisting old project (based onSTM32F101CBT6andIAR5.4 workbench) with new Bluetooth BLE capabilities,

Please advise,if the samples code from the new Bluetooth BLE project (X-Cube-BLE1) can be integrated into existing old project which use the following environment, based on

STM32F101CBT6

and

IAR5.4 workbench

)?

If NO, please advise,how can we overcome this obstacle.

Thanks In Advance,

Micha Valach

#st-bluetooth

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on October 06, 2017 at 12:10

Hi

Vilei.Antonio

Sorry I havae to come back again.....

There were some changes on my board and BT_IRQ is defined as

PF6 (previously it was PE1). So I changed the following

#define BNRG_SPI_EXTI_IRQn EXTI9_5_IRQn

#define BNRG_SPI_EXTI_IRQHandler EXTI9_5_IRQHandler

But now from android device it connects but after a while it disconnect saying error : 'Peripheral Disconnected!'

I think the SPI comuncation has no problem. But somehow it is getting disconected.

Posted on October 06, 2017 at 16:26

Please try enabling the debugging option for SPI by uncommenting the ♯ define PRINT_CSV_FORMAT line in 'Middlewares\ST\STM32_BlueNRG\SimpleBlueNRG_HCI\includes\debug.h' file. After you enable this option, you will see the log of the low level SPI commands and events being exchanged between your STM32 and the BlueNRG-MS chip. For example, if you are using IAR EWARM, you can see the output messages by using the View -> Terminal I/O option from the menu while you're code is being executed by the tool via ST-Link. Assuming that the SPI communication is working properly, from that log it will be easier to understand what's going on.