terrible psoc5 !

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

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?

0 Likes
4 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

 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.

0 Likes
Anonymous
Not applicable

I found, that table was overwritten by few bytes, and there was state_var.

   

my fault.

0 Likes
Anonymous
Not applicable

 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?

0 Likes