#include <intrinsics.h>
#include <TexasInstruments/iotms470r1b1m.h>
#include <TexasInstruments/tms470r1B1m_bit_definitions.h>
int main(void)
{
PCR=CLKDIV_4;
GCR=ZPLL_CLK_DIV_PRE_1;
PCR|=PENABLE;
ECPCTRL|=ECPEN;
ECPCTRL|=ECPCOS;
//ECPCTRL|=0X01;
//GIODIRA_bit.GIODIR1=1;
// Enter SPI reset mode
// Disable SPI receive interrupts
SPI2CTRL2 |= SPIEN; // Activate the SPI
// Configure SPI port 2
SPI2CTRL1 = 0 | CHARLEN_8; // 8 bits/char
SPI2CTRL1 |= PRESCALE_8;
SPI2CTRL2 |= MASTER; // We are the master
SPI2CTRL2 |= CLKMOD; // We drive the clock
SPI2CTRL2 &= ~POLARITY; // CLK Polarity = 0
SPI2CTRL2 |= PHASE; // CLK Phase = 1
SPI2PC6 = 0 | CLK_FUN; // SCLK pin
}
The SPICLK donot have the signal.WHY