#define PLLdiv2 0x07000000 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~ OUTPUT PINS ~~~~~ */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE); /* ENABLE CLK PORTS */ RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA,DISABLE); /* NO RESET PORTS */ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; /* MAX VEL ESCRITURA */ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; /* ALTERNATE OUTPUT PUSH-PULL */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; GPIO_Init(GPIOA, &GPIO_InitStructure); RCC->CFGR |= sysclk; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ I configure the PA.8 pin as ALTERNATE OUTPUT PUSH-PULL like RM0008 on pag 147. Then I configure RCC_CFGR.MCO with some diferents values to watch the microcontroller clock output, like RM0008 in pag 85. I´m doing well?? I see on oscilloscope the sysclk signal to 72MHz. It varies between 71,70Mhz to 72,70MHz in instant measures, and in average mode, i see 72,30MHz. Is it normal??
This is to let you know that your exceeding the MCO Output maximum Frequency and you running it out of the specification. The maximum output of our MCO is limited to 50Mhz only as any I/O. Please refer to Datasheet, Section - Table : '' I/O AC characteristics''. Regards, STOne-32.
Yes but you were complaining about jitter. You can't complain about performance (or expect any reliability -- especially across multiple parts) if you are running outside of specification.
Ok, so to watch 72MHz sysclk signal I must to select in RCC_CFGR.MCO=111 to see PLL clock divided by 2 to see 36MHz, because the maximum speed of GPIO write.
Thks. To answer another question my answer was that it is normal to see 72,70MHz instead 72MHz teorical. Thks to all dudes
() with the RCC_MCO_PLLCLK_Div2 argument to get a 36MHz output on PA8. I assume you used RCC_MCO_SYSCLK instead (i.e. 72MHz). I'm sure the waveform you're getting in more sine that square. ST-One is correct you should not output more than 50MHz to a port pin as the rise-fall times will distort the waveform.
I'm a little confused about what you are asking. Are you asking if the variance you are seeing is normal OR are you asking if 72MHz is normal. If you didn't expect to see 72MHz what frequency were you expecting to see? Regards Trevor