Bug in CYLIB.h

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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).

   

 

   

Bob

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

   

 

   

Bob

0 Likes
Anonymous
Not applicable

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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes