cancel
Showing results for 
Search instead for 
Did you mean: 

Master Clock Output issue

Arnold Bischof
Associate III
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

2 REPLIES 2
slimen
Senior
Posted on November 14, 2016 at 15:17

Hello,

Referring to the

http://www.st.com/content/ccc/resource/technical/document/datasheet/group3/38/c6/ca/d1/f7/d5/4e/30/DM00092070/files/DM00092pdf/jcr:content/translations/en.DM00092pdf

: 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=false
Arnold Bischof
Associate III
Posted on November 16, 2016 at 08:04

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.

Regards