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:
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
solved thanks!