public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] What interrupt options need to be enabled ?
@ 2007-09-03  7:47 ariga masahiro
  2007-09-04  7:16 ` ariga masahiro
  0 siblings, 1 reply; 3+ messages in thread
From: ariga masahiro @ 2007-09-03  7:47 UTC (permalink / raw)
  To: ecos-discuss

Hi,

Please help me next problems.

I've been informed that when built with "net" Template,
eCos uses TCP/IP interrupt routine at default.

But although I setted ISR routine in vector table,
it appeares never enter into ISR.

My target uses IRQ 3 for ethernet interrupt so I setted vector table like 
below
in devs_eth_mytarget.inl.

-- in devs_eth_mytarget.inl
static lan91cxx_priv_data lan91cxx_eth0_priv_data = {
    config_enaddr : inserter_get_ESA,
#ifndef CYGSEM_DEVS_ETH_SH_INSERTER_REDBOOT_ESA
    enaddr: CYGDAT_DEVS_ETH_SH_INSERTER_ESA,
#endif

#if 0
   base : (unsigned short *) SA1110_FHH_ETH_IOBASE,
   attbase : (unsigned char *) SA1110_FHH_ETH_MMBASE,
   interrupt : SA1110_IRQ_GPIO_ETH
#else
   base : (unsigned short *) 0xa8000000,
//set vector number: (0x660/32)-14
   interrupt : 37,
#endif
};
--

And I checked next operations was executed  to register vector table
in /devs/eth/smsc/lan91cxx/v2_0/src/if_lan91cxx.c

-- in if_lan91cxx.c
    // Initialize environment, setup interrupt handler
    cyg_drv_interrupt_create(cpd->interrupt,
                            99, // Priority - what goes here?
                             (cyg_addrword_t)sc, //  Data item passed to 
interrupt handler
                             (cyg_ISR_t *)lan91cxx_isr,
                             (cyg_DSR_t *)eth_drv_dsr, // The logical driver 
DSR
                             &lan91cxx_interrupt_handle,
                             &lan91cxx_interrupt);
    cyg_drv_interrupt_attach(lan91cxx_interrupt_handle);
#endif // !CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
    cyg_drv_interrupt_acknowledge(cpd->interrupt);
#ifndef CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
    cyg_drv_interrupt_unmask(cpd->interrupt);
-- 

I perused documents again and became perplexed.
Says there are interrupt options like CYGPKG_HAL_COMMON_INTERRUPTS.
But never clearly says whether I should enable it or not.
I checked in hal.cdl and found it is setted like below.

Now I don't know this setting enables interrupts or not.
Should I need to enable this option ?
But how ?

-- in hal.cdl
    cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
        display       "HAL interrupt handling"
        flavor        none
        description   "
            A number of configuration options related to interrupt
            handling are common to most or all HAL packages, even though
            the implementations will vary from architecture to
            architecture."

        script        interrupts.cdl
    }
--

And if there are any other options that I should enable specifically,
please le me know them.

I ask you one more favor,
if there are any way to ensure that interrupt is operating,
please teach me how should I do.

Masahiro Ariga


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] What interrupt options need to be enabled ?
  2007-09-03  7:47 [ECOS] What interrupt options need to be enabled ? ariga masahiro
@ 2007-09-04  7:16 ` ariga masahiro
  2007-09-04  7:39   ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: ariga masahiro @ 2007-09-04  7:16 UTC (permalink / raw)
  To: ecos-discuss

Hi,

Since I sent my previous mail I am still in the same condition.
I am completely in a predicament--I got stuck.
So I beseech you to give me hints even as slightest as possible.
I re-send first mail.

As a basic premise,I assumed SH CPU's Interrupt Vector Service Routine(VSR)
is cyg_hal_default_interrupt_vsr in 
/cygwin/opt/ecos/ecos-2.0/packages/hal\sh/arch/v2_0/src/vectors.S.

It is setted by .macro hal_mon_init
(/cygwin/opt/ecos/ecos-2.0/packages/hal/sh/inserter/current/include/platform.inc 
153-203 lines).

I am sure as far as using RedBoot it is true,
but I am not sure it is also true in case of application built with "net" 
template.

Am I right to conclude it is true in both cases ?

From this below is my previous mail.

I've been informed that when built with "net" Template,
eCos uses TCP/IP interrupt routine at default.

