WDT Reset at Debugging Mode

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

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

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

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

0 Likes
Anonymous
Not applicable

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 😄

   

Thanks in advance

0 Likes
Anonymous
Not applicable

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

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

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

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

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"
 

0 Likes
Anonymous
Not applicable

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"

 

0 Likes