Erratic breakpoint behaviour

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

cross mob
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

 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
8 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

1) What board are you debugging on ?

   

 

   

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

   

 

   

Regards, Dana.

0 Likes
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

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

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

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
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

 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
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The ICE cube did have issues with BPs and Sleep -

   

 

   

   

 

   

Regards, Dana.

0 Likes
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
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
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

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