cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX you really need to get your priorities right

DOsbo
Senior

Hi, I recently migrated from CMSIS_V1 to CMSIS_V2 ( in STM32Cube_FW_H7_V1.7.0). That came with a significant increase in the number of defined thread priorities ~ around 56 priorities. However, CubeMX sets the FreeRTOS MAX_PRIORITIES parameter to 32. The setting is also disabled if CMSIS_V2 is enabled so it can't be changed. Even the CubeMX comment says it should be set to 56.

The consequence of this defect is that setting any thread priority above 32 they will all be truncated to same setting of (32 -1).

To workaround the issue, I undefined configMAX_PRIORITIES and reset it to 56.

Can ST please confirm this is a defect and fix it if required. Or does anyone know a better way to fix it?

0693W000003RVOAQA4.jpg

Cheers

David

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DOsbo​ 

Thanks for the feedback, issue reported to the tool development team that will plan the correction.

Best regards,

Nesrine

View solution in original post

5 REPLIES 5

Hello @DOsbo​ 

I could not reproduce the issue (by using the last STM32CubeMX version) . Could you please tell me which MCU do you use or share your ioc file to check the problem.

Best regards,

Nesrine

DOsbo
Senior

Hi Nesrine, thank you for looking into this for me. I suspect it has to do with upgrading from V1 to V2. My ioc is attached.

Cheers

David

DOsbo
Senior

Another strange thing is I just downloaded the same ioc that I sent you. However, when I opened it said it was set to CMSIS_V1 (not v2). When I switch that file to CMSIS_V2, it still does not set the max priorities to 56.

Hi @DOsbo​ 

Thanks for the feedback, issue reported to the tool development team that will plan the correction.

Best regards,

Nesrine

DOsbo
Senior

Awesome. Thank you for looking into it for me.

Cheers

David