Skip to main content
Tom V
Associate
November 12, 2019
Question

Generated code doesn't call HAL_NVIC_SetPriorityGrouping

  • November 12, 2019
  • 2 replies
  • 1079 views

BUG REPORT:

Using STM32CubeIDE 1.1.0 with a new STM32F401VE project, under the CubeMX perspective, when I change the system core priority grouping, it correctly limits the range of values that I can enter for the interrupt pre-emption priority and sub-priority for the various enabled interrupts.

If I click save it correctly writes the setting to the ioc file, but when I regenerate the code it doesn't actually issue a call to HAL_NVIC_SetPriorityGrouping (or equivalent), so the setting never happens to the hardware when the project is run.

Can anyone reproduce this, or fix it?

Thanks,

This topic has been closed for replies.

2 replies

FLast.2
Associate II
December 10, 2019

I encountered this problem too, in STM32CubeIDE 1.1.0. It seems that it is the problem of STM32CubeMX.

AMacI.1
Associate
January 4, 2020

I noticed this problem with STM32CubeMX 5.4.0. The code generated by the previous MX version did call HAL_NVIC_SetPriorityGrouping. I added the call to /* USER CODE BEGIN MspInit 1 */ as a workaround.