4 Replies Latest reply on Feb 25, 2014 5:30 AM by ki.leung

    terrible psoc5 !


      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?

        • 1. Re: terrible psoc5 !

          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.

          • 2. Re: terrible psoc5 !

             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.

            • 3. Re: terrible psoc5 !

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


              my fault.

              • 4. Re: terrible psoc5 !

                 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?