Program crashing into CY_NORETURN

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.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

 Hi,

   

I have a program that is crashing and ending up in the while loop in CY_NORETURN CY_ISR(IntDefaultHandler).

   

I thought this was a pretty straight forward program, but it ends up crashing, whether it takes a minute, or 24 hours, it happens. 

   

Please look through the code and let me know if there are any obvious, or subtle problems that might be causing this.

   

I have a version of the program that just uses a CyDelay instead of the timer, and seems to work fine, but I cannot see what i am doing incorrectly with the timer.

   

Thank you,
Tom

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

You posted your project that uses CyDelay().

   

Can you present us with the timer version?

   

 And:

   

When you halt the program when in the infinite loop, don't you get a clue where it stopped from the call-stack??

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

 Hi,

   

It is the correct program, there is a timer interrupt.  The CyDelay is just for the CapSense.  

   

The call stack is showing the program crashing in the ProgramControl_IsBusy() - Capsense is busy check. 

   

There is another wrinkle to this story.  It looks like the program is crashing when the circuit board with the CapSense is close to an AC power supply that is being switched through relays.  Does this make any sense?

   

If so, why can I not get the program with no timer interrupt (attached) to suffer the same fate?

   

Thank you,
Tom

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

I cannot see the timer nor the interrupt. Where did you hide it?

   

 

   

Bob

0 Likes
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

 Sequencer1.zip has the timer, Sequencer._3.1 is the version that does not.

   

Sorry for the confusion.

   

Thank you,
Tom

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

There is another wrinkle to this story.  It looks like the program is crashing when the circuit board with the CapSense is close to an AC power supply that is being switched through relays.  Does this make any sense?

   

 

   

Any Hi Z node, pin, is very susceptable to pickup, and transients that take

   

pin outside supply rails in voltage. That in turn can inject charge into substrate

   

of chip, and what logic it winds up being removed by is anybodys guess.

   

 

   

Use a DSO, set up to trigger .5 V below Vss and .5 V above Vdd and see if you

   

can get triggers on any pins. That includes power pins. Thats the first clue you

   

have some real problems. Solutions can be diode/zener arrays attached to pins,

   

Fairchild, On Semi make them.

   

 

   

Shielding, RC filters on pins, many approaches. Use Polymer Tants for bulk

   

bypass, they have an order of magnitude better Z vs F curves.

   

 

   

www.dropbox.com/s/ruaf9booe17jk8n/PCB%20Layout.zip

   

www.dropbox.com/s/2h96beh1fbvz4e2/noise_notes.zip

   

 

   

Regards, Dana.

0 Likes
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

 Thank you for the CapSense tips, I will certainly employ them.

   

In this case, however, it looks like the timer is indeed the culprit.  The CapSense works fine and never crashes when I use the project without the timer.

   

Any ideas how the two might affect each other?

   

Thank you,
Tom

0 Likes