public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001268] New: I2C driver for STM32 Cortex M3
@ 2011-06-21 15:58 bugzilla-daemon
  2011-06-21 20:30 ` [Bug 1001268] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2011-06-21 15:58 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

           Summary: I2C driver for STM32 Cortex M3
           Product: eCos
           Version: CVS
          Platform: stm32e_eval (ST STM3210E EVAL board)
        OS/Version: Cortex-M
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: low
         Component: Patches and contributions
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: roscmar@gmail.com
                CC: ecos-patches@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=1291)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1291)
Patch for STM32 I2C driver package

Attached with this is a patch which includes the I2C driver package for the
STM32 Cortex M3 microcontroller and the necessary register field definitions in
the variant header file.
It has been tested on a ST STM3210E EVAL board.

The driver implements the I2C Master using either interrupts or register
polling.
The I2C Host and the DMA mode are not implemented (yet).

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1001268] I2C driver for STM32 Cortex M3
  2011-06-21 15:58 [Bug 1001268] New: I2C driver for STM32 Cortex M3 bugzilla-daemon
@ 2011-06-21 20:30 ` bugzilla-daemon
  2011-06-21 20:43 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2011-06-21 20:30 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john@dallaway.org.uk

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2011-06-21 21:30:19 BST ---
Martin, thank you for your contribution to eCos which will be reviewed in due
course.

We will need a copyright assignment from you before we can add this to the eCos
repository. Can you confirm that you are able to make an assignment please?
Details at: http://ecos.sourceware.org/contrib.html

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1001268] I2C driver for STM32 Cortex M3
  2011-06-21 15:58 [Bug 1001268] New: I2C driver for STM32 Cortex M3 bugzilla-daemon
  2011-06-21 20:30 ` [Bug 1001268] " bugzilla-daemon
@ 2011-06-21 20:43 ` bugzilla-daemon
  2011-06-22 13:05 ` bugzilla-daemon
  2013-04-03 16:28 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2011-06-21 20:43 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

--- Comment #2 from John Dallaway <john@dallaway.org.uk> 2011-06-21 21:42:47 BST ---
Martin, do you have an STM3210E-EVAL board or was the I2C driver coded against
another hardware platform? I was thinking it would be useful to add an eCos
test case to the STM3210E-EVAL platform HAL which illustrates use of the driver
by reading the on-board temperature sensor.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1001268] I2C driver for STM32 Cortex M3
  2011-06-21 15:58 [Bug 1001268] New: I2C driver for STM32 Cortex M3 bugzilla-daemon
  2011-06-21 20:30 ` [Bug 1001268] " bugzilla-daemon
  2011-06-21 20:43 ` bugzilla-daemon
@ 2011-06-22 13:05 ` bugzilla-daemon
  2013-04-03 16:28 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2011-06-22 13:05 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

--- Comment #3 from Martin Rösch <roscmar@gmail.com> 2011-06-22 14:05:33 BST ---
(In reply to comment #2)
> Martin, do you have an STM3210E-EVAL board or was the I2C driver coded against
> another hardware platform? I was thinking it would be useful to add an eCos
> test case to the STM3210E-EVAL platform HAL which illustrates use of the driver
> by reading the on-board temperature sensor.

John, yes I have an STM3210E-EVAL board at hand and I have developed the driver
against that board. I tried to communicate with the temperature sensor, but due
to a limitation of the microcontroller, it is not possible to use the I2C1 bus
when the FSMC is activated (see Errata Sheet of the STM32F101xC/D/E in section
2.6.9).

So, to test, I modified the Eval Board and connected an external I2C device.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
>From ecos-bugs-return-8072-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Jun 22 13:08:29 2011
Return-Path: <ecos-bugs-return-8072-listarch-ecos-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-ecos-bugs@sources.redhat.com
Received: (qmail 4297 invoked by alias); 22 Jun 2011 13:08:28 -0000
Received: (qmail 4257 invoked by uid 22791); 22 Jun 2011 13:08:28 -0000
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0
	tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197)
    by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jun 2011 13:08:09 +0000
