cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-BLE1 drivers usage in new project

Hans Meier
Associate II

Posted on June 02, 2018 at 17:29

Hello,

I am working with the X-NUCLEO-IDB05A1 BLE expansion board on the NUCLEO-L476RG board and I want to send sampled ADC values via Bluetooth LE. 

Software I use: STM32CubeMX V4.25.0, SystemWorkbench for STM32.

I successfully imported the sample project 'SensorDemo' into SW4STM32 and flashed it on the board, no problem.

But now I want to create my own project, which brings me to my limits.

My workflow is like this:

  1. initialize the used hardware in CubeMX. For example, I initialize my ADC and also the SPI interface, which is needed for communication with the BLE expansion board. For the SPI, I reverse engineered the setup used in the sample project and entered it in CubeMX. (similar to 
  2. https://community.st.com/s/question/0D50X00009XkWqn/xnucleoidb05a1-with-stm32f4discovery
  3.  )
  4. now I copy the stm32_bluenrg_ble.c/.h files from Drivers/BSP/X-NUCLEO... into my existing project in SW4STM32 and made some adjustments. For instance, I delete the SPI_Init as this was already done in CubeMX.
  5.  
  6. Middlewares are also copied into the workspace, as they contain HCI functions and so on.

Now it gets complicated. I follow the guide in UM1873 on page 16, but I run into tons of errors. By comparing with the SensorDemo example it is nearly impossible to keep track of the necessary files because each file includes many other files, some even from the SensorDemo directory. This spans out a huge net of includes and so on.

Which files/folders are used to create my own projects? It is really confusing to create own projects with the software library, as this question was asked several times in this forum. I think this cannot be so hard, as simple things like importing the sample project into an IDE or connecting the shield to the Nucleo board were explained down to the smallest detail.

As you might recognize, I am new to the SMT32. As I could not find any UMs/Blogs/Tutorials on how to work with the BLE Expansion Software, I ask here for help. Maybe my entire workflow is incorrect?

10 REPLIES 10

Hi Antonio,

Thanks a lot for sharing the app note.

I've followed the step for SensorDemo application on Nucleo-F401RETx

6.2 Use of Expansion Software with sample applications

and all it's ok till the Advanced Settings tab config (fig 18) becouse in my CubeMX USART2 doesn't appear (see attached picture).

Do you have an idea why I don't see USART2 in my Advanced Setting tab?

Thank you very much.

I'using CubeMX 5.1.0 and X-CUBE-BLE1.4.4.0

0690X00000A9bKaQAJ.png