This is the mail archive of the ecos-bugs@sourceware.org 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 1001387] Kinetis Interrupt vector enumeration incorrect


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

--- Comment #1 from Ilija Kocho <ilijak@siva.com.mk> 2011-11-16 20:43:55 GMT ---
(In reply to comment #0)
> In the Kinetis port (using TWRK60N512), the enum KinetisExtInterrupt_e, and
> consequently the vectors returned by CYGHWR_HAL_KINETIS_PIN_IRQ_VECTOR() seem
> incorrect; for example, for PORTA returned value is 88, but should be 103. I
> suspect this is because the platform does not define
> CYGNUM_HAL_INTERRUPT_SYS_TICK and CYGNUM_HAL_INTERRUPT_EXTERNAL; the fallback
> arm values for these are 0 and 1 respectively, while the Kinetis values should
> be 15 and 16 respectively.

Tomas

It's a matter of different enumerations:

In Freescale's headers, the interrupt (and exception) numbers simply begin from
0 (including Stack Pointer reset value).

ARM CMSIS standard begins counting from -14 (NMI) that places SysTick at -1 and
makes External Interrupts start at 0.

eCos has separate enumerations for system exceptions and interrupt vectors (see
hal/cortexm/arch/<version>/include/hal_intr.h). In the same file you will find
definitions for CYGNUM_HAL_INTERRUPT_SYS_TICK (0) and
CYGNUM_HAL_INTERRUPT_EXTERNAL (1), hence External Interrupt enumeration starts
from 1.

Speaking of Kinetis interrupt enumeration one additional clarification just
FAOD. /Reserved/ interrupts remain with their original names i.e.
.._Reserved108 follows .._PORTE in order to maintain correspondence with
Freescale's names. Simply regard them as names not numbers. With the time, some
of them, as new devices appear, may be assigned by Freescale to new
peripherals. Even the present list is an union of two devices: K60 and K40.

Ilija

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


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