Received: by mail.ecoscentric.com (Postfix, from userid 48)
	id B7F672F78020; Wed, 22 Jun 2011 14:08:08 +0100 (BST)
X-Original-To: unassigned@bugs.ecos.sourceware.org
Delivered-To: unassigned@bugs.ecos.sourceware.org
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: unassigned@bugs.ecos.sourceware.org
Subject: [Bug 1001268] I2C driver for STM32 Cortex M3
X-Bugzilla-Reason: AssignedTo
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: roscmar@gmail.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: low
X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
In-Reply-To: <bug-1001268-777@http.bugs.ecos.sourceware.org/>
References: <bug-1001268-777@http.bugs.ecos.sourceware.org/>
X-Bugzilla-URL: http://bugs.ecos.sourceware.org/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Date: Wed, 22 Jun 2011 13:08:00 -0000
Message-Id: <20110622130807.04E8A2F7800C@mail.ecoscentric.com>
Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <ecos-bugs.sourceware.org>
List-Subscribe: <mailto:ecos-bugs-subscribe@sourceware.org>
List-Post: <mailto:ecos-bugs@sourceware.org>
List-Help: <mailto:ecos-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: ecos-bugs-owner@sourceware.org
Delivered-To: mailing list ecos-bugs@sourceware.org
X-SW-Source: 2011/txt/msg00982.txt.bz2
Content-length: 773

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

--- Comment #4 from Martin Rösch <roscmar@gmail.com> 2011-06-22 14:08:05 BST ---
(In reply to comment #1)
> Martin, thank you for your contribution to eCos which will be reviewed in due
> course.
> 
> We will need a copyright assignment from you before we can add this to the eCos
> repository. Can you confirm that you are able to make an assignment please?
> Details at: http://ecos.sourceware.org/contrib.html

John, yes I will make that assignment soon.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
>From ecos-bugs-return-8073-listarch-ecos-bugs=sources.redhat.com@sourceware.org Thu Jun 30 23:55:34 2011
Return-Path: <ecos-bugs-return-8073-listarch-ecos-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-ecos-bugs@sources.redhat.com
Received: (qmail 3917 invoked by alias); 30 Jun 2011 23:55:34 -0000
Received: (qmail 3907 invoked by uid 22791); 30 Jun 2011 23:55:33 -0000
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0
	tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197)
    by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 23:55:19 +0000
Received: by mail.ecoscentric.com (Postfix, from userid 48)
	id 1D44B2F7800E; Fri,  1 Jul 2011 00:55:18 +0100 (BST)
X-Original-To: unassigned@bugs.ecos.sourceware.org
Delivered-To: unassigned@bugs.ecos.sourceware.org
From: bugzilla-daemon@ecoscentric.com
To: unassigned@bugs.ecos.sourceware.org
Subject: Your Issue Management System issue list needs attention.
X-Bugzilla-Type: whine
X-Bugzilla-URL: http://bugzilla.ecoscentric.com/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
Date: Thu, 30 Jun 2011 23:55:00 -0000
Message-Id: <20110630235504.25B752F78015@mail.ecoscentric.com>
Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <ecos-bugs.sourceware.org>
List-Subscribe: <mailto:ecos-bugs-subscribe@sourceware.org>
List-Post: <mailto:ecos-bugs@sourceware.org>
List-Help: <mailto:ecos-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: ecos-bugs-owner@sourceware.org
Delivered-To: mailing list ecos-bugs@sourceware.org
X-SW-Source: 2011/txt/msg00983.txt.bz2
Content-length: 2284

[This e-mail has been automatically generated.]

