2020-05-06 03:07 AM
Hi, I have been following the STM32WB workshop, however the material seems to not fit to the current FW anymore.
I need to read a sensor that is connected via I2C and send the results via BLE.
I can get the sensor readings and output them via UART but as soon as APPE_Init() is called, the output to UART does not work anymore. I assume it is a problem due to scheduling, however the schedule.h file referenced in the workshop videos seem to not exist anymore, so I am stuck here.
Does anyone have a working current example of reading sensor values in parallel to running BLE services, or an updated info on how to use scheduling?
Solved! Go to Solution.
2020-05-06 05:50 AM
Then you could use the STM32Cube_FW_WB_V1.6.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_HealthThermometer project that contains an example of the reading of a temperature sensor , which is then sent to the central base via BLE communication.
2020-05-06 05:46 AM
Did you compile in debug mode?
Then you may have a conflict with the call to APPD_Init() function, which is implemented in the app_debug.c file.
This function reset some UART pins that may conflict with the ones you are using. I would recommend you to check this before going any further.
2020-05-06 05:50 AM
Then you could use the STM32Cube_FW_WB_V1.6.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_HealthThermometer project that contains an example of the reading of a temperature sensor , which is then sent to the central base via BLE communication.
2020-05-06 11:41 AM
Thank you Remi,
I had a look at the Project, however I could not find how the I2C connection is initialized for the sensor in hts_app.c, or how to initialize the sensor in main.c but use it in the hts_app.c part... I am a bit lost here.
2020-05-07 05:49 AM
OK, I tried it initializing the sensor in main.c and reading the sensor values in hts.c and it works.
Thanks