Hi Bob,
I'm trying to setup SPI with double bufferred settings with poling, but I'm having difficulty on making it works. After comparing the test package, I found out that you set the FIFO bit of SPICON. However, I read it some of your literature (Revised Nov 2004) and errata warn about not using the FIFO due to unstability. Is that true?
The following is my configurations and function call for transmission (SCK, MISO, MOSI & SS are the P1 bits):
void SPI_Init()
{
PDCON&=~0x01; // turns on SPI
//CYCLOPS - Enable SPI channels as master
P1DDRH=0x75; //CMOS Out
//P1DDRH=0xBA; //Open Drain
//P1DDRH=0x30; //Pull Up
SCK=1;
MISO=1;
MOSI=1;
SS=1;
SPICON=0xE6; // ClkDiv=111(clk/256), Order=0, MSTR=1, CPHA=1, CPOL=0
SPITCON=0x28;
}
char SPI_Transmit (char TxData)
{
while ((AIE&0x08) != 0x08){}
SPIDATA=TxData;
while ((AIE&0x04) != 0x04){}
return(SPIDATA);
}
I've also tried the sample code in the user guide sba077, it is not working as well. Do you have sample code to configure double buffered with poling?
Thanks.