- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see the timer nor the interrupt. Where did you hide it?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sequencer1.zip has the timer, Sequencer._3.1 is the version that does not.
Sorry for the confusion.
Thank you,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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