Advanced Users can post their questions and comments here for the not so Newbie crowd.

Moderator: eriksl

User avatar
By RBMK
#92249 Hmmm, so, how much parameters the function takes? i mean to debug it on C. Until now i was doing all my tests with just one parameter, the desired number in MHz maybe it take some other?
User avatar
By RBMK
#92250
eriksl wrote:I would already be very happy with the CPU running at 400 Mhz and even more if we can keep the APB at 80 Mhz.

I have the code now in front of me. The very first thing that strikes me is that the code is laced with calls to gcc floating point calculation/conversion functions. Very weird. Also some of the code in the routine is garbage, I assume it's data storage, not code.


Maybe the floating point is becouse some dividers result on float numbers, for example 1040/15 would be 69.33... MHz
Last edited by RBMK on Wed Sep 08, 2021 11:36 am, edited 1 time in total.
User avatar
By eriksl
#92251 I'd expect that such calculations would be done in fixed point arithmetic (i.e. multiply all number by a constant so you don't get a fraction).
User avatar
By RBMK
#92252
eriksl wrote:I'd expect that such calculations would be done in fixed point arithmetic (i.e. multiply all number by a constant so you don't get a fraction).


Yhea, exactly but is the only way to explain the floating point