最新的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:
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:
#define dg_configUSE_LP_CLK LP_CLK_RCX
#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
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
The issue here turned out to be a failed malloc.
There must be different heap requirements when using this clock setting.
Hi jpselc,
Thanks for the indication. Glad that your problem has been fixed.
Thanks, PM_Dialog