2015-07-29 07:08 AM
hi' i'm new stm32f0 user and i working on stm32f072 , my first question what is value of system clock of microcontroller when i use system_stm32f0xx.c file which found in
stm32f0_stdperiph_lib\STM32F0xx_StdPeriph_Lib_V1.5.0\Projects\STM32F0xx_StdPeriph_Examples code example , i know the table in top of this file tell me that the freq is 48000000 HZ but when i toggal any pin from main loop like this {GPIOA->ODR ^= 0xffff;}and i see the output in oscilloscope the freq is 400 KHZ and when i toggale like this {GPIOA->BSRR;GPIOA->BRR; }the freq is 1MHZ what is the fault? and what is the real speed of microcontroller?2015-07-29 07:18 AM
Toggling pins is not a good metric for how fast the processor is running. You'd have to look at the assembler code generated by the compiler to understand what inefficiencies are coming from than.
If you want to physically confirm them, use the MCO (PA8) pin and export the internal clocks.If you want to see what the current settings of the PLL and peripheral buses are, use the RCC_GetClocks() or equivalent API function and print them out.