5 posts / 0 new
Last post
Alex Luo
Offline
Last seen:1 year 3 months ago
Expert
加入:2014-02-28 19:16
Ext sleep mode

嗨,支持团队:

I'm testing my code based on SDK3.0.8, sample128.

When I used the basic DVK, it works for both Ext sleep mode and without ext_sleep_mode. For ext_sleep mode, the basic DVK stopping debug.

When I burn it into my board (EEPROM), the code works well at inactivated ext_sleep_mode. If I set "#define CFG_EXT_SLEEP" and bunt it into my board (EEPROM), I can receive the advertising when it's reset, and then no advertising. After reset again, the advertising came again and then lost. So, there is something wrong for ext_sleep_mode which stopped advertising. Please advise how to fix it and where should be wrong?

Thanks,

Device:
MT_dialog
Offline
Last seen:2 months 6 hours ago
Staff
加入:2015-06-08 11:34
Hi Alex Luo,

Hi Alex Luo,

Please check your previous posthttp://support.dialog-semiconductor.com/advertising-problem

Also since you provide some extra information here, from what i can undestand when the code is initialy downloaded on your board i suspect that it takes some time until the device falls into sleep so during that time it seems that your device is advertising as soon as the device falls into extended sleep its incapable of advertising, can you please check this by using smart snippets ? What i can think of also is, can you check if the for some reason the debugger in the da module is enabled and prevents the da from going to sleep?

Thanks MT_dialog

Alex Luo
Offline
Last seen:1 year 3 months ago
Expert
加入:2014-02-28 19:16
Hi MT,

Hi MT,

This case is different from another issue about the advertising, which is not problem with ext_sleep_mode. No Advertising was happened very occasionally, and can be fix by reset.

This problem is ext_sleep_mode, which can't work on my board with EEPROM (advertising at boot-up, and then second it stopped). For the basic DVK, it works well with ext_sleep_mode after Stop Debugger Session.

I guess that the reason from the debugger, but tried to set DEVELOPMENT_DEBUG =0 (boot from OPT, original is 1 for jtag), the problem is still there. So, the problem is really caused by debugger still enabled on DA chip?

Searched the debugger in the project, and SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0) is called in the BLE_SLP_Handler(void). I think the problem may not be caused by debuuger. Also please advise how to disable debugger.

The same code, I download it into the basic DVK, and leave "Stop debug session", it works very well. It means that the code works and not ext_sleep_mode issue to affect advertising.
The same code, I download the HEX into my board (in EEPROM), I can see the advertising after booting up, and then off. I reset again, it repeated the same-thing. I have used SDK3.0.6 for similar code with ext_sleep_mode, it works well (also used EEPROM).

Please advise, and there may something I need to set or change for ext_sleep_mode? Or debugger issue I can't really disable it?

Look forward to seeing your advice!
Alex

MT_dialog
Offline
Last seen:2 months 6 hours ago
Staff
加入:2015-06-08 11:34
Hi Alex Luo,

Hi Alex Luo,

I though that the two posts concern the same incident, about the debugger the SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE,0) is enough to disable it, and since the incident doesn't occurs when operating with the dev kit you should be fine. The fact that you are able to advertise after a reset means that your device boots properly and hangs when you are going to sleep. Can you check if your device goes into the Hardfault or to the NMI Hanlder for any reason (try to set a GPIO in one of the handlers)? Do you use the watchdog ? The only things that would stop the da from functioning should be either the debbuger (which we can exclude) and if there is Hardfault or an NMI

Thanks MT_dialog

Alex Luo
Offline
Last seen:1 year 3 months ago
Expert
加入:2014-02-28 19:16
Hi MT,

Hi MT,

The problem was fixed by setting the 32K clock correctly.

Thanks,
Alex

Topic locked