This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001397] I2C driver for Kinetis microcontrollers

Please do not reply to this email, use the link below.

--- Comment #60 from Ilija Kocho <> ---
Created attachment 2206
I2C driver print out actual frequency when trace enabled. Increment to
attachment 2188.


(In reply to comment #59)
> After setting CPU clock to 100Khz:
> Freq        Mode         Meas
> 100Khz      Std          98Khz
> 100Khz      Agr          111Khz
> 400Khz      Std          363Khz
> 400Khz      Agr          416Khz

Thank you for the measurements.

> From an application point of view, this is a little problematic, in that:
> - When you set the goal and value, you don't get feedback in the
> configuration that tells you what the result will be. You have to get a
> scope and measure it.
> - If you want to make it more accurate, you have to either guess the correct
> CPU clock, or reverse engineer the algorithm to calculate the required clock
> manually.
> One solution might be to have the configuration calculate the proper CPU
> clock so you can then manually change the clock to get a better result. 

It would be good to have this convenience in CDL but it requires some Tcl
programming, which requires some time...

The second best is to enable some printout at run-time. The attached
incremental patch enables printout of actual I2C clock frequency and period
when trace is enabled.

Note: The printouts that I got are pretty close to what you have measured for
100kHz, but there is a large discrepancy for 400kHz. Can you please and repeat
measurements and check the printouts?

> I am ok with committing the solution as is because I can figure it out for
> 100 and 400 and will have the only answers I need. I think it is just a
> question of how much you want to help the application programmer.

If you are happy with proposed patch and there aren't objections, I would
proceed with commit.


You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]