Title: ColdFire MCF5282 Universal Asynchronous Receiver/Transmitters (UARTs)
1ColdFire MCF5282Universal Asynchronous
Receiver/Transmitters (UARTs)
2RS232 Interface Cable
3Universal Asynchronous Receiver/Transmitters
(UARTs)
4RS232 Character transmission
5Universal Asynchronous Receiver/Transmitters
(UARTs)
6Universal Asynchronous Receiver/Transmitters
(UARTs)
7From Header File ..\mod5282\system\sim5282.h
/ ------------- will become array uart3
0200-gt02bc --------------- / typedef struct
/ uart modules / vubyte umr /
8bit uart mode register / vubyte
pack003 / 24bit reserved / vubyte usr
/ 8bit read status register / /
write clock-select register / vubyte
pack013 / 24bit reserved / vubyte ucr
/ 8bit read do not access / /
write command register / vubyte
pack023 / 24bit reserved / vubyte udb
/ 8bit read recieve buffer / /
write transmit buffer / vubyte
pack033 / 24bit reserved / vubyte
iacr / 8bit read input port change
register / / write auxiliary
control register / vubyte pack043 /
24bit reserved / vubyte ir / 8bit
read interupt status register / /
write interupt mask register / vubyte
pack053 / 24bit reserved / vubyte dur
/ 8bit read do not access / /
write divider upper register / vubyte
pack063 / 24bit reserved / vubyte dlr
/ 8bit read do not access / /
write divider lower register / vubyte
pack0723/ 24bit reserved / vubyte uip
/ 8bit read input port register /
/ write do not access / vubyte
pack083 / 24bit reserved / vubyte ops
/ 8bit read do not access / /
write output port bit set command register /
vubyte pack093 vubyte opr /
8bit read do not access / /
write output port bit reset commmand register
/ vubyte pack0a3 uartstruct
Example Assignment sim.uart1.ucr 0x0200 /
reset receiver /
8Universal Asynchronous Receiver/Transmitters
(UARTs)
Example Assignment sim.uart1.ucr 0x0200 /
reset receiver /
9Universal Asynchronous Receiver/Transmitters
(UARTs)
10Universal Asynchronous Receiver/Transmitters
(UARTs)
11Universal Asynchronous Receiver/Transmitters
(UARTs)
/ This function sets up the 5282 interrupt
controller / void SetIntc(int intc, /
Interrupt Controller Number /
long func, / Address of Interrupt Service
Routine / int vector, / Vector
Table Number / int level, /
Interupt Priority Level / int
prio / Interrupt Priority Sub Level / )
/ This macro implements the UART Interrupt
Service Routine / INTERRUPT(my_UART_func, /
Name of Interrupt Service Routine /
0x2600 / Mask - Enter Supervisor Mode,
Set Interrupt Mask / ) / You can
add your ISR code here. - Do not call any
RTOS function with pend or init in the function
name - Do not call any functions that
perform a system I/O read, write, prin
12Universal Asynchronous Receiver/Transmitters
(UARTs) Interrupt Control Module
13Universal Asynchronous Receiver/Transmitters
(UARTs)
14Universal Asynchronous Receiver/Transmitters
(UARTs)
15Universal Asynchronous Receiver/Transmitters
(UARTs)
16Universal Asynchronous Receiver/Transmitters
(UARTs)
17Universal Asynchronous Receiver/Transmitters
(UARTs)
18Universal Asynchronous Receiver/Transmitters
(UARTs)
19Universal Asynchronous Receiver/Transmitters
(UARTs)
20Universal Asynchronous Receiver/Transmitters
(UARTs)