Skip to main content
ATkac.3
Associate
June 9, 2021
Question

STM32CubeMX 6.2.1 generate incorrect configuration for HRTIM SYNCOUT pin

  • June 9, 2021
  • 2 replies
  • 1806 views

Hello ST community,

I am use NUCLEO-G474RE, wanted to set up SYNCOUT for HRTIM. You can see the synchro configuration below:

0693W00000BaX8JQAV.jpgTimer A is running, PWM is generated, but nothing happens to SYNCOUT. I start looking at hrtim initialization and notice that there is no configuration for the SYNCOUT pin (PB1).

To fixed the bug add the following code:

 GPIO_InitTypeDef GPIO_InitStruct = {0};

  GPIO_InitStruct.Pin = GPIO_PIN_1;

  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

  GPIO_InitStruct.Pull = GPIO_NOPULL;

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

  GPIO_InitStruct.Alternate = GPIO_AF13_HRTIM1;

  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

I am attaching a project with a fixed bug.

This topic has been closed for replies.

2 replies

Khouloud ZEMMELI
ST Employee
June 9, 2021

Hello @ATkac.3​ ,

Thank your for your post,

I'll check it then I'll get back to you :)

Khouloud

Khouloud ZEMMELI
ST Employee
June 9, 2021

Hi again @ATkac.3​ 

You're right, in fact, the problem is at the GPIO level under CubeMX, which blocks the configuration of this signal and considers it without parameters and consequently it results the absence of these parameters in the generated code. I confirm the issue and it will be fixed.

Many Thanks @ATkac.3​ for bringing this problem to our attention and for your contribution :)

Khouloud