AnsweredAssumed Answered

spi commmunication using blackfinBF512

Question asked by Vr123 on Feb 2, 2012
Latest reply on Feb 2, 2012 by PrasanthR

I am new to blackfin processors. I am trying to initiate spi communication using BF512. The trial code I wrote is given below:

 

#include <stdlib.h>
#ifdef __ADSPBF512__
    static char *pEzKitTitle = "ADSP-BF518F EZ-KIT Lite";
#endif
#include <cdefBF518.h>
#include <ccblkfn.h>
#include <stdio.h>

 

void spitransfer(void);
void spiinit(void);


void spiinit()
{
SPI_BAUD=0x0002;
SPI_CTL=0x5d09;
}

void spitransfer()
{
SPI_FLG=0xff08;
}

void main(void)
{
PORTH_FER=0x000f;
PORTH_MUX|=0x0001;
spiinit();
spitransfer();
while(1)
{
SPI_TDBR=0xEE;
}

}
Wherever the registers are used,the following error appears. error: expression must be a modifiable lvalue. Kindly tell me what is wrong.

Outcomes