Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Issue successfully resolved

???
03/17/04 23:45
Read: times


 
#66943 - serial reciever problem
Hi all,
I programmed serial port in mode0, problem is serial reciever always recieves "FF" even if I don't supply serial input and cypress fx2.

here is the code:

void TD_Init(void) // Called once at startup
{
// set the CPU clock to 48MHz
CPUCS = 0x12;
IFCONFIG |= 0x40;

// serial port configaration
PORTECFG = 0x1F; //serial is multiplexed with portE
SCON1 = 0x30; //serial port0 Mode 0 +rec
SCON0=0x20; //Serial port1 Mode 0
// enable dual autopointer feature
AUTOPTRSETUP |= 0x01;

AUTOPTR1H = MSB( &EP6FIFOBUF );
AUTOPTR1L = LSB( &EP6FIFOBUF );

}

void RE_poll(void)
{
if(!(EP2468STAT & bmEP6FULL))
{ // check EP6 FULL(busy) bit in EP2468STAT
//(SFR),core set's this bit when FIFO is full

EXTAUTODAT1 = SBUF1;

}
else {
EP6BCH = 0x00;
EP6BCL = 0x040;
AUTOPTR1H = MSB( &EP6FIFOBUF );
AUTOPTR1L = LSB( &EP6FIFOBUF );
}

}

void main(void)
{
TD_Init();
while(1==1){
if(RI1 == 1){
RE_poll();
RI1=0;
}
}
}

if you find any corrections , please help me out.
regards
madhu


List of 10 messages in thread
TopicAuthorDate
serial reciever problem            01/01/70 00:00      
   RE: serial reciever problem            01/01/70 00:00      
      RE: serial reciever problem            01/01/70 00:00      
         RE: serial reciever problem            01/01/70 00:00      
   RE: serial reciever problem            01/01/70 00:00      
      RE: serial reciever problem            01/01/70 00:00      
   RE: serial reciever problem            01/01/70 00:00      
      RE: serial reciever problem            01/01/70 00:00      
   RE: mode0 = bible time            01/01/70 00:00      
   RE: serial reciever problem            01/01/70 00:00      

Back to Subject List