Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

configMAX_PRIORITIES values

In the only example in SDK16.0.0 with soft_device and FreeRTOS, configMAX_PRIORITIES is set to 3, which means available  priorities 0,1 and 2.

Is it possible to change configMAX_PRIORITIES to value more than 3 and if so what else other than softdevice_task priority have to be changed accordingly?

Thanks

Parents Reply Children
  • If you go to tasks.c inside the Kernel files, you can see the definition

    PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks. */
    This is where it consumes more static space for every extra priority.

    Looking at the definition of List_t

    /*
     * Definition of the type of queue used by the scheduler.
     */
    typedef struct xLIST
    {
    	listFIRST_LIST_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
    	volatile UBaseType_t uxNumberOfItems;
    	ListItem_t * configLIST_VOLATILE pxIndex;			/*< Used to walk through the list.  Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
    	MiniListItem_t xListEnd;							/*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
    	listSECOND_LIST_INTEGRITY_CHECK_VALUE				/*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
    } List_t;
    turns out, that the size of List_t on the GCC compiler is 149 bytes.

Related