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.

CCS/TMS320F28335: TMS320F28335

Part Number: TMS320F28335
Other Parts Discussed in Thread: DAC7554, C2000WARE

Tool/software: Code Composer Studio

I am trying to configure the registers of SPI but it is not working in my code..

Can anyone see the code and tell me what is the problem with the code??

void InitSpiaGpio(void)
{
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 1;

SpiaRegs.SPICCR.all = 0x000b; // SPI-A Configuration control register SPICCR (0b) : Reset on, Rising edge, 12bit (character length)
SpiaRegs.SPICTL.all = 0x0006; // SPI-A Operation control register bit#1=1(initialize as transmitter and receiver and bit#2=1 Master SPI

SpiaRegs.SPIBRR = 0x0003; // SPI-A baud rate register SPIBRR (03) : LSPCK/(3+1)=9.375Mbps, (LSPCK default = 37.5MHz equal to SYSCLKOUT/4)
SpiaRegs.SPIFFTX.all = 0xc022; // SPI-A FIFO transmit register SPIFFTX (c022) : FIFO Reset and Enable, TX FIFO INT enable, FIFO INT level = 2
SpiaRegs.SPIFFCT.all = 0x0001; // SPI-A FIFO control register SPIFFCT (0001) : FIFO transmit delay(1 Clock)

SpiaRegs.SPIPRI.bit.FREE = 0x1; // SPI-A priority control register
SpiaRegs.SPIFFTX.bit.TXFIFO= 1; // SPI-A FIFO transmit register re-enable TX FIFO

SpiaRegs.SPICCR.all = 0x008b; // SPI reset bit#7 is cleared SPICCR (8b) : SPI is ready to transmit, Rising edge, 12bit


}