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:
- 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 X-NUCLEO-IDB05A1 with STM32F4-DISCOVERY )
- 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.
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?