Hello,
At the moment, I'm working with the ethernet MAC interface and I'm now able to get a interrupt, when I receive a new frame from the PHY. But I'm not totally sure, how I have to configure the ISR.
void Emac_interrupt(void) __irq { unsigned int status; AT91PS_EMAC pEmac = AT91C_BASE_EMAC; //MAC interrupt status register indicates what interrupts are pending //automatically cleared once read status = pEmac->EMAC_ISR; if (status & AT91C_EMAC_RCOM) /* Receive complete */ { printf("RCOM\n"); receive_frame(); /* function */ } // clear statistics pEmac->EMAC_CTL = 0x1 << 5; AT91C_BASE_AIC->AIC_EOICR = 0; }
I want to use this ISR to figure out which interrupt of the MAC occured - e.g. receive complete, transmit complete and so on... after that I call the next function (e.g. receive_frame()) where I find out which protocol is received (arp or ip).... everthing ok, but I don't know where I have to close the ISR, so that I'm able to receive another interrupt... I want to close the ISR and open the next function (e.g. receive_frame() at the same time... is that possible? Or what is the best way to do that?
Is it a good solution, to say:
if (status & AT91C_EMAC_RCOM) /* Receive complete */ { printf("RCOM\n"); return (receive_frame()); /* function */
Or is that not possible?
best regards Bernd
thanks for your answer - I noticed that by the error...
But could you describe the way I should call the next function if a interrupt occured?
I KNOW MICROSOFT OLD JVM ITS REALLY FAST JAVA VIRTUAL MACHINE FOR SLOW COMPUTER'S
HOW CAN I GET IT WORKING IN UVISION?
I TRY BUT KEEP GETTING ERROR IN IT. MAYBE FILE IS CORRUPT?
So once more we have to guess if this is a new joker, or one of the regulars who just switch to a new alias every now and then...
the way I should call the next function if a interrupt occured?
You're trying to solve the problem from the wrong end. It's not the job of an interrupt handler to "call the next function". Its job is to do whatever work has to be done immediately, and to leave the rest of the work to the main program.