[En-Nut-Discussion] Re: interrupt sense control for RTL8019AS

Eduardo Serantes eduardo.serantes at gmail.com
Wed Sep 20 13:26:36 CEST 2006


Hello all,

Henrik's explanation is right (and very good), but I have to advise you
about a strange behaviour I found in an old design:

Long time ago I designed a board mixing the external SRAM memory addressing
capability of Ethenut 2.1b, but using the realtek IC for the ethernet
MAC/PHY interface. In a first step I used the inverter gate to drive the
interrupt signal. In a second design review, I decided to remove it (saving
2 cents!!), changing the interrupt level for the rising edge detection. When
I passed the tests to the prototype, I realized that the board hanged up
under heavy traffic. In fact, if I tried to perform a 200 simultaneous "ping
-t" to the board, it didn't reply anymore. Looking inside the code I
discovered that the board didn't hang up, in fact it recived the icmp frames
ok, the protocol stack made the reply also ok, it was sent to the RTL and...
NOTHING!, the realtek IC marked the tx flag as ok, but nothing was sent to
the magnetics. After a couple of weeks debugging (electronic and firmware) ,
I decided to resign and I put again the inverter gate in the design. It's
possible it was only a problem of my design, but....


Regards,

Eduardo Serantes


>
> Hello Henrik
>
> >For a standard Ethernut hardware the classic level triggered mode should
> be
> used.
> >This mode is also backwards compatible to the Atmega103 MCU which does
> >not support edge triggered interrupts.
>
> Thanks for your explanation on this matter. I feel comfortable now using
> the
> level triggered interrupt as is.
>
> Just out of curiosity: I always remembered that a level triggered
> interrupt
> keeps triggering an interrupt as long as the level is active. So the
> moment
> the ISR is finished and re-enables the interrupt, it's there again. While
> an
> edge triggered interrupt will only fire once... Does that make sense to
> you?
>
>
> The datasheet tells us:
> "if enabled, a level triggered interrupt will generate an interrupt
> request
> as long as the pin is held low".
>
> If this is the case, replacing a level triggered interrupt by an
> edge-triggered interrupt may result different behaviour: level triggered
> forces SW to keep executing the ISR, e.g to read data from a device, while
>
> edge triggered will only let the ISR be executed once.
>
> Appearantly, that doesn't make a difference when it comes to handling the
> RTL8019AS?
>
>
> Best regards,
>
> Rob
>



More information about the En-Nut-Discussion mailing list