STM32WB scheduler and CubeMX: adding different priority levels for tasks using CubeMx
Good day,
I'm using the scheduler to be able to run tasks on the STM32WB. It all works fine, but I would like to be able to add different priority levels to tasks, since the timing of some tasks are more critical than others.
I edited app_conf.h as follows (default only had CFG_SCH_PRIO_0 and CFG_PRIO_NBR):
/**
* This is the list of priority required by the application
* Each Id shall be in the range 0..31
*/
typedef enum
{
CFG_SCH_PRIO_0,
CFG_SCH_PRIO_1,
CFG_SCH_PRIO_2,
CFG_PRIO_NBR,
} CFG_SCH_Prio_Id_t;I also edited utilities_conf.h as follows (was 2, now 4):
#define UTIL_SEQ_CONF_PRIO_NBR (4)I'm happy to report that this works! However, I need to keep on changing these two files every time I regenerate code with CubeMx (I'm using it from within STM32CubeIDE). Is this perhaps something that could be added to a next revision of the STM32WB software package? Perhaps under the scheduler, the number of priority levels can be chosen.
