2009-10-01 16:14:24     Problem with hardware flow control on BF-548

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-10-01 16:14:24     Problem with hardware flow control on BF-548

Vladimir Davydov (BELARUS)

Message: 80779   

 

Hi,

 

I have some problems with the hardware flow control on the UART1.

 

It is not working properly on my device. I have tried both modes  (PIO and DMA) and results are almost same.

 

I'm using the UART1 to transmit raw binary data (for debug console the UART2 is used).

 

To reproduce these problems you can do following:

 

1. Connect the UART1 to PC RS-232 port (/dev/ttyS1 for example).

 

2. Configure both ports  for a raw data transfer with using of rtscts flow control  and 115200 boud rate.

 

on the device side:

 

stty -F /dev/ttyBF1 0:4:80001cb2:8a38:3:1c:8:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

 

on the PC side

 

stty -F /dev/ttyS1 0:4:80001cb2:8a38:3:1c:8:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

 

3. Put any binary file (busybox for example) to the UART1

 

cat /bin/busybox > /dev/ttyBF1

 

I have checked that the transfer will not start immediately because the UART1_CTS pin will be asserted (high level).

 

That is ok.

 

4. Try to receive that file on the PC side.

 

cat /dev/ttyS1 > busybox_first_part

 

After this step the transfer will be realy started because UART1_CTS pin is deasserted.

 

That is ok.

 

5. Do not wait when the file will be transfered fully. Stop it by using Ctrl-C on the PC side (not on the device side).

 

If the UART1 driver was compiled for the PIO mode,  in that case the console on the UART2 freezes.

 

In the DMA mode this problem is not reproductible.

 

6. Continue to transfer second part of the file.

 

cat /dev/ttyS1 > busybox_second_part

 

It will be transfered successfully.  Also in the PIO mode the UART2 console will be unfreezed.

 

7. Start the transfer again.

 

on the device side:

 

cat /bin/busybox > /dev/ttyBF1

 

on the PC side:

 

cat /dev/ttyS1 > busybox_first_part

 

In that case the transfer will not work. A size of busybox_first_part will be always zero.  Could you explain why?  Is it a bug or a feature? I have checked UART1_CTS pin and it is deasserted (low level), in other words PC side is ready to receive, but blackfin side doesn't transfer any data.

 

My configuration is following:

 

Processor: BF-548 B-0.2

Linux kernel: svn revision 6259 with updated  drivers/serial/bfin_5xx.c (rev. 7177)

uclinux-dist: 2008R1.5-RC3

toolchains: 08r1.5-14

 

Unfortunately, I don't have access to the BF-548 Ezkit board now and can't check it with the latest release or svn trunk.

 

Best regards,

 

Vladimir

QuoteReplyEditDelete

 

 

2009-10-05 11:29:02     Re: Problem with hardware flow control on BF-548

Robin Getz (UNITED STATES)

Message: 80856   

 

Vladimir:

 

Sorry for the delay - our serial developer is out Oct 1 -> 8 - he will be back on Friday.

 

-robin

QuoteReplyEditDelete

 

 

2009-10-05 15:31:47     Re: Problem with hardware flow control on BF-548

Vladimir Davydov (BELARUS)

Message: 80863    Thanks, it still topically for me.

QuoteReplyEditDelete

 

 

2009-10-09 05:35:45     Re: Problem with hardware flow control on BF-548

Sonic Zhang (CHINA)

Message: 81013   

 

This issue is already fixed on 2009R1 release. See bug 4914.

QuoteReplyEditDelete

 

 

2009-10-09 11:23:27     Re: Problem with hardware flow control on BF-548

Vladimir Davydov (BELARUS)

Message: 81018    Hello Sonic, Thank you for response, but I think it is not that bug. Your commit has revision 6145. My kernel is 6259 revision with updated bfin_5xx.c to rev. 7177. It includes your bugfix anyway. I will try to reproduce it on the BF-548 ezkit board with 2009R1 and trunk version of uclinux-dist and kernel.

QuoteReplyEditDelete

 

 

2009-10-10 00:22:29     Re: Problem with hardware flow control on BF-548

Sonic Zhang (CHINA)

Message: 81024   

 

No. This bug fixing is not on 2008R1 SVN branch.

Attachments

    Outcomes