# Undefined Priority

**URL:** <https://forums.freertos.org/t/undefined-priority/1113>\
**Category:** Kernel\
**Created:** [July 26, 2008, 10:24am UTC](https://forums.freertos.org/t/undefined-priority/1113 "2008-07-26T10:24:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [July 26, 2008, 10:24am UTC](https://forums.freertos.org/t/undefined-priority/1113/1 "2008-07-26T10:24:22Z")

</div>

**[aczento](https://sourceforge.net/u/aczento/)** wrote on [Saturday, July 26, 2008](https://sourceforge.net/p/freertos/discussion/382005/thread/31871d40/#fedd):

Hi there,

I examined FreeRTOS in depth a little bit the last few days and came across some questions I’d like to discuss with you. I will start a new thread for each question, because they belong to different categories. I also need some webspace for uploading images to explain my other questions, it will take while before I will post them. So lets beginn with the first simple one:

In the FreeRTOS configuration I specified 8 priorities as: #define configMAX\_PRIORITIES&nbsp;&nbsp;&nbsp; ( ( unsigned portBASE\_TYPE ) 8 ).  
Then I created a task with a priority of 41. Well, compiling the sources and running it (on ATmega128) shows that everything is working well. Even the task with 41 priority. Examination with a logic analyzer showed, that this task executes as a task with mid Priority such as 3 or 4.

Can anyone explain that behaviour?

Best Regards,  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [July 26, 2008, 1:09pm UTC](https://forums.freertos.org/t/undefined-priority/1113/2 "2008-07-26T13:09:57Z")

</div>

**[woops\_](https://sourceforge.net/u/woops_/)** wrote on [Saturday, July 26, 2008](https://sourceforge.net/p/freertos/discussion/382005/thread/31871d40/#fedd/5f60):

If you study the source code then you see the code

&nbsp;&nbsp;&nbsp; if( uxPriority \>= configMAX\_PRIORITIES )  
&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uxPriority = configMAX\_PRIORITIES - 1;  
&nbsp;&nbsp;&nbsp; }  
so it is limited.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [July 26, 2008, 1:40pm UTC](https://forums.freertos.org/t/undefined-priority/1113/3 "2008-07-26T13:40:34Z")

</div>

**[aczento](https://sourceforge.net/u/aczento/)** wrote on [Saturday, July 26, 2008](https://sourceforge.net/p/freertos/discussion/382005/thread/31871d40/#fedd/5f60/fc29):

Thanks for the answer. I think I missed that line in the sources.

Best Regards,  
Alex
