AnsweredAssumed Answered

Some problems with link port (TS-201)

Question asked by Falcon on May 20, 2010
Latest reply on Jun 7, 2010 by jeyanthi.jegadeesan

Hello!

I have some problems with initialize link port registers. I think that It is my problem.

I have wrote 2 programs (transmitter and receiver), this is listings of this programs:

 

Transmitter:

 

#define __NOUNDERSCORES__
#include <defts201.h>
#include <sysreg.h>


int i;
int C[10];

__builtin_quad q;

void main( void )
{
for(i=0;i<10;i++)
C[i]=4;

q=__builtin_compose_128((long long)C[0] | (long long)C[1]<<32, (long long)C[2] | (long long)C[3]<<32);

 

__builtin_sysreg_write(LTCTL3,0x00000000);
__builtin_sysreg_write(LTCTL3,(LTCTL_TEN | LTCTL_TCLKDIV4));

  __builtin_sysreg_write4(LBUFTX3,q);

q=__builtin_sysreg_read4(LBUFTX3);
}

 

 

Receiver:

 

#define __NOUNDERSCORES__
#include <sysreg.h>
#include <defts201.h>
#include <math.h>


int i;
long long hh;

__builtin_quad q;

void main( void )
{

__builtin_sysreg_write(LRCTL2,0x00000000);
__builtin_sysreg_write(LRCTL2,(LRCTL_REN_P));
q=__builtin_sysreg_read4(LBUFRX2);

hh=__builtin_high_64(q);
i=__builtin_high_32(hh);

}

 

 

Can you help me? Why this programs are not working?

Outcomes