[En-Nut-Discussion] SPI Interrupt Registering/Enabling

Harald Kipp harald.kipp at egnite.de
Wed Apr 4 09:41:48 CEST 2007


Hi Andrew,

The API calls you use look perfect to me. My assumption is, that the SPI 
registers (or power management?) are not set up correctly and that the 
hardware is not triggering an interrupt.

Two hints:

1. When using DEV_DEBUG for stdout, you can even add printf() to your 
interrupt routine.
2. With Nut/OS it is not required to register interrupts via API calls. 
You can also use native interrupts, which may be found in some sample 
code from Atmel or in the Web.

Harald

Andrew Mieczkowski schrieb:
> In the initialization (code included with Nut/OS "at91_spi.c) the code
> reads:
>
>     /* Register and enable SPI0 interrupt handler. */
>     NutRegisterIrqHandler(&sig_SPI0, At91Spi0Interrupt, 0);
>     NutIrqEnable(&sig_SPI0);
>
> Inside of the At91Spi0Interrupt routine is the code:
>
> NutEventPostFromIrq(&spi0_que);
>
>   


-- 
egnite Software GmbH
Erinstr. 9
44575 Castrop-Rauxel
Germany

Fon +49 (0)23 05-44 12 56
Fax +49 (0)23 05-44 14 87

http://www.egnite.de/
http://www.ethernut.de/





More information about the En-Nut-Discussion mailing list