Serial Driver; Introduction; Serial Module Device Driver Source Files - Texas Instruments TMS320C6000 User Manual

Network developer’s kit (ndk) support package for evmdm642
Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Serial Driver

4
Serial Driver
This section describes the operational theory of the HDLC framing layer and low-level serial driver,
including instructions on the use and porting of the device driver source code.
4.1

Introduction

The serial driver can be used in one of two ways in the NDK. First, by connecting the serial port to a pipe,
the serial interface can drive a TTY command line tool for device configuration purposes. The TTY
interface can look like any other socket to a socket based console program. Thus, the same console
program can support both Telnet and direct serial link. More commonly, the serial driver implements a
PPP device interface to a modem or a peer on the other side of the serial link.
The serial driver provided in the NDK is broken down into two parts: a device independent upper layer,
and a device dependent layer. The device dependent layer is called a mini-driver because it only
implements a subset of the full driver functions. The mini-driver API is documented in
full NDK serial port driver API is documented in the Hardware Adaptation Layer (HAL) section of the
TMS320C6000 Network Developer's Kit (NDK) Software Programmer's Reference Guide (SPRU524), and
the interface to the HDLC framer is documented in the Point-to-Point Protocol. The example applications
provide the source code to the HDLC framer interface.
The EXAMPLE\SERIAL directory includes example applications using the serial device.
4.1.1
Source Code
There are two types of serial modules included in the NDK: a stub driver used in a system where a serial
port is not required, and a driver for the Texas Instruments TL16C750 and TL16C752 UART. The
directories for the two types of device drivers are as follows:
Directory
<SRC\HAL\EVMDM642\SER_TI752>
4.1.2
Theory of Operation
The serial port driver was designed to operate both an AT command set modem (or any serial TTY type
application), and also support PPP HDLC-like framing, without the intervention of the TTY (or character
mode) code. The driver accomplishes this dual role through the ability to open in two different modes.
On initialization, the serial driver is first opened in character mode using the llSerialOpen() function. This
provides a channel for receiving normal TTY data. With a modem, this channel sends AT commands and
gets replies.
When the modem has connected, or the TTY state machine provided by the programmer has detected the
presence of HDLC, the HDLC-like framing module is opened using the llSerialOpenHDLC() call on the
serial port.
Once open in HDLC mode, the hardware specific portion of the low-level serial driver tracks the HDLC
frame delimiters and receives HDLC frames, including converted escape sequences, and validating the
HDLC checksum. When data is sent in HDLC mode, the low-level serial driver must add the HDLC frame
delimiter characters, use escape sequences when necessary, and calculate the outgoing HDLC
checksum. While in HDLC mode, the serial device can still indicate character mode data if it is possible to
detect the difference, but due to the relaxed standard in HDLC frame delimiting, this may not be practical.
20
TMS320C6000 Network Developer's Kit (NDK) Support Package for EVMDM642
Table 1. Serial Module Device Driver Source Files
File
LLSERIAL.C
LLSERIAL.H
TI752.C
TI752.H
Section
Description
Source code for the Texas Instruments TL16C752
dual serial UART driver
Hardware independent portion of the low-level
serial port driver
Private include file for the LLSERIAL drivers
Serial mini-driver for TL16C752
Private include file for the serial mini-driver
SPRUES5A – January 2007 – Revised June 2008
Submit Documentation Feedback
www.ti.com
4.3.4. The

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Table of Contents