You have one or more issues assigned to you in the Issue Management System issue tracking system (http://bugzilla.ecoscentric.com/) that require
attention.

All of these issues are in the NEW or REOPENED state, and have not been
touched in 7 days or more.
You need to take a look at them, and decide on an initial action.

Generally, this means one of three things:

(1) You decide this issue is really quick to deal with (like, it's INVALID),
    and so you get rid of it immediately.
(2) You decide the issue doesn't belong to you, and you reassign it to
    someone else. (Hint: if you don't know who to reassign it to, make
    sure that the Component field seems reasonable, and then use the
    "Reset Assignee to default" option.)
(3) You decide the issue belongs to you, but you can't solve it this moment.
    Accept the issue by setting the status to ASSIGNED.

To get a list of all NEW/REOPENED issues, you can use this URL (bookmark
it if you like!):
http://bugzilla.ecoscentric.com/buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=unassigned@bugs.ecos.sourceware.org

Or, you can use the general query page, at
http://bugzilla.ecoscentric.com/query.cgi

Appended below are the individual URLs to get to all of your NEW issues
that haven't been touched for 7 days or more.

You will get this message once a day until you've dealt with these issues!

 STM32 USB driver unplugging/replugging issue
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001084
 Navigation of the documentation using PREV NEXT PARENT arrows broken
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001146
 help documentation tree does not correspond to viewed document
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001148
 documentation tree in navigation panel does not open at viewed document
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001149
 CAN loopback driver requires CYGPKG_DEVS_CAN_LOOP_CAN[01]
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001211
 "i386 PC Hardware Setup" is out of date
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001254
 objloader: cyg_ldr_relocate_section() can return success on fails
    -> http://bugzilla.ecoscentric.com/show_bug.cgi?id\x1001257


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 1001268] I2C driver for STM32 Cortex M3
  2011-06-21 15:58 [Bug 1001268] New: I2C driver for STM32 Cortex M3 bugzilla-daemon
                   ` (2 preceding siblings ...)
  2011-06-22 13:05 ` bugzilla-daemon
@ 2013-04-03 16:28 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-04-03 16:28 UTC (permalink / raw)
  To: unassigned

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

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001268

--- Comment #5 from Mike Jones <mjones@linear.com> ---
Created attachment 2151
  --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2151&action=edit
Update STM32 I2C Support

I tried to contact Martin to see if he had updated code he was willing to
contribute, etc, but so far no reply. I am posting a patch. The patch contains:

- Updated init function and base defines so that the I2C support works on a
STM3240G-EVAL and should work for other STM32F4XX devices.
- Attempted to preserve STM32F1XX support but have no means to test
- Added support for SMBus timeout
- Fixed fast mode clock calculation
- Tested with PMBus/SMBus application consisting of three devices
- Tested with polling and interrupt driven modes
- Added loopback test for others to use

Some areas that may warrant change.

- The alternate pin assignments are set to the other two pins, but this is not
flexible in that it will not adapt to a custom design. It could be improved to
enter arbitrary pins in the CDL.
- The second I2C is not set to any particular pins of importance and could use
the same flexibility.
- The ACK portion of the I2C API is not active in the code. This prevents
lockups. If there is ever a reason to allow control it could be added, but it
needs some thought as to how to prevent lockup.
- The clock speed is ignored if changed in the instantiation of the i2c struct.
A code override may be added in the future if desired.

There is an inconsistency with the Kinetis driver. Kinetis I2C takes a period
in the CDL. I think this should be changed to frequency and will change it when
other work by Ilija completes.

On the eval board this code was reliable in with a real application. Overtime
it will get more use and I will fix anything I find. I would not hesitate to
use the patch if you need I2C on this platform. However, if anyone has a board
with STM32F1XX it would help to test this patch to ensure that version still
works. The difference between F1 and F4 is in the GPIO configuration registers.
I made almost no changes to the core code, so if it does not work, it is almost
certain to be in the init code.

I believe Martin has an assignment. I have one. So we should be able to get
this into the codebase.

-- 
You are receiving this mail because:
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-03 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 15:58 [Bug 1001268] New: I2C driver for STM32 Cortex M3 bugzilla-daemon
2011-06-21 20:30 ` [Bug 1001268] " bugzilla-daemon
2011-06-21 20:43 ` bugzilla-daemon
2011-06-22 13:05 ` bugzilla-daemon
2013-04-03 16:28 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).