Skip to main content
Graduate
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

    Technical Moderator
    October 9, 2019

    Hello @OGhis​ ,

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

    -Amel

    Visitor II
    October 11, 2019

    Hello!

    I have the same problem for Timebase Source TIM7.

    .ioc file below.

    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

    Visitor II
    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?

    Visitor II
    February 2, 2020

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

    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

    Visitor II
    February 4, 2020

    Same problem here ...

    OGhisAuthor
    Graduate
    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

    OGhisAuthor
    Graduate
    March 2, 2020

    Not yet resolved in hal lib 1.2.0

    Explorer II
    March 26, 2020

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