I am building a DA14531 GAPM_ADV_NON_CONN project based on DA14531-DA14585-586_Service_Data_Beacon with ARCH_EXT_SLEEP_ON and would like to update the advertising data before each transmit. Because I am sleeping between transmits, the user_app_main_loop_callbacks.app_resume_from_sleep is called each time and works great as long as I do not take more than 1.55ms. If I stay in the callback longer than 1.55ms, the assert at rwble.c line 277 is tripped.
Is it possible to override this limit? Does this limit apply to any callback (timer, etc.)?
I need to make multiple ADC measurements in addition to other calculations which will probably require at least 10ms and maybe as much as 100ms if I have to poll other hardware.
Is is possible to have more detailed control over the advertising flow. For instance, what I would like to do is
1. Perform initial setup
2. Make my measurements and calculations
3. Send out an advertisement or skip if redundant
4. Calculate how long until next update check is required
5. Set timer
6. Go to sleep
7. Wake up
8. Repeat from step 2
Thanks,
Jon
Hi Jon,
Please take a look at the app_easy_gap_update_adv_data() API for updating the Advertising data.
If you need longer time period for doing additional measurements and calculations, you might have to use one of the other callbacks availble. Please refer to the callback timing constraings in our user guides. The wakeup and sleep process is tightly coupled and the timing can't be changed. However, the application is given control in one of the other callbacks for any such time taking processes.
http://lpccs-docs.dialog-semiconductor.com/UM-B-119_DA14585-DA14531_SW_Platform_Reference/User_guides/User_guides.html?highlight=update#system-event-state-callbacks
Please check it out and let me know for any follow-up questions..
Best,
LC_Dialog