-->
Page 7 of 16

Re: rom_i2c funcs?

PostPosted: Wed Sep 08, 2021 11:04 am
by RBMK
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?

Re: rom_i2c funcs?

PostPosted: Wed Sep 08, 2021 11:32 am
by RBMK
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

Re: rom_i2c funcs?

PostPosted: Wed Sep 08, 2021 11:35 am
by eriksl
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).

Re: rom_i2c funcs?

PostPosted: Wed Sep 08, 2021 11:38 am
by RBMK
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