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]

SPI tranfer from a DSR


Hi,

I'm trying to write a driver for an NXP SC16IS740 SPI / I2C UART chip: http://www.nxp.com/documents/data_sheet/SC16IS740_750_760.pdf

I'm running on an AT91SAM7X512 (custom board), using the SPI interface.

When an interrupt occurs on the NXP chip, it asserts a GPIO line connected to the IRQ0 pin on the sam7. I've set up an interrupt handler for this in my driver. However when this occurs I need to perform an SPI transfer to read the IIR register to figure out what the interrupt is.

However in the ECOS reference on the SPI interface page: http://ecos.sourceware.org/docs-3.0/ref/spi-api.html It states that an SPI transfer should not be performed in an ISR or a DSR, for locking reasons and also we don't want to block a DSR.

So ideally we want to be able to start the transfer and then return from the DSR and get interrupted again when the transfer had finished.

Is there a nice way to do this without modifying the AT91 SPI driver?

Thanks,
Andrew


-- 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]