AnsweredAssumed Answered

STM32F103C8T6 Clock Speed Question

Question asked by Burak Günay on Aug 28, 2017
Latest reply on Aug 28, 2017 by Vangelis Fortounas

Hi ;

 

I am so Glad ST has such a great communicative and creative community rather than the other semiconductor manufacturers .. It has been a while since I started to work with Cortex M3 cores ... Of course it is too normal to confront weird problems and having the excite of solving them but sometimes the codes may be really tiring to understand ... 

 

Here what I ran into lately ...

 

There are two attachments in the topic and the code running inside is doing the most simple thing in the world .. On and OFF a GPIO pin .. But one of these projects has been initialized by CubeMX and the other one solely with Keil through "New uVision Project Wizard " ... I have measured the clock outputs of the both projects via MCO pin and they are really operating at 72MHZ .. But here it is ;

 

While the project initialized with CubeMx has the IO pin toggling at 6 MHz with 82nS pulse width , the other one initialized directly Keil toggles at 3.130 Mhz with 151 nS pulse width .... Why almost half ??? Does this have anything to do with delays needed during initialization of the Clock ?? or something else with an interrupt delaying the code line operation or a Flash latency which is not because Flash ACR seems at 2 clocks ...  ?

 

Choking for days , because I really don't want to use CubeMx for the setups ... Please ... Somebody experienced step in and get me out of this endless problematic loop I drown inside ...

 

The Keil I use is 5.22 MDK v5.

The files attached can be found down .

 

Thanks in Advance a thousands of times ...

Attachments

Outcomes