嗨,对话框的工程师,
I have done th e work on the dsps_host project and I use a button press action to trigger the a 10s passive scan , and use arch_printf to printf the scaned device. It works fine with the ARCH_SLEEP_OFF, and I measured the current of the board which is murata TypeZF, and it cost aout 420uA when do nothing and about 5.2mA when do the scan. But I need to decrease the idle current to several uA,so I think it 's caused by the sleep mode. but if I changed the default sleep mode to ARCH_EXT_SLEEP_ON,about 10s after the program starts, I get the Jlink error like this:. Does anybody know the reason?
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
**JLink Warning: CPU could not be halted
***JLink Error: Could not read memory location 0x200014F8 when trying to clear soft RAM BP
Could not start CPU core. (ErrorCode: -1)
**JLink Warning: CPU could not be halted
***JLink Error: Could not read memory location 0x200014F8 when trying to clear soft RAM BP
Could not start CPU core. (ErrorCode: -1)
***JLink Error: Can not read register 0 (R0) while CPU is running
***JLink Error: Can not read register 1 (R1) while CPU is running
***JLink Error: Can not read register 2 (R2) while CPU is running
***JLink Error: Can not read register 3 (R3) while CPU is running
***JLink Error: Can not read register 4 (R4) while CPU is running
Hi chris0409,
This is because in the version of the SDK that the DSPS uses you wont be able to debug while you are in sleep mode (the sleep interrupt handlers are switcing off the debugger module of the ARM, that is why you get those indication on keil). In order to be able to use the sleep mode and debug you can modify the BLE_SLP_Handler() in the rwble.c file in line 820 and instead of SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); set the 0 to 1. That way the debugger wont get disabled, but if you have the debugger enabled you wont be able to measure the power consumption in sleep mode since the JTAG will be attached to your dev kit and will consume power. For proper measurements you will have to exit the debug mode and measure.
Thanks MT_dialog