3 Replies Latest reply on Dec 20, 2013 4:10 AM by JoMe_264151

    Bug in CYLIB.h


      When using CyIntSetPriority() the value is checked against a #defined constant named CY_MIN_PRIORITY near line 319 in CyLib.h. CY_MIN_PRIORITY has the value 3, but it should be 7. The description of CyIntSetPriority()  in "System Reference Guide" shows valid priority ranges from 0 to 7 (which is quite logical).





        • 1. Re: Bug in CYLIB.h

          ... or is that an error in the documentation?





          • 2. Re: Bug in CYLIB.h

            Bob -


            The problem is in the documentation. The documentation was correct, but we missed updating this for changes that occured with PSoC 4.


            PSoC 3 and 5LP can support priorities from 0 to 7 (0 is the highest), but PSoC 4 only supports 0 to 3.  This is because of the Cortex-M0 on the PSoC 4 versus the M3 on the PSoC 5LP.  You didn't say that you were using PSoC 4, but I checked the generated code for both 4 and 5LP and they are different and correct.


            Thanks for reporting the problem.


             - Brad

            • 3. Re: Bug in CYLIB.h

              Brad -


              Yes, since I slept over that issue it came to my mind that there was something different between PSoC5 and PSoC4. I agree that something has got forgotten within the documentation of the System Reference Guide.


              - Bob