Updating adv data before each adv

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Jon_ODonnell
Offline
Last seen:4 months 1 week ago
加入:2020-08-08 17:23
Updating adv data before each adv

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

Device:
LC_Dialog
Offline
Last seen:4 days 11 hours ago
工作人员
加入:2016-09-19 23:20
Hi 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