Debug does not work properly with switch

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I have attached the example file for the central role. I ran across the followings problem. Once the user button is pushed the breakpoint triggers on this button push, but after the program is resumed the program continues to trigger even though the switch is not active. 

0 Likes
1 Solution
Anonymous
Not applicable

After giving this some thought, expecting debug to resume after a breakpoint when debugging BLE is unreasonable. Since you are only stopping one side of the connection most likely the connection will timeout. So you need to reset after each breakpoint to get back to a known stae.

View solution in original post

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

Debugging with deep-sleep does not work. try to blink an LED, At first sight I would suggest to

   

First clear the pin's interrupt, then clear the pending interrupt of isr_button.

   

Set isr_button interrupt type to "RISING_EDGE"

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Bob,

   

I tried disabling the low power mode and getting rid of the interrupt using polling instead. It still didn't work properly. I tried changing the pin characteristic to transparent, but that didn't fix the problem either.

   

I wrote a simple program this morning that read the switch and then incremented a variable and the debugger worked as expected. 

   

It's a pain not being able to use the debugger, but I'll have to make do.

   

 

   

Phil

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

Set the build properties of compiler optimization to "None".

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Bob, 

   

The compiler optimization is already set to none.

   

 

   

Phil

0 Likes
Anonymous
Not applicable

After giving this some thought, expecting debug to resume after a breakpoint when debugging BLE is unreasonable. Since you are only stopping one side of the connection most likely the connection will timeout. So you need to reset after each breakpoint to get back to a known stae.

0 Likes