- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using a CY8CKIT-050 and the Cypress IDE with the latest updates. I have had a program that was running (sort of - at least it was not exhibiting the symptoms I'm seeing at the moment) and then updated some of the programmable components.
Now the program is running and doing what I want but after a random period (has been as short as a few seconds and as long as about a minute) it will stop. I'm using the LCD display and I get some random characters appearing when in run mode.
I have tried to run the program in debug mode and it shows the same fault (while running) but at least this time I'm getting an error on the PC that says the debugger disconnected due to an unexpected interrupt. I have noticed that the error occurs almost immediately after I restart from a breakpoint under the debugger (I have tried to single step my way through the code but the error is not 'repeatable' that way.)
I am not yet familiar enough with the ARM devices to know this already, but I was wondering if there is a 'default' ISR that is referred to by all of the unimplemented interrupt vectors. Basically I think that if I can write an ISR that lets me trap the problem, then I might be able to trace it back to its source.
Can this be done?
If so can someone point me to the URL or show me the required code?
Thanks
Susan
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the "fresh pair of eyes" Bob.
Tried commenting out the LCD part - no different. (This was actually one of the reasons why I added the UART so that I could tell if something was happening without the LCD). Which also shows that the problem occurred before the UART was added.
I'll try increasing the heap, but as far as I know (which is not much!) the only thing that should be using the heap is the sprintf and the problem was occurring before I added that (along with the UART).
I've also just ordered a CY8CKIT-059 and I'll try on that. (By the way, do you get commission 🙂 )
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More Details (a bit more accurate this time)...
The actual error on the output display on the IDE is:
=thread-group-exited,id="i1"
Error: dbg.M0015: Debugger exited unexpectedly during run. Encountered error (Target disconnected See output window for more information.)
However I have also put in a print function via a UART to the PC and I see that this keeps going after the debugger 'exited'. Therefore I was mistaken when I said it stopped/crashed.
Perhaps the title is now wrong but I would still appreciate some help in understnading what is going on hre.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using any sleep-modes? Re-programming GPIO ports or drive modes. Can you supply us with a project archive?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I had found the problem: I had mistakenly put in a 33ohm resistor in series with a LED instead of 330ohm. Therefore the current (even though the duty cycle was about 1:4) would have been too high for the pin. Sadly the problem still occurs.
Therefore I have attached the archive of the project.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see anything dramatic. Please increase heap to 0x0200.
As an alternative use a CY8CKIT-059 , comment/remove the LCD component, set UART pins to P12_7 (TX) and P12_6 (RX) and use a terrminal program like PuTTY to display your data.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the "fresh pair of eyes" Bob.
Tried commenting out the LCD part - no different. (This was actually one of the reasons why I added the UART so that I could tell if something was happening without the LCD). Which also shows that the problem occurred before the UART was added.
I'll try increasing the heap, but as far as I know (which is not much!) the only thing that should be using the heap is the sprintf and the problem was occurring before I added that (along with the UART).
I've also just ordered a CY8CKIT-059 and I'll try on that. (By the way, do you get commission 🙂 )
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(By the way, do you get commission 🙂 )
... only when you buy more than 25 boards 😉
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry Bob - I only bought 3!
But they were AU$15 each which is a steal.
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Only 3? Too bad! OK only potatoes and curd this weekend... 😉
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And the new board works a treat! It was a very easy process to simply change the 'device' in the project to match the processor in the new kit (and update the programmer/debugger firmware) and re-map the pins.
No sign of the problem I had with the previous kit but I might go back and try again when I have some spare time (HA!).
Susan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, PSoCs... ;-))
Bob