cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

Contributor

 I am new to Creator, having used Designer for many years.

   

I am working on a PSoC4 BLE project.

   

There seems to be some random behavior with breakpoints.

   

When the code hits a breakpoint it often cant be continued again, it simply sticks at the same breakpoint.

   

When code hits a breakpoint, and another breakpoint is then added, the code never stops at the added breakpoint even if it reaches that point.

   

When setting a breakpoint "on the fly" the Bluetooth connection is randomly lost even though the break is not reached and the code is still running.

   

Is this expected behaviour?

0 Likes
Reply
8 Replies
Esteemed Contributor

1) What board are you debugging on ?

   

 

   

2) Using SWD, JTAG,....?

   

 

   

Regards, Dana.

0 Likes
Reply
Contributor

 The board is the BLE Pioneer Baseboard with the Proc BLE module.

0 Likes
Reply
Esteemed Contributor II

Welcome in the forum, Andy!

   

To tell the truth, this unexpected behave of breakpoints is fully expected, but surprises me every time.

   

One (simple) explanation is: When hitting a breakpoint you stop the CPU, but you do not halt all the underlying hardware which is able to produce more and more interrupts while we are looking at the screen to see what goes on.

   

Halting on a BP, then just a single step and the program is at entry of an interrupt handler. While looking at the screen some other ints get fired (but not yet worked on) and you can be sure that one of those is telling that there was a time-out causing now the project to behave differently from the case without the breakpoint. Cypress Designer had the very same behave when using the ICE-Cube for debugging and tracing.

   

 

   

Bob

0 Likes
Reply
Contributor

 I always found Designer with the Ice-cube to be very well-behaved during breakpoints. It didnt do any of the above.

   

With the Cube, the timers appeared to stop when the break was reached.

   

I am wondering if this behaviour is being exacerbated by the sleep modes being enabled. I am not sure how to disable all sleep modes in the BLE examples. 

0 Likes
Reply
Esteemed Contributor

The ICE cube did have issues with BPs and Sleep -

   

 

   

   

 

   

Regards, Dana.

0 Likes
Reply
Anonymous
Not applicable

Solution for this is to remove the break point, place a new break point at the next required location and then run the CPU.

   

And keep repeating the above steps. Other work around is to disable the global interrups while debugging.

   

 

   

-Keerthi

0 Likes
Reply
Anonymous
Not applicable

placing next breakpoint works, or the long way around is to disable global ints, single step which will bring you inside an interrupt, then step out to your code. Re-enable globals ints when you're done... This sometimes crashes the radio though.

0 Likes
Reply
Contributor

Bob Marlowe answered the question. Interrupts are generated while you mouse click. Conditions are changing under your feet if you have interrupts active.

0 Likes
Reply