STM32WB BLE - Update Char from main.c
Hello,
I'm pretty new in working with STM32WB-Chips and trying to implement a BLE-Application.
I am using a STM32WB55 Chip and for initial steps I created a project using Cube IDE and a Custom Template according to ST's "Getting Started" - Series on YouTube (https://www.youtube.com/watch?v=CKYWy7LKL68&list=PLnMKNibPkDnG9JRe2fbOOpVpWY7E4WbJ-&index=16).
This works in general and I can read and write characteristics using the BLE Toolbox App on my smartphone.
Now I want to update a characteristic value from my main-function, e.g. to distribute new sensor data via BLE.
I added the needed header files in my main and try to call the functions
Custom_STM_App_Update_Char() or aci_gatt_update_char_value().The compiler gives me no warnings or errors, but calling this functions in the main loop leads to a HardFault during runtime.
Stepping into showed that the HardFault occurs after calling the static void SendCmd()-function probably.
Calling this functions from custom_stm.c works fine, e.g. if I am calling it in an Event_Handler after a read access there. So probably some parameters in my main.c are missing.
Problably I am just doing something stupidly wrong and don't get it. So how can i easilly update a characteristic value from a main function if new data is available?
Many thanks in advance :)
