after ADV timeout, program go into NMI_HandlerC()

⚠️
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.
3 posts / 0 new
Last post
z0806020433
Offline
Last seen:11 months 2 weeks ago
加入:2016-05-05 13:32
after ADV timeout, program go into NMI_HandlerC()

Based on the project “DA1458x_DSPS_v_5.150.2”, I just modify some config, look at the following :
1. “user_config.h”
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;

static const struct default_handlers_configuration user_default_hnd_conf = {
//Configure the advertise operation used by the default handlers
//Possible values:
// - DEF_ADV_FOREVER
// - DEF_ADV_WITH_TIMEOUT
.adv_scenario = DEF_ADV_WITH_TIMEOUT,

//Configure the advertise period in case of DEF_ADV_WITH_TIMEOUT.
//It is measured in timer units (10ms). Use MS_TO_TIMERUNITS macro to convert
//from milliseconds (ms) to timer units.
.advertise_period = MS_TO_TIMERUNITS(10000),

//Configure the security start operation of the default handlers
//if the security is enabled (CFG_APP_SECURITY)
.security_request_scenario = DEF_SEC_REQ_NEVER
};

2. “da1458x_config_basic.h”
#define CFG_WDOG

#undef CFG_MEM_MAP_EXT_SLEEP
#undef CFG_MEM_MAP_DEEP_SLEEP

#定义CFG_DEVELOPMENT_DEBUG

Then I begin to debug, after 10s , the program will go into the function that is NMI_HandlerC().
Why it it go into NMI_HandlerC() ?

Please help me, thanks!

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

Hi z0806020433,

Thats because you have defined the watchdog and you ve set the .adv_scenario = DEF_ADV_WITH_TIMEOUT and you have disabled the sleep mode, that means that at some point the device is going to stop advertising (DEF_ADV_WITH_TIMEOUT ), so since the device will have nothing to do, it will wait in the WFI() for an interrupt while the watchdog will be still counting (since you have enabled it and you removed the sleep, in sleep mode the watchdog gets disabled when the device is in sleep mode). So since the watchdog is counting eventually you will get an NMI interrupt which means that watchdog elapsed.

Also you dont have to disable the CFG_MEM_MAP_EXT_SLEEP, its just the memory configuration, if you would like to disable sleep just the ARCH_SLEEP_OFF definition will do.

Thanks MT_dialog

z0806020433
Offline
Last seen:11 months 2 weeks ago
加入:2016-05-05 13:32
Thanks very much!

Thanks very much!