Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: The Server does not receive any data

Reviewing the CC3000 Host Driver Porting Guide with last version of "CC3000BasicWiFiApplication\Basic WiFi App MSP430 Source\Source\CC3000 Spi"


Our porting only change:

1)
#define ASSERT_CS()   GPIO_Reset(GPIO_CS); // This function set to low  the chip select line
#define DEASSERT_CS() GPIO_Set  (GPIO_CS); // This function set to high the chip select line

2)
int init_spi(void)
remplaced with my Hardware HW_Init and in this function i initialize SPI and Chip_Select, Power_Enable and SPI_IRQ GPIOs

3)
long SpiFirstWrite(unsigned char *ucBuf, unsigned short usLength)
I change __delay_cycles(1200); by my Delay(60usec); [Tested with a Logic Analyzer]

4)
void SpiWriteDataSynchronous(unsigned char *data, unsigned short size)
void SpiReadDataSynchronous(unsigned char *data, unsigned short size)
I remplace the code of this function by my SPI_write and SPI_read function
These functions are working fine because we can connect to a AP, Send Data to a remote IP address...

5)
void SpiPauseSpi(void)
{
   SPI_IRQ_PORT &= ~SPI_IRQ_PIN;
}
void SpiResumeSpi(void)
{
   SPI_IRQ_PORT |= SPI_IRQ_PIN;
}
As far I understand these functions enable or disabled the IRQ_SPI Line in your Microcontroller, and in case of CC3000 produce a falling edge in the IRQ Pin it would not be treated

I do the same using a Flag
void SpiPauseSpi(void)
{
  irq_flag=0;
}
void SpiResumeSpi(void)
{
  irq_flag=1;
}


6)
__interrupt void IntSpiGPIOHandler(void)
{
 ...
}
My handler is the same but I filter the external IRQs with the irq_flag
void IRQ_HANDLER(void *p){
   if(irq_flag==1)
   {
    ...
   }
}


Is there Anything Wrong??

Best Regards,


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>