cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: STM32CubeMX 6.8.1 STM32G431 TIM1 LL init code generation

KnarfB
Principal III

how to reproduce:

  • generate a new C project for Nucleo-G431RB with all default settings.
  • enable TIM1 with internal clock source
  • set the prescaler to 170-1
  • set code generation for TIM to LL

generated code:

 

 

  /* USER CODE END TIM1_Init 1 */
  TIM_InitStruct.Prescaler = 170-LL_TIM_ETR_FILTER_FDIV1_N2;

 

 

which is incorrect (and finally killed a motor driver). For HAL code generation, everything looks fine:

 

 

  /* USER CODE END TIM1_Init 1 */
  htim1.Instance = TIM1;
  htim1.Init.Prescaler = 170-1;

 

 

Fun fact: Attaching the .ioc, .zip or .tar failed:

 

The attachment's tim1_bug.tar content type (application/x-tar) does not match its file extension and has been removed.

 

KnarfB

1 ACCEPTED SOLUTION

Accepted Solutions
Semer CHERNI
ST Employee

Hello @KnarfB 

First let me thank you for posting.

I'm able to reproduce the described misbehavior. This issue need to be fixed from future releases. But in the meanwhile, you will need to change the cell parameter to "No check" as shown in the screenshot bellow.

SemerCHERNI_0-1688375870551.png

Whit this been said, I will raise the issue internally for analysis and fix. Internal tickets number: 1156332 (This is an internal tracking number and is not accessible or usable by customers).

KR,

Semer.

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.

View solution in original post

1 REPLY 1
Semer CHERNI
ST Employee

Hello @KnarfB 

First let me thank you for posting.

I'm able to reproduce the described misbehavior. This issue need to be fixed from future releases. But in the meanwhile, you will need to change the cell parameter to "No check" as shown in the screenshot bellow.

SemerCHERNI_0-1688375870551.png

Whit this been said, I will raise the issue internally for analysis and fix. Internal tickets number: 1156332 (This is an internal tracking number and is not accessible or usable by customers).

KR,

Semer.

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.