Question
Master Clock Output issue
Posted on November 12, 2016 at 20:34
I configured RCC Master Clock Output within cubeMX 4.0 and using a STM32F
The generated Code does not output the selected clock. I have found, after code analysis of generated file gpio.c, that the Alternate function for PA8 in MX_GPIO_Init() is not as expected./*Configure GPIO pin : PA8 */
GPIO_InitStruct.Pin = GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate =GPIO_AF0_TRACE;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);After changing the Alternate Function of PA8 to
GPIO_InitStruct.Alternate =
GPIO_AF0_MCO;
the Master Clock Output works as expected.
Regards AB
cubemx stm32f303