change the priority of a task in FreeRTOS at runtime using STM32CubeIDE and STM32 HAL libraries

How can I change the priority of a task in FreeRTOS at runtime using STM32CubeIDE and STM32 HAL libraries? My task priority isn't updating. Here's my code:

vTaskPrioritySet(xTaskHandle, 2);


What could be the issue?

@Middleware & OS
Solution
If you table is in a form of matrix u can use the example below 👇
# replace with your 2d table 👇 
lookup_table = [
    [10, 20, 30],
    [40, 50, 60],
    [70, 80, 90]
]

 (transpose) the table
def invert_table(table):
    return [list(row) for row in zip(*table)]

inverted_table = invert_table(lookup_table)

print("Original Table:")
for row in lookup_table:
    print(row)

print("\n")

print("Inverted Table:")
for row in inverted_table:
    print(row)
Was this page helpful?