Ble_multi_link watchdog timeout when using 32kHz Oscillator

⚠️
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.
5 posts / 0 new
Last post
jpselc
Offline
Last seen:2 years 7 months ago
加入:2018-02-15 17:10
Ble_multi_link watchdog timeout when using 32kHz Oscillator

最新的SDK (1.0.12.1078)

Hi,

所以我有this demo (original code) working fine on the Pro DK, but when I try to run it on my own PCB, I keep getting Watchdog timer interrupt (NMI) after a few seconds, when in debug mode.
I found one key difference which is that my own PCB does not have a 32 kHz crystal, so I am using the 32 kHz oscillator by setting
#define dg_configUSE_LP_CLK LP_CLK_RCX
in custom_config_qspi.h
I then tried this build on the Pro DK, and it also shows this behaviour (watchdog timeout).

The problem seems to be related to going into sleep mode after the initial advertising. Is there some reason that the watchdog would timeout when the oscillator is used as opposed to the XTAL?

Thanks,
JP

Device:
PM_Dialog
Offline
Last seen:2 days 12 hours ago
工作人员
加入:2018-02-08 11:03
Hi jpselc,

Hi jpselc,

In case that the PCB does not have a XTAL 32 KHz, it is highly recommended to use one of the following three options:

  1. Use RCX, as you have already mentioned, typical value at 10.5KHz (internal oscillator)

#define dg_configUSE_LP_CLK LP_CLK_RCX

  1. Use XTAL32K, with an external 32KHx oscillator

#define dg_configUSE_LP_CLK LP_CLK_32768

Use XTAL32K with an alternative option. You are able to supple the P2_0 (XTAL32KP) pad with an external digital clock. Please, check theTable 2: Pin description of the DA14860user manual. Also, you should define:

#define dg_configUSE_LP_CLK LP_CLK_32000

Possible reason why you get an NMI, is why the WDOG is enabled but never used. The default WDOG counter value 255 (max value). Each counter value is equals to 10ms, thus after 255 ticks, ~2.6 seconds will have been elapsed and an NMI will be asserted. Please make sure that you don’t have enabled the WDOG. Also, you should reload it after its expiration using our APIs. For more information about the WDOG, I suggest you to read the9.6 Watchdog Servicesection of theDA1468x Software Platform Reference (UM-B-044)document from our support portal

Thanks, PM_Dialog

jpselc
Offline
Last seen:2 years 7 months ago
加入:2018-02-15 17:10
Thanks for your response.

Thanks for your response. Apologies for this delayed reply.

As I mentioned, I am using your Option 1 #define dg_configUSE_LP_CLK LP_CLK_RCX
This is your example code : ble_multi_link which services the watchdog correctly when a 32 KHz crystal is present.
Why does the watchdog time out when I am using the internal 32kHz oscillator with the above setting?

Thanks

jpselc
Offline
Last seen:2 years 7 months ago
加入:2018-02-15 17:10
The issue here turned out to

The issue here turned out to be a failed malloc.
There must be different heap requirements when using this clock setting.

PM_Dialog
Offline
Last seen:2 days 12 hours ago
工作人员
加入:2018-02-08 11:03
Hi jpselc,

Hi jpselc,

Thanks for the indication. Glad that your problem has been fixed.

Thanks, PM_Dialog