Skip to main content
Tom V
Associate
Nov 12, 2019 5:12 PM UTC
Question

Generated code doesn't call HAL_NVIC_SetPriorityGrouping

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
Dec 10, 2019 12:48 PM UTC

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

AMacI.1
Associate
Jan 4, 2020 10:02 PM UTC

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.