From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24483 invoked by alias); 24 Apr 2013 09:08:11 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Received: (qmail 24440 invoked by uid 89); 24 Apr 2013 09:08:10 -0000 X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 24 Apr 2013 09:08:09 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id AA0AF468000B for ; Wed, 24 Apr 2013 10:08:07 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZNU5zwa1zQn6; Wed, 24 Apr 2013 10:08:07 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1001397] I2C driver for Kinetis microcontrollers Date: Wed, 24 Apr 2013 09:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: NEEDINFO X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: ilijak@siva.com.mk X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013/txt/msg00262.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397 --- Comment #60 from Ilija Kocho --- Created attachment 2206 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2206&action=edit I2C driver print out actual frequency when trace enabled. Increment to attachment 2188. Mike (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. Ilija -- You are receiving this mail because: You are on the CC list for the bug.