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:
Timer 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.
