This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3000 WlanInterruptDisable vs SpiPauseSpi



Looking at some of the example code there seems to be two functions, WlanInterruptDisable and SpiPauseSpi, that are both used to disable the IRQ. I was wondering what the difference is between the two. I went searching through code of the Basic Wifi Application for the CC3000 and MSP430, and was able to find the definition for SpiPauseSpi and WlanInterruptDisable and they seem to do the same function.

In spi.c of BasicWifiApplication:

void

SpiPauseSpi(void) {  

SPI_IRQ_PORT &= ~SPI_IRQ_PIN;

}

 

In board.c of BasicWifiApplitcation:

void

WlanInterruptDisable() {  

P2IE &= ~BIT6;

}

 

In spi.h of BasicWifiApplitcation:

#define SPI_IRQ_PORT    P2IE

#define SPI_IFG_PORT    P2IFG

#define SPI_IRQ_PIN     BIT6

 

Since in spi.h SPI_IRQ_PORT and SPI_IRQ_PIN are defined as the variables used in WlanInterruptDisable, are these functions the exact same, am I missing anything?

 

Thanks,

Justin

  • Justin,

    Your observations are correct.  There are overlapped stepped in these and for my port (Cortex M4 based SAM4S) I had to consolidate and streamline these.  The other issue is the confusing terminology used.  Strictly speaking, the IRQ interrupt is not part of the SPI peripheral. For my device, SPI interrupts are generated at the end of SPI DMA transfer. The IRQ line is a GPIO line that generates an interrupt to notify the CC3000 is ready to transfer data.  This is completely independent of any SPI data transfer or chip select.  Calling this SPI IRQ is not accurate.

    Reza