Error: dbg.M0015 on BLE Pioneer Kit

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

   I am using the CY8CKIT-042-BLE Pioneer Kit.  I have successfully installed and updated the PSo Creator.  I have updated the firmware in both the dongle and the baseboard.  Both the dongle and base board successfully updated the firmware.  I then build the CapSense_LED project for both daughter boards.  The SW is successfully written to FLASH.  But when I try to Debug I get:

   

Error: dbg.M0015: Debugger exited unexpectedly during run.  Encountered error (Target disconnected See output window for more information.)

   

The output window only has this message.

   

There was an unhandled error during the debug session. This has forced the debugger to shutdown.

   

I have gone to the Select Debug Target item in the Debug menu, selected the target and said connect. Doing Debug has the same result.

   

--------

   

If the code is loaded and the board is running.  I can select the target as above.  Then pick Debug Running Target and I can control the target, single step or breakpoint.

   

Can you suggest what I can do to get the Debug item working.

   

Thank you for the help

   

--jim schimpf

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There might be a #define in the source to disable going to deep sleep. Search for "deepsleep" or "deep sleep".

   

 

   

Bob

View solution in original post

0 Likes
8 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Debugging and deep sleep do not work together. Did you disable deep sleep mode for your project?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

How do I disable it ? This is my first exposure to PSoC Creator, in lpcxpresso (NXP) and CCS (Ti) you look at the project properties but it doesn't seem to work that way here.

   

Thank you for the help.

   

--jim schimpf

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There might be a #define in the source to disable going to deep sleep. Search for "deepsleep" or "deep sleep".

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi,

   

I found this and commented it out but it had no effect, still the same error on Debug.

   

BLEApplications.h
/*************************Pre-processor directives****************************/
/* 'ENABLE_LOW_POWER_MODE' pre-processor directive enables the low power mode 
* handling in the firmware, ensuring low power consumption during project usage.
* To disable, comment the following #define. 
* If disabled, prevent usage of the project with coin cell */
#define ENABLE_LOW_POWER_MODE       <<<<<<<<<<< Commented this out.

   

The DEEP_SLEEP in this project is controlled by the brightness of the LED.  When dim the board goes to DEEP sleep. 

   

Just loading the code (Program or Debug).  Then Debug->Select Debug Target (pick board , press Connect Button) Then Debug->Attach to Running Target brings up the Debugger just fine attached to the board. So it's running just fine after the pgm load. (Also I can see the BLE working)

   

Thank you for the help

   

--jim schimpf

0 Likes
Anonymous
Not applicable

Also, please check if the Debug Select option in CYDWR is set to SWD (not GPIO).

Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Great that you got it running!

   

I rarely use "Attach to running Target". There is a bug-icon in Creator's menu which I use to compile-program-debug. Program stops (adjustable in Tools -> Options) at the first executable statement.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you that was it. Changing that to DEBUG made it all work.

   

--jim schmpf

0 Likes
Anonymous
Not applicable

Awesome.

   

Just for general info, the low-power projects in the Kit have the Debug option disabled in CYDWR as enabling them causes much current consumption. So to regain the debug capability, this option should be set to SWD.

0 Likes