Serial Module Initialization Sequence; Serial Module Configuration - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

7.5 SERIAL MODULE INITIALIZATION SEQUENCE

The following paragraphs discuss a suggested method for initializing the serial module.

7.5.1 Serial Module Configuration

If the serial capability of the MC68340 is being used, the following steps are required to
properly initialize the serial module.
The serial module registers can only be accessed by byte operations.
Command Register (CR)
• Reset the receiver and transmitter for each channel.
The following steps program both channels:
Module Configuration Register (MCR)
• Initialize the stop bit (STP) for normal operation.
• Select whether to respond to or ignore FREEZE (FRZx bits).
• Select the input capture clock (ICCS bit).
• Select the access privilege for the supervisor/user registers (SUPV bit).
• Select the interrupt arbitration level for the serial module (IARBx bits).
Interrupt Vector Register (IVR)
• Program the vector number for a serial module interrupt.
Interrupt Level Register (ILR)
• Program the interrupt priority level for a serial module interrupt.
Interrupt Enable Register (IER)
• Enable the desired interrupt sources.
Auxiliary Control Register (ACR)
• Select baud rate set (BRG bit).
• Initialize the input enable control (IEC bits).
Output Port Control Register (OPCR)
• Select the function of the output port pins.
Interrupt Status Register (ISR)
• The XTAL_RDY bit should be polled until it is cleared to ensure that an unstable
crystal input is not applied to the baud rate generator.
7-46
Freescale Semiconductor, Inc.
NOTE
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents