AnsweredAssumed Answered

Master Clock Output issue

Question asked by Arnold Bischof on Nov 12, 2016
Latest reply on Nov 16, 2016 by Arnold Bischof

I configured RCC Master Clock Output within cubeMX 4.17.0 and using a STM32F303.
 
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

 

Outcomes