需求方的核心设备——如何停止scanning?

3 posts / 0 new
Last post
hssmltd
Offline
Last seen:7 months 3 days ago
加入:2015-09-05 08:29
需求方的核心设备——如何停止scanning?

Hi,
i have a question about DSPS BLE central app:
I want to start / stop scanning routine on button press or uart command
I'm not using any sleep on central device. When i comment out user_scan_start() in void user_on_scanning_completed (uint8_t status)
to prevent scanning start again the code runs for several seconds the crashes..
am i missing something?
Thanks!

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

Hi hssmltd,

I suppose that when you mention that the code crashes you mean that you see on Keil some error messages that mention "JLink Error: Can not read register ......", this is because you are operating under sleep mode (the ARCH_EXT_SLEEP_ON is set in the app_default_sleep_mode) so as soon as the scan times out and the 580 has nothing to do (no BLE event to serve) it goes to sleep, and at the DSPS version when the device goes to sleep it disables the debugger module (to be more accurate it disables it when it wakes up) of the 580, so it detaches your JTAG. So if this is what you mean crash, either set the app_default_sleep_mode at ARCH_SLEEP_OFF or search for the BLE_SLP_Handler() and set the SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); to 1 in order not to disable the JTAG.

Thanks MT_dialog

hssmltd
Offline
Last seen:7 months 3 days ago
加入:2015-09-05 08:29
solved thanks!

solved thanks!