If the CFG_WDOG is enabled, stopping the advertising of a peripheral (based on the proximity reporter), after about 4 seconds there is a watchdog reset. If I #undef the CFG_WDOG, I can turn off and back on again the advertising without a problem.
Why is advertising crucial to keep the watchdog updated?

Hi,
Advertisement shouldn't have any impact on the WDT, and I'll try to help you with this issue. Can you let me know when and how you stop and start the advertisements? Is it timer based, some sort of GPIO activity?
I'm starting and stopping the advertisement by sending a message to the APP_TASK. The message is sent to the APP_TASK from my profile task triggered by a UART message (I have overridden the regular UART communication with our own proprietary protocol).
Dear Dialog support,
I experience such a behaviour with the following configuration:
I want to change advertising data (update battery value and manage a manufacturer specific data). Because there is no UpdateAdvertisingData() function i do as suggested in
http://support.dialog-semiconductor.com/stopping-and-starting-advertisem...:
When battery value has to be updated or when I want to update my manufacturer specific data, I Post a message to stop advertisment and when app_adv_undirect_complete() callback is called, I post a message to start advertisment. This scenario works well.
int app_adv_done_handler(
ke_msg_id_t const msgid,
ke_task_id_t const dest_id,
ke_task_id_t const src_id
)
{
app_adv_stop();
return (KE_MSG_CONSUMED);
}
int app_adv_restart_handler(
ke_msg_id_t const msgid,
ke_task_id_t const dest_id,
ke_task_id_t const src_id
)
{
app_adv_start();
return (KE_MSG_CONSUMED);
}
oid app_adv_undirect_complete(uint8_t status)
{
if(ke_state_get(TASK_APP) == APP_CONNECTABLE)
{
ke_msg_send_basic(APP_ADV_RESTART,TASK_APP,TASK_APP);
}
return;
}
(with corresponding handler tasks defines of course)
But for debug purpose, I wanted to avoid restarting advertisment so I Commented the "app_adv_start();" and I always have a watchdog reset after 2 seconds.
I assume the watchdog counter is reseted according to the advertisment timer and when we stop the advertisment timer, we should re-configure a timer to reset the watchdog counter ?
Would you have some suggestions ?
best regards,
Olivier
... I work with the SDK 3.0.6 !
Hi Dialog team,
有什么你pdate on this topic?
I've also got this same issue based on BEACON reference design 'DA14580_BEACON_3.40.6'.
As my understanding from the source code, I don't see the possibility of feeding watchdog during ext. sleep, will this be the reason of this issue?
Hi hardy.chen,
Can you give me the configuration modifications that you ve made on the beacon, i ve run a fresh beacon project with the watchdog enabled on a beacon reference design without the NMI occuring and the HW_CONFIG_BEACON_REF definition selected. Another thing i would recommend is to use a newer SDK if you plan to build a beacon and use the beacon reference design as an example, since the ref des was build with a much older SDK than the current one, lots of bug fixes and improvements have occured over time.
Thanks MT_dialog
Hi Dialog team,
I finally found the cause of my WDT reset, it was the wrong usage of accessing SPI flash without waking it up.
The API 'app_flash_poweroff_timer_handler' will cause system to stop when the SPI flash is already in power saving state.
Hi hardy.chen,
Glad you find it and thanks for sharing.
Thanks MT_dialog