Skip to main content
OGhis
Senior
September 1, 2019
Question

BUG: STM32G474RE Assert issue when TIM17 is configurated as Timebase source

  • September 1, 2019
  • 12 replies
  • 3062 views

With CubeMx 5.3.0 and library version 1.1.0 for the stm32G474RE was the Timebase Source in system (SYS) configured for TIM17

On running the application is the "assert_failed()" executed.

This assert was called from the 'HAL_NVIC_SetPriority() function.

assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));

The PreemptPriority has a value of 0x10 => initialized by __NVIC_PRIO_BITS.

But the "IS_NVIC_PREEMPTION_PRIORITY" macro tell us that the value should be lower than 0x10.

#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10U)

What is wrong here the the "IS_NVIC_PREEMPTION_PRIORITY" or the "__NVIC_PRIO_BITS" value

This topic has been closed for replies.

12 replies

Amel NASRI
Technical Moderator
October 9, 2019

Hello @OGhis​ ,

Please share your .ioc file in order to reproduce the issue you are facing.

-Amel

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.
OPoch
Associate
October 11, 2019

Hello!

I have the same problem for Timebase Source TIM7.

.ioc file below.

Amel NASRI
Technical Moderator
October 18, 2019

Hello @OGhis​ and @OPoch​ ,

I reported this bug internally. There is the same problem with STM32Cube examples where HAL_InitTick is redefined to configure a timer as a time base source.

Thanks for highlighting it for us.

-Amel

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.
MMitc
Associate III
December 6, 2019

@Amel NASRI​  I am seeing this using TIM1 with FreeRTOS, STMCube Version: 1.1.0 Build: 4551_20191014-1140 (UTC)

Has the correction been released yet?

If not, meanwhile, should I change the priority or remove the assert?

Panometric
Associate III
February 2, 2020

@Amel can we get an update on this? Is it still an unresolved bug after 4 months?

Amel NASRI
Technical Moderator
February 11, 2020

Hello @Panometric​ ,

The fix is already deployed internally, but web release of the package may take some time.

You can anticipate changes reporting issues in Github also (https://github.com/STMicroelectronics/STM32CubeG4).

-Amel

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.
Mathieu Massicotte
Visitor II
February 4, 2020

Same problem here ...

OGhis
OGhisAuthor
Senior
February 10, 2020

See follow link where the issue is produced in the source code:

https://community.st.com/s/question/0D50X0000C6duToSQI/halnvicsetpriority-assert-issue-and-incorrect-preempt-priority-value-for-the-stm32f4-stm32g4-

Please don't remove the assert, otherwise is the priority incorrect configured

OGhis
OGhisAuthor
Senior
March 2, 2020

Not yet resolved in hal lib 1.2.0

Ede S
Associate II
March 26, 2020

Hello, same problem here with FW_F4_V1.25.0 (latest release for STM32F4).