Beacon reference design software got stuck with DA14580 expert dev kit

2 posts / 0 new
Last post
quangng
Offline
Last seen:10 months 1 day ago
加入:2015-10-29 22:03
Beacon reference design software got stuck with DA14580 expert dev kit

Hi!

I'm running the beacon reference design on DA145810 expert dev kit and it got stuck after sending two advertising packets. It got stuck at the while loop in arch_system.c file

else // After 2 seconds system can sleep
{
sys_startup_flag = false;
if ( (app_get_sleep_mode() == 2) || (app_get_sleep_mode() == 1) )
{
SetWord16(SET_FREEZE_REG, FRZ_WDOG); // Stop WDOG until debugger is removed
while ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP) {}; //the software got stuck here forever??????
SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); // close debugger
}

I set APP_BEACON_INT_MIN and APP_BEACON_INT_MAX to 0x640 to send advertising packets every 1 second.
Then I configured the hardware selection as follows:
#define CFG_HW_CONFIG HW_CONFIG_BEACON_REF
#if (CFG_HW_CONFIG == HW_CONFIG_BEACON_REF)
#undef CFG_SPI_FLASH
# undef CFG_DYNAMIC_BEACON_DATA
#undef CFG_CONNECTABLE_ADV_MODE
#ifdef CFG_CONNECTABLE_ADV_MODE
#define CFG_PRF_ADC_NOTIFY
# endif
# endif

I run the same compiled code with the above settings and run it on DA14583 basic dev kit. It works OK and sends advertising packets every 1 second continuously without any problem.

Could you please tell me what went wrong here?

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi quangng,

Hi quangng,

No reference design project, when it has the sleep enabled is able to run with the debugger attached, you can either stop debugging or disable the sleep mode in the da14580_config.h file in the CFG_EXT_SLEEP definition. If the sleep is enabled the program will run until its time to go to sleep, after that it will stuck in that while() and wait to disable the debugger.

Thanks MT_dialog

Topic locked