dennis.yxun wrote: > + spi->ch[0].SPCON = 0x1B; /* Polling, Prescaler, Master, CPOL=0, > + CPHA=1 */
The problem seems to be that you also set what Samsung obliquely refer to as "Tx auto garbage data mode". Setting it makes SPI ignore SPTDAT. Also, your clock rate is a bit off. (See the comments in the example below.) User-space example in: http://svn.openmoko.org/developers/werner/wlan-spi/spi.c (To compile it, you also need to build http://svn.openmoko.org/developers/werner/greg/) And this is what happens on the wires: http://people.openmoko.org/werner/wlan-spi/spi_hi.png D6 is MOSI, D5 is SCLK, D1 through D4 are floating, D0 is an unsynchronized 1MHz reference clock. - Werner
