Author Topic: XModem / UART problem  (Read 1654 times)

0 Members and 1 Guest are viewing this topic.

Offline WawavounTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: fr
  • Someday I'll get you, Red Baron !
XModem / UART problem
« on: March 07, 2025, 04:43:45 pm »
Hi All,

I try to debug a problem of data transmission with XModem.

On one side there is a Linux + Minicom + sx computer with usb to rs232 interface. On the other side a Motorola 68008 8 MHz board with a TL16C750 + Max232.
 
Basically the console works well at 115200 bauds 8N1 with rts/cts enabled. I never see a problem.
But in this case only few datas are send to the Mini-68K and at very slow rate (keyboard input).
Note that I have to connect rts cts. Minicom never send what I type in on the keyboard but, on the other direction, strangely the board send his datas even without rts cts connected.
May be a first sign that something is wrong somewhere...

I need to find a way to transfer files from my Linux computer. Usually I use XModem.

I have a 68K program doing that and checked in both direction on an other board.

The problem start here. At 115200 bauds no way to transfer even one packet.
I decrease the speed to 1200 bauds and things start to work but they are still some retries.

I connect a logic analyzer to the serial line and found that the bytes of one packet are sent in burst mode without any pause
and that rts coming from the board stay always low...
I dont have a great experience on serial port.
I have think that as soon as a byte is received rts should change until this byte has been read by the cpu.
Looking at the timing between two bytes I doubt that the receiver cpu can got the byte, store it into the buffer and come back to read the next and also eventually check a timeout during this time.
May be this explain why when I decrease the speed things go better ?

I have double checked the wiring, jumpers settings and connections. Everything look good.
The problem is into the 16C750 and may be into his configuration. It seems rts / cts are fully ignored.
In fact in any direction rts/cts from - to the board seems to be ignored.
 
The datasheet is quite complex, some registers are interlocked and lack init / configuration examples.

Is anybody able to help or have some example for init this chip ?

Thanks.
Philippe
 

Offline Kean

  • Supporter
  • ****
  • Posts: 3545
  • Country: au
    • Kean Electronics
Re: XModem / UART problem
« Reply #1 on: March 07, 2025, 05:11:01 pm »
As you are sending to the 68008 which isn't keeping up, you will need to have the 16C750 UART configuration code enable the FIFOs and Auto-RTS mode so that it controls RTS signal based on the receiver FIFO space threshold.

You might need to look at the 16C550 datasheet for info on the control registers to set the correct configuration, and see what your existing code is doing.  At least the '750 part has 64-byte FIFOs vs the 16-byte FIFOs in the '550, and no FIFOs in the '450.
 
The following users thanked this post: mwb1100

Offline WawavounTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: fr
  • Someday I'll get you, Red Baron !
Re: XModem / UART problem
« Reply #2 on: March 07, 2025, 08:55:17 pm »
Not working rts/cts is the problem.

I have find a solution : put $22 into MCR register to enable autoflow then rts/cts come alive and XModem works.
 

Offline Kean

  • Supporter
  • ****
  • Posts: 3545
  • Country: au
    • Kean Electronics
Re: XModem / UART problem
« Reply #3 on: March 08, 2025, 08:07:13 am »
I have find a solution : put $22 into MCR register to enable autoflow then rts/cts come alive and XModem works.

Great!

I wasn't sure if you'd be able to modify the code easily, and I didn't want to dig too far into the register settings to work it out for you... partly being lazy, but also in case you needed to learn the control registers yourself for further experimentation.  It has been a long time since I wrote my own code for the 16C550.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->