2008-04-21 04:52:19     How to use ttyBF1 of bf537 as DTE UART

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

2008-04-21 04:52:19     How to use ttyBF1 of bf537 as DTE UART

Parimala Baggiri (INDIA)

Message: 54596    Hello,

 

 

             Is it possible to use UART1(ttyBF1) of BF537 stamp board as DTE port? If it is possible any other driver code is necessary or else how to use the existing driver software to make UART work under DTE mode?

 

              In my setup ttyBF1(DCE port) will be connected to a modem(another DCE) using null-modem cable, not able to Tx and Rx data between these two ports.  When  I try to  enable Hardware Flow control for UART1 it is showing like

 

[*]   Enable UART1 hardware flow control

(-1)   UART1 CTS pin

(-1)   UART1 RTS pin

 

why is it showing as -1's instead of some valid pin numbers? Is it really enables the hardware flow control of UART1?

 

 

Please give me some information regarding this.

 

Thank u.

 

Regards,

Parimala.

QuoteReplyEditDelete

 

 

2008-04-21 05:21:59     Re: How to use ttyBF1 of bf537 as DTE UART

Sonic Zhang (CHINA)

Message: 54600    No.

QuoteReplyEditDelete

 

 

2008-04-21 05:32:58     Re: How to use ttyBF1 of bf537 as DTE UART

Mike Frysinger (UNITED STATES)

Message: 54604    according to wikipedia, DTE's are externally clocked.  the Blackfin UART cannot be externally clocked.

 

as for the -1 values, you need to enter the right gpio pin.  -1 means you havent selected anything yet.

QuoteReplyEditDelete

 

 

2008-04-21 06:43:34     Re: How to use ttyBF1 of bf537 as DTE UART

Parimala Baggiri (INDIA)

Message: 54615    Thank You for the information..

 

Where to select the gpio pin numbers? But for UART0 there are some default numbers 22 & 23, why is it not for UART1?

 

If it is not possible to make Black fin UART as DTE, then how is it possible to access any device from black fin UARTS?

 

Could you help in resolving this...

 

Regards,

Parimala.

 

 

 

QuoteReplyEditDelete

 

 

2008-04-21 07:02:53     Re: How to use ttyBF1 of bf537 as DTE UART

Mike Frysinger (UNITED STATES)

Message: 54619    presumably since you're making the hardware, you know what gpio pins to use.

 

you really need to quantify exactly what your requirements are for a "DTE".  the term does not have hard specific requirements seeing as how it is not a standard.  i merely told you that if you need to externally clock it, then the on-chip UARTs will not be usable for your needs.

QuoteReplyEditDelete

 

 

2008-04-21 09:26:11     Re: How to use ttyBF1 of bf537 as DTE UART

Robin Getz (UNITED STATES)

Message: 54626    Normally (in what I am familiar with) the difference between DCE (Data Terminal Equipment) and DTE ( Data Communications Equipment) is minor.

 

http://tldp.org/HOWTO/Serial-HOWTO-20.html#ss20.3

 

http://www.connectworld.net/rs232.html

 

http://pinouts.ru/SerialPorts/RS232_pinout.shtml

 

I thought the differences (for RS-232) was mainly the gender of the connector (DTE == male, DCE == female), and the cable necessary to connect everything together. The Blackfin should be able to do both.

 

-Robin

QuoteReplyEditDelete

 

 

2008-04-21 14:25:31     Re: How to use ttyBF1 of bf537 as DTE UART

Mike Frysinger (UNITED STATES)

Message: 54634    i was referring to the aspect where some DTE's are required to be clocked by the DCE.  we obviously wont be able to handle that.

QuoteReplyEditDelete

 

 

2008-04-21 17:14:37     Re: How to use ttyBF1 of bf537 as DTE UART

Robin Getz (UNITED STATES)

Message: 54648    Mike:

 

The Blackfin UART does do clock recovery on the Rx side (assuming it is programmed to the similar (+/- 3%) baud rate of the transmitter). the 'A' stands for asynchronous Tx & Rx. If the person is asking about USART  - where the clock data is recovered separately from the data stream and no start/stop bits are used - that really doesn't have anything to do with DTE UART.

 

I don't think that the wikipedia DTE article is correct.

 

you connect a PC (DTE) to a modem (DCE). I can connect a Blackfin (DTE) to modem (DCE) and use picocom, ppp, and chat to dial out. It is the same.

 

