⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
index219
Offline
Last seen:1 year 5 months ago
加入:2016-05-23 07:00
About RCX and watch dog

Hi Dialog,
sometimes we found the device down and the watch dog didn't work。

perphaps the device does not wake up anymore is because the 32.768KHz crystal oscillator (XTAL32K) stops functioning .

According to" AN-B-056 DA14681 Recovery from System Level ESD Events .pdf" , alternative solution is: using the internal RCX oscillator.
1 . If I use RCX as lp_tick , what should I need to notice and will it affect other functions such as ble advertise? And how terrible it will have a bad effect on other functions?

2. when the device work on pm_mode_extended_sleep , dose the watch dog keep working ? if it still work, what's the clock source (is lp_tick ? ) . and its count period still 10.24 ms? and also will trigger a NMI_handler to excute watchdog isr( )?

3.why suspend watch dog in some tasks as below:

/* Notify watch dog on each loop since there's no other trigger for this. */
sys_watchdog_notify(wdog_id);

/* Suspend monitoring while task is blocked on OS_TASK_NOTIFY_WAIT(). */
sys_watchdog_suspend(wdog_id);

/*
* Wait on any of the event group bits, then clear them all.
*/
xResult = OS_TASK_NOTIFY_WAIT(0x0, OS_TASK_NOTIFY_ALL_BITS, &ulNotifiedValue,
OS_TASK_NOTIFY_FOREVER);
/* Guaranteed to succeed since we're waiting forever for the notification */
OS_ASSERT(xResult == OS_OK);

/* Resume watch dog monitoring. */
sys_watchdog_notify_and_resume(wdog_id);

Thanks!

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi index219,

Hi index219,

1. There is no side-effect in advertising when using the RCX instead of the XTAL32, the only effect that the RCX will have is a slightly increase in the power consumption and not in all cases and that its not that accurate as the XTAL. It is qualified as a BLE low power clock but it wont do for applications like RTC etc.

2. No, when the device is in sleep mode the watchdog freezes and restarts when the device wakes up.

3.有关监管机构API在任务,这是a system used in order to monitor that tasks are executing properly, the system uses the h/w watchdog over a top layer of the watchdog hardware and each task should register it self for that service and aquire a specific watchdog id in order to be monitored. The fact that the watchdog is suspended right before OS_TASK_NOTIFY_WAIT() is because if you didn't suspend the watchdog for that specific id the watchdog would keep on counting while the task is blocked waiting for notification, so since you are aware that the task is not going to run soon since it waits for a notification from another task therefore the sys_watchdog_notify() wont get called you will have to suspend the watchdog in order to avoid the reset.

Thanks MT_dialog

guxiang
Offline
Last seen:4 days 15 hours ago
加入:2017-05-12 04:18
hi, MT_dialog

hi, MT_dialog
When the device enter sleep mode, the watchdog freezes by software with SDK or hardware automatically? and the same also to restart watchdog when the device wakes up?

Another question , what's the difference between using "pm_set_wakeup_mode(true);" and "pm_set_wakeup_mode(false);" ; And what should pay attention to?
void pm_set_wakeup_mode(bool wait_for_xtal16m)
{
...

pm_wakeup_mode_is_XTAL16 = wait_for_xtal16m;
...
}

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi guxiang,

Hi guxiang,

When the device goes to sleep the watchdog shuts down by the hardware, its powered down when the device is in sleep mode and it is powered up as soon as the hardware wakes up.

Regarding the pm_set_wakeup_mode(), if set to the true the 68x is going to wait for the XTAL16 to settle and then start running the fw, if false the device is going to resume with the RC16 without waiting the XTAL16 to settle and as soon as it does then it will switch to the XTAL16.

Thanks MT_dialog

guxiang
Offline
Last seen:4 days 15 hours ago
加入:2017-05-12 04:18
hi, MT_dialog

hi, MT_dialog
if I use pm_set_wakeup_mode(false) , what should I notice or will it may bring some unstable factors to the system?

In addition,how can I get more detailed descprition about the watchdog or any other function? I think the DA14681 data sheet is too simple that can't help me smoothly develop it. Is there a file like " user manual" that can tell more details for its function.

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi guxiang,

Hi guxiang,

There are no particular precuations for you to take, as mentioned this is just to resume your fw with or without the XTAL16, for example if you would like to have an SPI transaction there is no reason for waiting the XTAL16, but if you have a UART transaction then you should wait for the XTAL to settle. The BLE will be available as soon as the XTAL16 settles and this is taken cared from the SDK.

Regarding the watchdog, there are no additional information regarding the watchdog, all info are located in the datasheet.

Thanks MT_dialog