Today, I was reminded that I can review and install updates for Simplicity Studio 5. I performed all product updates, the 32-bit MCU SDK to version 126.96.36.199 and the Bluetooth SDK - to version 188.8.131.52. I see that Gecko Platform - 3.1.2 is also there.
As a side effect of this update the sl_bt_system_set_soft_timer function started returning an sl_status_t value of 0x0403, i.e. 'Unspecified error'?!
In my BGM13S application project I use four such timers (0..3). Starting of the soft_timer 0 completes successfully but starting of the next soft_timer 1 returns the above error status. With the previous SDKs, the project code was running as expected.
What could the reason for this be? Am I missing something?
I tried to reproduce your issue with a BGM13P using the new SDK but I couldn't. I'm attaching the project that I tested, the soft timers are working properly as it can be seen on the picture below.
Could you please try this application?
Did you make a new project with the new SDK?
Your code is running correctly! I tested it on the BRD4503C we have, not on the actual target but it should run there as well. I can confirm that tomorrow.
In my case, I did not create a new project, I updated the SDKs and forced a regeneration of the auto code. When some time ago I updated to 3.1.1, I did the same thing and everything went fine. Was this wrong? Should I create a new project and move all my user files to it?
Today, I created a new project and added my application code to it. I was actually mistaken - it is the first attempt to start any of the timers that returns 0x0403. Trying to find what is going on, I did set/remove timers in various sequences and in all cases the setting a soft timer returns 0x0403, while removing it (time=0) returns 0.
I tried the same sequences in Zupi's code and the timers always worked as expected!
Could it be any memory (the app is quite large) or clock issue?
Is there any way to roll back to platform v3.1.1? It does not make much sense but I am also thinking to remove and reinstall a clean version of Simplicity Studio. Any ideas?
In my application I use the "Bluetooth on-demand start" feature. I initialize the soft timers after the sl_bt_evt_system_boot_id event has been received to be sure that all stack resources are available. Before the SDK update, the timers used to work as expected. After the SDK update (at least this is when I noticed the problem), the sl_bt_system_set_soft_timer function seems to always return an sl_status_t value of 0x0403.
If I uninstall the "Bluetooth on-demand start" feature, i.e. the BLE stack is started automatically, the soft_timers work as expected!
I also tried in your code - I installed the "Bluetooth on-demand start" feature and I added a call to the sl_bt_system_start_bluetooth() function in the app_init() function. As a result, the soft timers could not be set anymore.
Am I missing something?
I have a workaround now but as I am targeting a very low power consumption, I would like to have the possibility to stop even the stack in some situations, if it makes sense.
Thank you for the detailed description, I could reproduce the same issue by adding the Bluetooth on-demand start feature to the project. I'm opening an internal ticket with this issue to the BLE development team. I will keep you updated!