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

PragmaLab info at pragmalab.nl
Tue Sep 19 00:06:21 CEST 2006


Hello all,

at the moment I'm rewriting the VS1001K driver so it will support the
VS1003, especially the feature that only requires 1 SPI for data & control.
This new driver is intented to work with the Mega2561 and compiled using
ICC. It uses latest NutOS (4.1.9rc8).

Most things work OK, but I'm having serious crashes on a very regular base,
due to 'some problem with the intterupts'. It is the combination of the
'DREQ' interrupt of the VS1003 (EXT_INT. 4) and the 'INT0' interrupt
(EXT_INT 5) of the RTL8019AS in our design. 
For me it's unclear what is happening in the 'NicInit(..)' function in
'\dev\nicctrl.c'. Considering the interrupt sense control, none of the bits
are set, resulting in a (low) LEVEL triggered interupt. OK, this would mean
that, as long as the INT0 pin of the RTL is high (there is an inverter in
our design, just as it is in the Ethernut boards), the software will be
interrupted (I assume because there's data to read) all the time the INT0 is
active. 

The really confusing part is in the '#ifdef RTL_IRQ_RISING_EDGE' part:

    /* Support of rising edge interrupts for HW w/o inverter gate */

the comment says and then a Macro is executed setting both bits in the sense
control register, resulting in a (rising) EDGE triggered interrupt.

It looks like a level triggered interrupt is replaced by an edge triggered
interrupt the moment the signal is inverted. 
Somebody knows what it should be, level or edge triggered sense control?


Thanks for your kind suppport,

best regards,

Rob van Lieshout

PS: If more people are interested in the new VS1003 driver and the new way
of interfacing (single HW SPI), I would me more then happy to share it.




More information about the En-Nut-Discussion mailing list