About 2440 SPI

Boyee
Hi all,
    I configure SPI and connect MISO and MOSI directly, then try to
read,but always get 0xFF,why?
   Codes:
        init:
        *CLKCON |= (1<<18);
  *GPECON |= (1<<27) | (1<<25) | (1<<23);
  *GPECON &= !(  (1<<26) | (1<<24) | (1<<22)  );
  *GPEUP &= !(  (1<<13) | (1<<12) | (1<<11)  );
  *GPEDAT |= (1<<13) | (1<<12) | (1<<11);  //pin 13,12,11
  *GPGCON |= (1<<4);  //pin 2
  *GPGCON &= !(1<<5);
  *GPGUP &= (1<<2);
  *GPGDAT |= (1<<2);
  *SPPRE0 = 0x18;
  *SPCON0 = 0x38;
  *SPPIN0 = 0x00;
        write:
        *SPTDAT0 = (char)arg;

        int:
        sprintf( getMMem(100) , "wirelessl: spi irp request,reg
status:%x\n", *SPSTA0 );   //Always get 0xFF

thanks,
Boyee

mouha
look at my thread,

Marek nandra did a nice job about it.