[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: RE: RE: Again with Syncronous Serial Port



Hi,

Sorry for the late reply. The synchronous serial ports
are always running (even when there is no data to send).
If no application is reading data the device driver
will discard old data. Together this means that you
can't do write() and then read() and expect to get
the same data back.

I understand that this is not intuitive. I will try
to make some improvements in the next developer 
board release but I don't think it is possible to
make this perfect due to the hardware implementation.

/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of fjrg_cesinel@xxxxxxx.com
Sent: Tuesday, August 27, 2002 11:41 AM
To: dev-etrax
Subject: Re: RE: RE: RE: Again with Syncronous Serial Port


Hi
   At last I could to compile the kernel thanks to your files.

   Ok, Now I have another problem. I have been trying to send and
receive data in the same port. In other words, I'm sending data from
syncronous serial port 0, and i'm receiving that data in the same port
(linking the rxd line and txd line), but it doesn't work.


   Now, i describe the function of the program:

   1.- Open serial syncronous serial port 0 as master bidirectional.
   2.- Enable interruptions
   3.- Set buffer to zero.
   4.- Send 255 bytes
   5.- Loop to Process the received data.
   6.- Colse serial port.

   That is an easy program. I think so. But it gives many problems:

     When I start the program, it's not run till the end. it stops in
number 4. It send 79 bytes but not send any more. this is the output screen:
    [1]
    puerto sincrono 0 abierto.
    puerto sincrono inicializado correctamente como master de salida
    : Success
    frecuencia de 9600 Hz establecida correctamente
    : Success
    Frame: sincronizado a nivel de bit y 8 bits por dato y sin control 
  de flujo
    : Success
    [4]
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    72 73 74 75 76 77 78 79

    When I look at the txd pin with the scopemeter, that line indicates
 axis board syncronous serial port 0 is sending data, even killing the
program (stopping the program).

    What happend? what is it grown in code?


    I send you the file "monitor.c"

    Thank you,
      Francisco