This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001397] I2C driver for Kinetic microcontrollers
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Sat, 31 Mar 2012 18:17:24 +0100
- Subject: [Bug 1001397] I2C driver for Kinetic microcontrollers
- Auto-submitted: auto-generated
- References: <bug-1001397-13@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397
--- Comment #21 from Ilija Kocho <ilijak@siva.com.mk> 2012-03-31 18:17:18 BST ---
(In reply to comment #20)
> Created an attachment (id=1653)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1653) [details]
> Kinetis i2c driver
>
> I have updated the patch against the current cvs, as well as implemented a
> per-device bus speed configuration.
>
> However, I left the cdls and API to use the MULT+ICR values (as per 50.3.2 and
> 50.4.1.10 of the RM) rather then actual frequency -- the ICR value is a
> function of multiple parameters, and there seems to be no obvious way to
> conjure it up from frequency alone.
There is a conflict that requires at least one active I2C bus:
18:46:30> ecosconfig new twr_k60n512
U CYGHWR_HAL_CORTEXM, new inferred value M4
U CYGHWR_HAL_CORTEXM_SYSTICK_CLK_SOURCE, new inferred value INTERNAL
C CYGPKG_DEVS_I2C_FREESCALE_I2C, "requires" constraint not satisfied:
CYGINT_HAL_FREESCALE_I2C_BUS
18:46:30>
Probably something like following would be best fix, but unfortunately
configtool crashes when I try to activate an I2C bus:
--- i2c_freescale_org.cdl 2012-03-31 18:15:45.364128606 +0200
+++ i2c_freescale.cdl 2012-03-31 18:53:28.388222427 +0200
@@ -46,10 +46,17 @@
#####DESCRIPTIONEND####
# ====================================================================
+cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS {
+ display "Number of I2C buses"
+}
+
cdl_package CYGPKG_DEVS_I2C_FREESCALE_I2C {
display "I2C driver for Freescale Kinetis and ColdFire+ chips"
parent CYGPKG_IO_I2C
requires CYGPKG_IO_I2C
+
+ active_if CYGINT_HAL_FREESCALE_I2C_BUS
+
include_dir cyg/io
description "
This package provides a generic I2C device driver for the on-chip
@@ -57,12 +64,6 @@
compile -library=libextras.a i2c_freescale.c
- cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS {
- display "Number of I2C buses"
- }
-
- requires CYGINT_HAL_FREESCALE_I2C_BUS
-
cdl_option CYGPKG_DEVS_I2C_FREESCALE_I2C_TRACE {
display "I2C trace"
flavor bool
Then I tried the following:
--- i2c_freescale_org.cdl 2012-03-31 18:15:45.364128606 +0200
+++ i2c_freescale.cdl 2012-03-31 18:56:09.916229122 +0200
@@ -46,10 +46,17 @@
#####DESCRIPTIONEND####
# ====================================================================
+cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS {
+ display "Number of I2C buses"
+}
+
cdl_package CYGPKG_DEVS_I2C_FREESCALE_I2C {
display "I2C driver for Freescale Kinetis and ColdFire+ chips"
parent CYGPKG_IO_I2C
requires CYGPKG_IO_I2C
+
+ requires CYGPKG_HAL_CORTEXM_KINETIS
+
include_dir cyg/io
description "
This package provides a generic I2C device driver for the on-chip
@@ -57,12 +64,6 @@
compile -library=libextras.a i2c_freescale.c
- cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS {
- display "Number of I2C buses"
- }
-
- requires CYGINT_HAL_FREESCALE_I2C_BUS
-
cdl_option CYGPKG_DEVS_I2C_FREESCALE_I2C_TRACE {
display "I2C trace"
flavor bool
I hope you'll find better fix, otherwise If this is good enough I could prepare
updated patch.
Ilija
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.