FacebookTwitterLinkedinYoutube
1.800.426.8979 |sales@connecttech.com

sales@connecttech.com | 1.800.426.8979  

Connect Tech Inc. Connect Tech Inc. Connect Tech Inc. Connect Tech Inc. Connect Tech Inc. Connect Tech Inc.
  • Home
  • Products
    • FORM FACTORS
      • COM Express®
      • NVIDIA® Jetson™ AGX Xavier™
      • NVIDIA® Jetson™ TX2/TX2i/TX1
      • Qseven
      • SMARC
      • VPX
      • Mini PCIe
      • M.2
      • XMC/PMC
      • PC/104
      • PCI Express
      • PCI
    • TECHNOLOGY
      • Computer-on-Module (COM) Carrier Boards
      • Graphics Processing Unit (GPU/GPGPU)
      • 10 GbE & 1 GbE Embedded Ethernet Switches & NICs
      • Rugged Embedded Systems
      • Rugged Tablets
      • GPS/GNSS
      • Multiport Serial (Asynchronous)
      • Multiport Serial (Synchronous)
      • Single Board Computers
      • Power Supplies
    • TECHNOLOGY
      • FPGA
      • Digital I/O
      • Analog I/O (ADC/DAC)
      • Storage Solutions
      • Cellular/Satellite M2M
      • CAN Controllers
      • Wireless Radio Modems
      • Ethernet-to-Serial
      • Development Tools & Adapters
    • Close
  • Services
    • CUSTOM DESIGN
      • Our Custom Design Capabilities
      • Custom Design Process
    • CUSTOMIZE YOUR PRODUCT
      • Custom COM Express
      • Custom NVIDIA® Jetson™ AGX Xavier™
      • Custom NVIDIA® Jetson™ TX2/TX2i/TX1
      • Custom Product
    • ADDITIONAL SERVICES
      • Conformal Coating
      • Flashing As A Service
    • Close
  • Support
    • RESOURCE CENTER
      • NVIDIA® Jetson™ TX2/TX2i/TX1 Solution Support
      • Downloads
      • Drivers
      • Install Guides
      • Troubleshooting
      • Set Up & Configuration
      • General
      • All KDB Entries
    • PRODUCT LIFECYCLE SUPPORT
      • RMA Request
      • Product Registration
      • Warranty Policy
      • Product Change Notifications
      • EOL Notifications
    • Close
  • About
    • COMPANY OVERVIEW
      • About Us
      • Capabilities
      • Management Team
      • Mission Statement
      • Quality Assurance
    • NEWS & EVENTS
      • News
      • Events
    • CAREERS
      • Working at Connect Tech
      • Career Opportunities
    • PARTNERS & RESELLERS
      • Our Partners
      • Jetson Resellers
      • Resellers
    • Close
  • Home
  • All KDB Entries
  • kdb309: Setting a Custom Baud ....

kdb309: Setting a Custom Baud Rate in Linux (2.6.x Kernel)

Title: Setting a Custom Baud Rate in Linux (2.6.x Kernel)
Keywords: Baud Rate, baudrate, custom baudrate, stty, setserial
Date: October 9, 2007
KDB: KDB-309
Revision: 0.00
Author: GRV
Distribution: External

When using a serial port with the Linux serial module 8250, you are usually limited to the predefined baud rates in the driver. If you are using a serial card with a non-standard clock, most applications will not be able to use the non-standard baud rates without some modifications. Here are some steps to use for a quick and easy way to get around this.

Determine what clock speed your serial card is using. Divide this speed by 16 (UART samples 16 clock pulses), this will be your “base baud” as it is the highest baud rate achievable.

Here is an example on how to set a baud rate of 500,000 bps using our XP014 serial card (Xtreme/104-Plus 8 port RS-232/422/485). This card has a 48 MHz clock installed.

# setserial /dev/ttyS# Baud_base 3000000 // 48,000,000 divided by 16
# setserial /dev/ttyS# spd_cust // turns the spd_cust flag ON
# setserial /dev/ttyS# divisor 6 // spd_cust will use a divisor of 6

3,000,000 divided by 6 equals 500,000

spd_cust is a special flag used by setserial. It uses the baud rate defined by “Baud_base” divided by “divisor” whenever a baud rate of 38400 bps is called in the application.

In this example, whenever you set the baud rate to 38400, the actual baud rate will be 500,000 bps.

End of KDB-309

Related Resource Center Posts -

  • kdb187: Intellicon-8 I/O Box DB-25 DCE Pinouts
  • kdb168: QNX4 NT960 tracelogger codes for a NT960 Restart Complete (%d/%d)
  • kdb182: Intellicon-4 DB-25 Pinouts

Contact Info

42 Arrow Road
Guelph, Ontario
N1K 1S6 Canada

Phone: 1-800-426-8979 (North America Only)
1-519-836-1291

Support: support@connecttech.com
Sales: sales@connecttech.com

Upcoming Events

  1. Embedded World 2019 – Stand 1-430

    February 26 - February 28
  2. GTC 2019 – Booth 1347

    March 18 - March 22

View All Events

Join Our Mailing List

Join our mailing list to be notified of Connect Tech events and product updates.

Follow Us

Follow us on Social Media for industry and Connect Tech news.
Copyright 2018 Connect Tech Inc. | All Rights Reserved | Privacy | Contact
FacebookTwitterLinkedinYoutube
  • Search Knowledgebase