7 Replies Latest reply on Aug 14, 2015 12:21 AM by samet.doksanoğlu

    WDT Reset at Debugging Mode

    samet.doksanoğlu

      When I run CE95401(I modified a little) code example in  PSoC 4 Pioneer Kit in debugging mode. I put breakpoint to firstline of main. when the device recieves reset , it should return first line again but it doesn't and goes an unknown state . I also put breakpoint to isr_wdt interrupt service routine , it doesnt stop there after recieve wdt reset.                        
      However if I just toggle LED in first line of main and  program(not debug) kit works what it is supposed to work 
       I m asking why the reset doesn't work properly in debugging mode?
      I  attached my code and Call Stack photo of unknown state
       

         

      I used PSoC  Creator 3.1

        • 1. Re: WDT Reset at Debugging Mode
          user_1377889

          Merhaba!

             

          You have set the optimization level for your project to "Speed" which does not allow for debugging. Set compiler optimization to "None" and all will work fine.

             

          Additionally I would suggest you to update to latest Creator 3.2 using Cypress Update Manager. There will be some issues fixed with some components and the cy_boot.

             

           

             

          Happy coding

             

          Bob

          • 2. Re: WDT Reset at Debugging Mode
            samet.doksanoğlu

            Hi Bob

               

            Thank you for quick and illuminating answer but unfortunately it doesnt work. Are you sure that debug mode should work properly even if kit gets reset.I mean if it is impossible to work in debug when kit gets reset , I shouldn't waste time on this issue. Otherwise I ' m looking  forward to hear another solution from you :D

               

            Thanks in advance

            • 3. Re: WDT Reset at Debugging Mode
              samet.doksanoğlu

              Additionally my output log as below

                 

              Error 'SWD error FAULT' received while attempting to read memory 0x10000046-0x1000004A
              Error 'SWD error FAULT' received while attempting to read memory 0x10000126-0x1000012A
              Error 'SWD error FAULT' received while attempting to read memory 0x10000126-0x1000012A
              The target program has stopped at: file:  line: -1 function: ?? address: 0x10000046

              • 4. Re: WDT Reset at Debugging Mode
                user_1377889

                After a DEVICE reset the connection between debug interface (KitProg) and target processor will be lost, since the basic debugging takes place in the target ARM CPU. A debugger restart (Icon when debugging) will reset the CPU to its initial state and halt at first line in main() or first BP set (adjustable).

                   

                When you make sure within your code that not a second interrupt may happen, you could try an "Attach to running target" and stopping the CPU.

                   

                 

                   

                Bob

                • 5. Re: WDT Reset at Debugging Mode
                  user_14586677

                  You have set the optimization level for your project to "Speed" which does not allow for debugging.

                     

                   

                     

                  This is not correct, you can debug with optimizations set. But you may get breakpoints

                     

                  not behaving as you would expect if code has been optimized.

                     

                   

                     

                  Set compiler optimization to "None" and all will work fine.

                     

                   

                     

                  This is correct, compiler does not optimize code so setting of breakpoints matches (pretty

                     

                  much) what your code looks like.

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: WDT Reset at Debugging Mode
                    samet.doksanoğlu

                    I received a answer from technical support.  I post it here to help somebody else that is dealing with same issue.

                       


                    "Hello Samet, You cannot debug the project with WDT reset. This is a limitation with PSoC debugger. I will checking with the software team if we are planning to have this feature in the future releases of PSoC Creator. Build Settings-> Compiler->General->Additional Include Directories is used to add any library files. For example: We use this to add library for emfile component. You can check the emfile datasheet in PSoC Creator -> Page 6. If you need to store the project in a shared directory, then should be able to directly access the project. But one thing to note is there should not be any special characters in the path of the project. If this is not what you meant, kindly clarify.

                       

                    Thanks, Keerthi"
                     

                    • 7. Re: WDT Reset at Debugging Mode
                      samet.doksanoğlu

                      I received a answer from technical support.  I post it here to help somebody else that is dealing with same issue.

                         


                      "Hello Samet

                      We thank you very much for contacting Cypress Technical Support.

                      When hardware reset happens during debugging, connection between target processor and debug interface will be lost. So it will reach some unknown state.

                      When programming even reset happens, there is no problem because after flash is programmed, debug interface can't be used.

                      I will assign this case to one of our AE and he will assist you further.

                      Assuring you of our best support.

                      Thanks and Regards,
                      Ramesh B"