Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/13/07 18:29
Read: times


 
#146929 - SPI interrupts not firing
Hello,

I've set up my SPI slave device at 200kHz to receive, but can't get the interrupt to trigger at all. For debugging purposes, I've removed all timers and other interrupts. My feeling is that I may be missing something in the init.

I'm using SYSCLK / 64 as the oscillator and SPI0CKR is at 0x00 by default (which will give me the 200kHz). I've set the MISO to push-pull, and left the other 3 pins as open-drain.

Here's my code:

...
void init()
{
    SPI0CN    = 0x05;
    P0MDOUT   = 0x02;
    XBR0      = 0x02;
    XBR1      = 0xC0;
    OSCICN    = 0x81;
    IE        = 0xC0;
}

...

static void spi_isr(void) interrupt 6
{
    // doesn't come in here at all
    int q = 0;
    q++;
}

...


I appreciate if anyone can let me know what I'm missing here...Thanks!

List of 7 messages in thread
TopicAuthorDate
SPI interrupts not firing            01/01/70 00:00      
   which microcontroller?            01/01/70 00:00      
      Boards involved            01/01/70 00:00      
   Derivative?            01/01/70 00:00      
   I got the interrupt to fire now, but...            01/01/70 00:00      
      Have you read the datasheet?            01/01/70 00:00      
         Thanks!            01/01/70 00:00      

Back to Subject List