STMicroelectronics / STM32CubeF4

STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
827 stars 409 forks source link

uwTickPrio not set when using alternate system timebase source #78

Closed akudlacek closed 2 years ago

akudlacek commented 3 years ago

I tested on STM32F429I-DISC1 board and one of my own design. IDE: STM32CubeIDE V1.6.1 MCU: STM32F429ZITx FW Package: STM32Cube FW_F4 V1.26.1

How To Reproduce

  1. Default cubemx project with all peripherals in their default mode.
  2. Full assert must be enabled and I put asm("BKPT"); within the assert_failed function in main.c
  3. Debug run and it will crash

Additional context System timebase source has to be different than systick. This is not the first occurrence of this bug see: STM32CubeF4 closed issue

This has also been seen on other cubemx MCU families STM32CubeF1 STM32CubeF7

A work around is to set uwTickPrio to 15 between HAL_Init() and SystemClock_Config() in main.c

I think this should be enough and since it appears to have been fixed in STM32CubeF7 I think the same could be applied here although I did not look to see what that looked like.

RKOUSTM commented 3 years ago

Hi @akudlacek,

Thank you for your contribution. After investigation, the point you reported is related to the CubeMX generation problem.

This point has ben reported to CubeMX development teams who will take in charge the issue.

An internal tracker has been logged and a fix will be implemented and made available in the frame of a future release of CubeMX.

Thank you once again for your contribution.

With regards,

RKOUSTM commented 3 years ago

ST Internal Reference: 110035