- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
state_var is only available in main loop. Nowhere else this value is neither read nor written.
How it's possible, that in case statement case 7:
value on exit is negative?
in assemble there are 3 instructions related to increament state_var.
However it's not rtos but a simple single thread aplication, mainly for problem isolation.
Should I disable breakpoints during increment/decrement which do not play with this variable at all?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. According to the picture the state_var is unit16. so the value is not negative, just very big ( which is a bit strange)
2.Can you upload the project, so people can have a look.
3. You can using the creator 2.2, Can you change to creator 3 and does it still have the problem.- but you need to change to a different chip as psoc5 is not support under creator 3.
4. Did you tried to change the optimization and see that makes any difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you think that the variable is affected by an interrupt, you can try to disable the interrupt before the operation and re-enable interupt again to check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found, that table was overwritten by few bytes, and there was state_var.
my fault.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also noticed that on line 190 and 191 which was covered by the pop up scrren
on line 190, it shows
"state_var_" -------- with a underscore
on line 191, it shows
"state_var " --------- with a space
The one on line 190 has a "_".
Are those two different variable?
Which one were you checking?