This is the mail archive of the ecos-discuss@sources.redhat.com 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]

RE: Problem about installing the eCOS interrupt handler


Thank you very much Jonathan. The IOPCON is already defined as: #define
IOPCON	((volatile unsigned *)(SYSCFG + 0x5004))
In ARME7T IOPCON is in charge of the interrupt setting: enable/disable,
level trigered/edge trigered, filter setting.
But when I set the IOPCON register directily by the following command:

*IOPCON = 0x10;
// the register will be set and the program can access the interrupt. means
the program works.

I don't know why so could anybody give me some idea? Thanks a lot!


Best regards!


-----Original Message-----
From: jlarmour@cambridge.redhat.com [mailto:jlarmour@cambridge.redhat.com]On
Behalf Of Jonathan Larmour
Sent: 03 October 2001 17:03
To: HuangQiang
Cc: eCos
Subject: Re: [ECOS] Problem about installing the eCOS interrupt handler


HuangQiang wrote:
>
> Hi all:
>    I am using ARME7T board at the moment. I have tried to install external
> INT0 in eCOS program but I encounter some strange problem so could anybody
> have a look of it for me? Thank you very much! Following are the source
> code:

Two potential problems: it could be cached, or it could be the compiler
optimizing the access away because you may not be using "volatile".

Try using the definitions in <cyg/hal/plf_io.h>. and make sure IOPCON is a
*volatile* pointer. I assume you're printing out its contents in a loop
somewhere - using insight to prod its value may not cause the value of
cpuval to change if the compiler detects that cpuval is not used.

(NB I don't know what IOPCON *does* on the e7t, but I assume you know what
you're doing in that respect).

Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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