Skip to main content
Associate II
August 28, 2026
Solved

Changes to SVCall_IRQn Preemption Priority trigger assert

  • August 28, 2026
  • 3 replies
  • 15 views

CubeMX allows the user to change the Preemtion Priority of the “System service call via SWI instruction” / SVCall_IRQn.
When its not at the default value of 0, CubeMX generates this HAL_NVIC_SetPriority(SVCall_IRQn, X, X); inside HAL_MspInit(). When USE_FULL_ASSERT is enabled this function call triggers an assert. Namely assert_param(IS_NVIC_PRIO_INTERRUPT(IRQn)) where IRQn is SVCall_IRQn and IS_NVIC_PRIO_INTERRUPT(X) checks if IRQn is != to SVCall_IRQn.

I noticed this on a STMU385, using CubeMX version 6.18.1

Best Regards, Cecil

Best answer by Ghofrane GSOURI

Hello ​@CecilW 

Your valuable contribution is much appreciated.

A ticket  #0065391 has been escalated to dev team for further investigation.

I will keep you posted with updates.

THX

Ghofrane

3 replies

Ghofrane GSOURI
ST Technical Moderator
August 28, 2026

Hello ​@CecilW 

Could you please share your IOC in order to reproduce this behavior.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
CecilWAuthor
Associate II
August 28, 2026

Hi Ghofrane

Thank you for the fast reply.

I created a minimal .ioc and it also shows the same behaviour. To reproduce simply change the SVCall_IRQn prio to something other than 0 and it will generate the function containing the failing assert.

Best Regards, Cecil

Ghofrane GSOURI
Ghofrane GSOURIBest answer
ST Technical Moderator
August 28, 2026

Hello ​@CecilW 

Your valuable contribution is much appreciated.

A ticket  #0065391 has been escalated to dev team for further investigation.

I will keep you posted with updates.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.