Hi all,
I am working on TMS320C5515 EVM, and programing it from CCS v6.1.3. I am initializing SPI module correctly, but I get some extra signals, and I am not sure what to think about it. This is my program:
SYS_EBSR=0x5A3F;
SYS_GPIO_DIR0=0xFFBF;
SYS_GPIO_DATAOUT0=0x0802;
for (delay1=0;delay1<3;delay1++);
SYS_GPIO_DATAOUT0=0x0800;
for (delay1=0;delay1<3;delay1++);
SYS_GPIO_DATAOUT0=0x0802;
//SPI
SYS_PCGCR1=0x0000;
for (delay1=0;delay1<3;delay1++);
SYS_PCGCR2=0x0000;
for (delay2=0;delay2<3;delay2++);
SYS_PSRCR=0x0020;
SYS_PRCR=0x0080;
for (delay3=0;delay3<3;delay3++);
SYS_GPIO_DATAOUT0=0x0802;
for (delay3=0;delay3<3;delay3++);
SYS_PCGCR1=0x0000;
SPI_SPICCR=0x0000;
SPI_SPICDR=0x000C;
SPI_SPICCR=0x8000;
SPI_SPIDCR1=0x001C;
SPI_SPIDCR2=0x0303;
//Slanje SDATA
do{
for (delay3=0;delay3<50;delay3++);
SPI_SPIDAT1=0x0000;
SPI_SPIDAT2=0x2100;
SPI_SPICMD1=0x4000;
SPI_SPICMD2=0x003A;
for (delay3=0;delay3<50;delay3++);
//--------------------------------
busy_value1=0;
do{
busy_value=SPI_SPISTAT1;
busy_value1=(busy_value & 0x0001);
}while(busy_value1!=0);
for (delay3=0;delay3<50;delay3++);
}while(1);
So this program initializes SPI module (and some GPIO pins, that Im using for my project) and then it sends 8 bits (0x21=00100001).
And in the next two pictures you can see that besides desired signals, there is another one whose falling edge matches the falling edge of CS signal. I am working on a project where I cant use CS pin, but I will have to use one of the GPIO pins as a chip select, so this extra signal could be a problem. My question is, how do I get rid of this?