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

Interrupt unmask before complete cs8900a interrupt configuration.


Hi all,
    I found a problem when I generated a net template image for my system.
The problem is related to the interrupt management beetwen the At91R40008
and the CS8900a.
In the if_cs8900a.c

static bool
cs8900a_init(struct cyg_netdevtab_entry *tab)
{

 ....

#ifdef CYGINT_IO_ETH_INT_SUPPORT_REQUIRED
    // Initialize environment, setup interrupt handler
    cyg_drv_interrupt_create(cpd->interrupt,
                             cpd->priority,
                             (cyg_addrword_t)cpd, //  Data item passed to
interrupt handler
                             (cyg_ISR_t *)cs8900a_isr,
                             (cyg_DSR_t *)cs8900a_dsr,
                             &cpd->interrupt_handle,
                             &cpd->interrupt_object);
    cyg_drv_interrupt_attach(cpd->interrupt_handle);
    cyg_drv_interrupt_acknowledge(cpd->interrupt);
    //cyg_drv_interrupt_unmask(cpd->interrupt);        //<---- I moved this
line in cs8900a_start ---->

the interrupt unmask occurs before the execution of cs8900a_start function
that configure the chip to generate the interrupt.
In this way a continuos loop on cs8900a_dsr happens.
The solution is to move the line below at the end of the function
cs8900a_start.
In this way the ethernet chip work fine.

Has anyone experimented this behaviour? Could be acceptable this patch?

Thanks
Jaws



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


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