9 Replies Latest reply on Jun 19, 2017 4:59 AM by walter.pires.t4h_2540281

    Kit CY5672 - Problem in debugging

    walter.pires.t4h_2540281

      Hi, 

      I'm using the CY5672 PRoC BLE Remote Control Reference Design Kit, and I'm trying to understand what the code exactly does. 
      So my idea was to do debugging, and see how the code works. 

      But, when i'm in debugging mode, and try to do step by step, i fall on system interrupt part. I searched here by this problem and see this is "normal" (it was a known behaviour), and if I want to do debug I have to use one of this solutions (saw this solutions on case: System interrupt problem in debugging): 

      "Ways out: When at the breakpoint, disable interrupts when single-stepping, before executing a run-command enable them again. There is an icon in the menu for interrupts. 

      Or 

      remove Breakpoint and set a new one at the next line you want to stop, then execute a Run-command" 

      Although, when I'm trying to implement the first solution, and I'm at the breakpoint (with the interrupts now disabled), I try to do step by step and it happens that the code jumps to another place. Also, If I continue to do step by step it give me this error: 

      "Debugger exited unexpectedly during run. Encountered error (Target disconnected See output window for more information.)" 

      The other solution, I remove the breakpoint and set a new one close to the previous one where the code should go, but when I execute Run-command it doesn't reach there. For example, on the figure in annex when I execute the Run-command it should stop in the breakpoint that I set, but never has arrived there. Only arrives if a key is pressed again, but it should had arrived in the previous case (because the variable isBatteryLow had the value 0 and the variable isActivitiyDetected had the value 1). 

      I'm using the code provided with the kit for remote control without any changes. 

      Could you help me about these problem? What should I have do?