vTaskPrioritySet does not use the CMSIS priority levels defined in the enum osPriority, but numbers in the range of 0 (lowest) to (configMAX_PRIORITIES-1). There will be a CMSIS layer function that maps the CMSIS priorities to the native FreeRTOS priorities, or you can just use the number of the actual FreeRTOS priority you want.
cmsis_os.c was generated by STM CUBE as a package. I believe that the whole bundle - the freertos and HAL libraries are well written. There are things I would have done differentley but for the sake of fast developement, I have no intention to poke around the generated code, if not needed.
I only want to understand the workings behind it so I know what options I have and to be carefull of these little traps in the future projects.
Maby my post was a bit premature, but I am glad to see that the forum is very responsive!