Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Interface

Adding UARTs to ARM7 for free

Posted: 24 Jan 2007 ?? ?Print Version ?Bookmark and Share

Keywords:microcontroller? UART interface? high-end timer peripheral? HET peripheral? interface ICs?

By Andreas Dannenberg
Texas Instruments Inc.

Problem: How can you add extra hardware UARTs to a 32bit TMS470 ARM7-based microcontroller at zero cost?

Solution: Designers can use the high-end timer (HET) peripheral found on all Texas Instruments ARM7-based, 32-bit TMS470 microcontrollers to implement additional, full-duplex high-speed UART interfaces with interrupt capability and zero ARM7 CPU overhead.

The TMS470 HET peripheral is a complex, high-performance RISC coprocessor that operates independent of the main ARM7. The HET can be used to implement complex, timed I/O operations, such as multiple UART interfaces. Using a small piece of software, designers can implement hardware UART module-like functionality with independent background transmission and reception. Furthermore, interrupts are provided, allowing for an event-oriented application program flow. A conceptual overview of the interaction of the different components is shown in Figure 1.

The HET operational principle lies in loop-oriented program execution. The time for a loop to execute is referred to as a loop resolution (LR) clock cycle. When the HET rolls over to the first instruction, it waits for the LR clock to restart program execution, ensuring synchronized timing.

The HET UART program processes the incoming and outgoing data streams bit by bit using multiple LR cycles to achieve perfect hardware-generated timing.

For the transmission process, the ARM7 passes the data it wishes to transmit to the HET program. Figure 2 shows an example UART transmission.

Changes to the output signal line are required only at the end of each bit period. These transitions are preloaded into the HET pin logic in advance of the next LR cycle that matches the UART bit timing and become active at the beginning of the following LR cycle. For the given example, a total of 10 transitions are needed and preloaded.

The entire UART data stream is output to an HET device's HET I/O pin in the background.

For the reception process, the incoming UART data stream delivered to an HET device I/O pin is decoded. The operational principle is that the HET UART is polling the receive signal line with a frequency higher than the baud rate until a zero logic level (start bit) is detected. This is necessary because the incoming data is asynchronous to the HET timing. The value of the first data bit is then determined 1.5 bit periods after the start bit was detected, which is in the middle of its bit period. Then, all other bits are read one bit period spaced apart from each other. For this process to work, a fine time resolution is needed to minimize the offset error introduced due to the start bit detection principle.

Figure 3 shows the time diagram of an example UART reception. In this case, a total of nine samples are taken after the start bit high-to-low transition was detected. Upon the reception of a full character, the ARM7 program is notified, which then can directly fetch the received data from the HET.

With the provided solution, it is possible, for example, to implement two additional full-duplex 115,200-baud UARTs on a TMS470R1A256 device-yielding a total of four available UART modules.

About the author
Andreas Dannenberg
is MSP430/TMS470 microcontroller applications engineer at Texas Instruments Inc. Comments may be sent to dannenberg@

Article Comments - Adding UARTs to ARM7 for free
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top