Or am I misunderstanding something?

 

-Robin

QuoteReplyEditDelete

 

 

2008-04-21 17:25:25     Re: How to use ttyBF1 of bf537 as DTE UART

Mike Frysinger (UNITED STATES)

Message: 54651    clock recovery isnt externally clocked ... and wikipedia said some, not all

 

really the op needs to actually describe his needs instead of saying "i need DTE/DCE" because those terms are too general to be useful

QuoteReplyEditDelete

 

 

2008-04-22 03:26:09     Re: How to use ttyBF1 of bf537 as DTE UART

Parimala Baggiri (INDIA)

Message: 54672    Hello Robin & Mike,

 

                      Thank you for your explanation.

 

                Sorry to say that I am not making any hardware, I am just using BF537 stamp board to run my applications. I had gone through ADSP-BF537 documents regarding GPIO pin selection, but it didn't help me. Can u tell me on what basis UART0 hardware flow control pins are selected? So that I can apply the same to UART1.

 

                   My actual need is I should be able to connect a modem to a UART of BF537 board & be able to send AT commands, I mean Tx and Rx should take place between these two DCE devices.

 

 

Regards,

Parimala.

QuoteReplyEditDelete

 

 

2008-04-22 03:55:22     Re: How to use ttyBF1 of bf537 as DTE UART

Mike Frysinger (UNITED STATES)

Message: 54674    as Robin says, a null modem connection works fine

 

the BF537 doesnt have hardware flow control on the UART.  that means the two pins need to be simulated by GPIOs.  the selection process is simple: find two that are free and hook them up.

QuoteReplyEditDelete

 

 

2008-04-22 05:15:42     Re: How to use ttyBF1 of bf537 as DTE UART

Parimala Baggiri (INDIA)

Message: 54722    Thank you Mike I will try to do that.. meanwhile I was trying to make ttyBF1 as default console. For that I made a change  in the file  include/configs/bf537-stamp.h

 

#define CONFIG_UART_CONSOLE  1 &

 

#define CONFIG_BOOTARGS      "root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600"

 

compiled u-boot and loaded. Its booting fine and while loading the uImage it is stopping like this

 

Image Name:   Linux-2.6.22.18-ADI-2008R1-svn                                             

   Created:      2008-04-22   6:05:33 UTC                                       

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)                                                            

   Data Size:    4361877 Bytes =  4.2 MB                                      

   Load Address: 00001000                       

   Entry Point:  00150000                       

   Verifying Checksum ... OK                          

   Uncompressing Kernel Image ... OK                                  

Starting Kernel at = 150000                         

Linux version 2.6.22.18-ADI-2008R1-svn (parimala@debian) (gcc version 4.1.2 (ADI                                                                              

svn)) #33 Tue Apr 22 02:04:58 EDT 2008                                     

bfin-gpio: GPIO 0 wasn't requested!                                 

bfin-gpio: GPIO 0 wasn't requested!                                 

early printk enabled on early_BFuart1                                   

Hardware Trace Active and Enabled                               

Warning: limiting memory to 56MB due to hardware anomaly 05000263

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x000f71d0

  rodata    = 0x000f8000-0x0013edd8

  data      = 0x0013f000-0x00150000

    stack   = 0x00140000-0x00142000

  init      = 0x00150000-0x00823000

  bss       = 0x00823000-0x00831f50

  available = 0x00831f50-0x037ff000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 14224

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 ip=19

2.168.4.21:192.168.4.22:192.168.0.1:255.255.255.0:1:eth0:off

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

 

Why is it stopping here?

Anywhere else I have to change it to use ttyBF1 as default console? If any other procedure is there please tell me.

 

Rgds,

Parimala.

QuoteReplyEditDelete

 

 

2008-04-22 07:50:45     Re: How to use ttyBF1 of bf537 as DTE UART

Robin Getz (UNITED STATES)

Message: 54727    Parimala:

 

First thing: revert all the source you changed back to it's original state.

 

Have a look in Documentation/kernel-parameters.txt and/or Documentation/serial-console.txt

 

All you need to do is add console=ttyBF1,57600 to the boot arguments.

 

-Robin

QuoteReplyEditDelete

 

 

2008-04-22 08:41:07     Re: How to use ttyBF1 of bf537 as DTE UART

Parimala Baggiri (INDIA)

Message: 54730    Thank you Robin, its fine now

 

Regards,

Parimala.

Attachments

    Outcomes