2016-11-12 11:34 AM
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 stm32f3032016-11-14 6:17 AM
Hello,
Referring to the : PA8 is configured as AF0: MCO Alternate Function. The specific alternate function assignments for each pin are detailed in the device datasheet, ''Table Alternate functions''and ''Table STM32F303x6/8 pin definitions''. I have checked from my side and Icannot reproduce this issue (attached .ioc file).Could you please share your .ioc to check with you this case.
Regards ________________ Attachments : rcc.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HteS&d=%2Fa%2F0X0000000aSE%2Fhn5mmstvKoW06GL1oHpXRe_FIlCRrbFJ2hzGxULa03U&asPdf=false2016-11-15 11:04 PM
Hello,
I re-tested and now the MCO output works. The problem was the speed setting of the pin. It seems to be all right now.
Thank you very much.
RegardsWe’re moving the ST Community to a new platform to give you a better and more reliable community experience.