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: eCos interrupt programming (on SA1100)



>void dsrMethod ( cyg_vector_t anIntrVector, 
>                 cyg_ucount32 aCounter,
>                 cyg_addrword_t aDataAddress) {
>  gCounter++;
>  printf ( ">");
>}

Don't call printf from the DSR. It's likely to cause a lockup or
overflow the interrupt stack.

>  cyg_interrupt_create ( lIntrVector,
>                         lIntrPriority,
>                         (cyg_addrword_t) 0,
>                         isrMethod,
>                         dsrMethod,
>                         &lIntrHandle,
>                         &lIntr);
>  cyg_interrupt_attach ( lIntrHandle);

I think this is what's missing:

        cyg_drv_interrupt_acknowledge(lIntrVector);
        cyg_drv_interrupt_unmask(lIntrVector);

Jesper


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