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.

TMS320F28377D: SPI Loopback Registers can not be set

Part Number: TMS320F28377D

Hello,

I am trying to move the SPI loopback example into my project. The loopback example itself works fine. But when I try to move it to my own application, I find out the following source code doesn't set the corresponding registers. Those registers are still zero.

SpiaRegs.SPICCR.all =0x000F; // Reset on, rising edge, 16-bit char bits
SpiaRegs.SPICTL.all =0x0006; // Enable master mode, normal phase,
// enable talk, and SPI int disabled.
SpiaRegs.SPIBRR.all =0x007F;
SpiaRegs.SPICCR.all =0x009F; // Relinquish SPI from Reset
SpiaRegs.SPIPRI.bit.FREE = 1; // Set so breakpoints don't disturb
// xmission

I even step into each line of these code, but the register is not set to the value I want. Do you have any ideas? By the way, the GPIO configuration code for SPI works fine in myapplication.

Fei