Page 1 of 1

Max speed for ee-sio

Posted: Sat Apr 23, 2005 6:46 am
by apache37
I was wondering what was the max speed of the sio on the ps2 side? I can connect at 115k no problem but it would be nice to get a special 1.54mbps serial card and hook up to the ps2 at a much higher speed for a more robust GDB setup. My concern is replacing the current MAX chip with a faster one (the external box) and seeing what the ps2 sio speed limit really is.

Any ideas??

Posted: Sat Apr 23, 2005 8:12 am
by pixel

Code: Select all

brd = CPUCLK / (baudrate * 256);
With CPUCLK beeing 294912000 and the following constraint:

Code: Select all

        while &#40;&#40;brd >= 256&#41; && &#40;++bclk < 4&#41;&#41;
                brd /= 4;
The exercise to find the possible values of baudrate is left to the reader.

Posted: Sat Apr 23, 2005 8:34 am
by apache37
Does this say anything about the actual speed limit on the ps2?

I just figured there was a max based a the chip not certain if its just based on the EE.

Posted: Sat Apr 23, 2005 10:26 am
by pixel
This was extracted from the code which is used to init the sio port.

Posted: Sat Apr 23, 2005 12:07 pm
by apache37
ah. is this part of the kernel then?

Posted: Sat Apr 23, 2005 7:18 pm
by pixel
Correct.

Posted: Thu Jun 23, 2005 2:38 am
by TerryMathews
Either baudrate is not in bps, or brd allows values less than 256.

256=cpu/(baudrate*256) gives an answer of 4500.

I also noticed that baudrate * 256 yields 115200... :)

Posted: Sat Aug 27, 2005 9:00 am
by hno
If my math is correct speeds up to 1.152Mbps should be supported (brd = 1, bclk = 0). Maybe the double if brd = 0 is supported (probably not).

Posted: Sat Aug 27, 2005 10:50 am
by hno
From looking more closely at the specifications and source I find the following

Code: Select all

   IMBUSCLK = CPUCLK&#40;294912000&#41; / 8 = 36.864MHz
   SCLK = UNKNOWN
    
   SIO_LCR  line control register
     SCS&#40;bit 6&#58;5&#41;  clock select  &#40;baud rate&#41;
      00  ->  IMBUSCLK
      01  ->  IMBUSCLK / baud rate generator
      10  -> SCLK
      11  -> SCLK / baud rate generator

   SIO_BGR  baud rate generator
      BCLK&#40;bit 9&#58;8&#41;  clock select
      00  ->  2
      01  ->  8
      10  ->  32
      11  ->  128

      BRD&#40;bit 0&#58;7&#41;  divisor

baud rate generator = BCLK * BRD * 16
So the max rate the chip will output it's SIO signals is IMBUSCLK (36.864Mbps), with the next available rate being IMBUSCLK / 32 (2 * 1 * 16) = 1.152Mbps. No idea what the electict characteristics of the signals looks like at these speeds however.

For most normal baud rates there is several possible combinations of BCLK and BRD. But don't trust the precomputed tables in Toshiba documentation.. (80 / 4 is not 40).

Posted: Fri Sep 02, 2005 5:16 am
by apache37
This is interesting. Anyone know of where to purchase a high-speed serial card for pc? I mean beyond 230k and more like 1mbit.