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.

SPI start up

Dear all,

 

I'm new to omap l138 ARM processor, Now i have to work on SPI I red the datasheet related to this and initializing the SPI,

I'm using hawkboard. i made the SPI_init() written below

*SPIGCR0 = (unsigned int) (*SPIGCR0 & (0x00000000 ));
    delay();
    *SPIGCR0 = (unsigned int) (*SPIGCR0 & (0x00000001 ));        // resetting the SPI
    *SPIGCR1 = (unsigned int) (*SPIGCR1 & (0x0 << 24 ));
    *SPIGCR1 = (unsigned int) (*SPIGCR1 & (0x0000  ));
    *SPIGCR1 = (unsigned int) (*SPIGCR1 & (0x3));                //Configure the SPI for master by configuring the CLKMOD and MASTER
    *SPIPC0 =  (unsigned int) (*SPIPC0 & (0xFFFFFE01 ));        //Configure the SPI for 4-pin with chip select
    *SPIDAT1 = (unsigned int) (*SPIDAT1 & (0x00 << 24 ));        // selecting the SPIFMT0 from DFSEL bit
    *SPIFMT0 = (unsigned int) (*SPIFMT0 & (0x30001F08));        //Configure the SPI data rate, character length, shift direction, phase, polarity and other format options
    *SPIDELAY = (unsigned int) (*SPIDELAY & (0x06030000 ));        // CS delays like C2TDELAY and T2CDELAY
    //*SPIINT0 = (unsigned int) (*SPIINT0 & (0x01000003 ));
    *SPIGCR1 = (unsigned int) (*SPIGCR1 & (0x1 << 24 ));        // enabling the SPI engine

i followed the manual

And in my main program calling thr tx_spi()  in while loop

the tx_spi is written below

void Tx_spi(void)
{
   
    *SPIDAT0 = (unsigned int) (*SPIDAT0 & (0xAA));

}

By all doing this i'm not getting the clock on CKl pin

is there any setups are remaining?