But although I setted ISR routine in vector table,
it appeares never enter into ISR.

My target uses IRQ 3 for ethernet interrupt so I setted vector table like
below
in devs_eth_mytarget.inl.

-- in devs_eth_mytarget.inl
static lan91cxx_priv_data lan91cxx_eth0_priv_data = {
    config_enaddr : inserter_get_ESA,
#ifndef CYGSEM_DEVS_ETH_SH_INSERTER_REDBOOT_ESA
    enaddr: CYGDAT_DEVS_ETH_SH_INSERTER_ESA,
#endif

#if 0
   base : (unsigned short *) SA1110_FHH_ETH_IOBASE,
   attbase : (unsigned char *) SA1110_FHH_ETH_MMBASE,
   interrupt : SA1110_IRQ_GPIO_ETH
#else
   base : (unsigned short *) 0xa8000000,
//set vector number: (0x660/32)-14
   interrupt : 37,
#endif
};
--

And I checked next operations was executed  to register vector table
in /devs/eth/smsc/lan91cxx/v2_0/src/if_lan91cxx.c

-- in if_lan91cxx.c
    // Initialize environment, setup interrupt handler
    cyg_drv_interrupt_create(cpd->interrupt,
                            99, // Priority - what goes here?
                             (cyg_addrword_t)sc, //  Data item passed to
interrupt handler
                             (cyg_ISR_t *)lan91cxx_isr,
                             (cyg_DSR_t *)eth_drv_dsr, // The logical driver
DSR
                             &lan91cxx_interrupt_handle,
                             &lan91cxx_interrupt);
    cyg_drv_interrupt_attach(lan91cxx_interrupt_handle);
#endif // !CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
    cyg_drv_interrupt_acknowledge(cpd->interrupt);
#ifndef CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
    cyg_drv_interrupt_unmask(cpd->interrupt);
-- 

I perused documents again and became perplexed.
Says there are interrupt options like CYGPKG_HAL_COMMON_INTERRUPTS.
But never clearly says whether I should enable it or not.
I checked in hal.cdl and found it is setted like below.

Now I don't know this setting enables interrupts or not.
Should I need to enable this option ?
But how ?

-- in hal.cdl
    cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
        display       "HAL interrupt handling"
        flavor        none
        description   "
            A number of configuration options related to interrupt
            handling are common to most or all HAL packages, even though
            the implementations will vary from architecture to
            architecture."

        script        interrupts.cdl
    }
--

And if there are any other options that I should enable specifically,
please le me know them.

I ask you one more favor,
if there are any way to ensure that interrupt is operating,
please teach me how should I do.

Masahiro Ariga



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] What interrupt options need to be enabled ?
  2007-09-04  7:16 ` ariga masahiro
@ 2007-09-04  7:39   ` Andrew Lunn
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2007-09-04  7:39 UTC (permalink / raw)
  To: ariga masahiro; +Cc: ecos-discuss

On Tue, Sep 04, 2007 at 04:16:14PM +0900, ariga masahiro wrote:
> Hi,
>
> Since I sent my previous mail I am still in the same condition.

The LAN91CXX drive is known to work for other people. However, you do
have a rather old version. 2.0 is now over four years old and there
have been a number of improvements since then. So first i suggest you
update to anoncvs.

http://ecos.sourceware.org/anoncvs.html

Do you have asserts enabled? Enable CYGPKG_INFRA_DEBUG and recompile
everything. See if that produces any assert failures, especially when
installing the interrupt handler.

Are you really sure you have the correct interrupt? Check the
schematic for the board, look at the Linux device driver, etc. 

Check if the interrupts needs to be active low, active high, positive
edge triggered, negative edge triggered etc. Is this being correctly
configured? Is the interrupt shared with some other hardware device?
Is the interrupt pin dual purpose, eg GPIO and interrupt input? If so,
has it been configured to be in interrupt mode? eCos is unlikely to do
this itself, you will need to add some code in your hardware dependent
part of the driver to do this.

Do other interrupts work on your board? Run the clocktruth program and
make sure it works. If that does not work, them maybe all interrupts
are broken for your board?

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2007-09-04  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-03  7:47 [ECOS] What interrupt options need to be enabled ? ariga masahiro
2007-09-04  7:16 ` ariga masahiro
2007-09-04  7:39   ` Andrew Lunn

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).