Hello my friends, i have a problem with enable SPI interface (MC9S12XS128MAA), i need it to my study. This is my configuration:
DDRM=0xff;
/* SPI0CR1: SPIE=0,SPE=1,SPTIE=0,MSTR=1,CPOL=0,CPHA=1,SSOE=1,LSBFE=0 */
SPI0CR1 = 0x50;
/* SPI0CR2: XFRW=1,MODFEN=1,BIDIROE=0,SPISWAI=0,SPC0=0 */
SPI0CR2 = 0x10;
/* SPI0BR: SPPR2=0,SPPR1=0,SPPR0=0,SPR2=1,SPR1=1,SPR0=1 */
SPI0BR = 0x07;
COPCTL=0x00;
for(;
{
SPI0DRL=0x44;
while (SPI0SR_SPTEF!=0){}
}
I was trying with different conditions and loops.
I'm watching in osciloscope SCK port but there is nothing.
What i'm doing wrong ?
Thank You for any post.
Bye