Skip to main content
DOsbo
Associate III
September 14, 2020
Solved

CubeMX you really need to get your priorities right

  • September 14, 2020
  • 5 replies
  • 2266 views

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

This topic has been closed for replies.
Best answer by Nesrine.JLASSI

Hi @DOsbo​ 

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

Best regards,

Nesrine

5 replies

Nesrine.JLASSI
Visitor II
September 14, 2020

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
DOsboAuthor
Associate III
September 14, 2020

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
DOsboAuthor
Associate III
September 14, 2020

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.

Nesrine.JLASSI
Nesrine.JLASSIBest answer
Visitor II
September 14, 2020

Hi @DOsbo​ 

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

Best regards,

Nesrine

DOsbo
DOsboAuthor
Associate III
September 14, 2020

Awesome. Thank you for looking into it for me.

Cheers

David