AN2442 Freescale Semiconductor / Motorola, AN2442 Datasheet - Page 13

no-image

AN2442

Manufacturer Part Number
AN2442
Description
Booting the MSC8102 Device Through TDM
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
5.3 Initialize the Transmit and Receive Buffers
The example discussed in this section uses one buffer for each channel so that there are four transmit
buffers and four receive buffers. Each buffer holds 0x1000 bytes of data. These buffers are located at the
addresses shown in Table 4.
Since the boot master transmits messages to the slave MSC8102 devices on channel 0, the transmit buffer
for channel 0 is initialized with the message to send. Transmit buffers for channels 1–3 and receive
buffers for channels 0–3 and the interrupt queues are cleared as shown in Example 3.
; -------------------------------------------
; Clear Tx buffer channels 1–3 and
; Rx buffers channels 0–3
; Tx buffer channel 0 is initialized with
; message to send
; Clear Tx and Rx interrupt queue tables
; -------------------------------------------
set_block
Data to be sent to the MSC8102 device is written into transmit buffer channel 0 as shown in Example 4.
The first 0x1000 bytes of the buffer are filled with a value of 0x2211. Since this data does not contain the
required 0x44332211 preamble, the MSC8102 does not process this data as valid data. The included file
boot_broadcast.iasm contains the preamble and message that is broadcast to all MSC8102
devices in the boot system. The contents of this file are shown in Figure 5 on page 6. The other included
file boot_send_chipid_3.iasm contains the preamble and message that is sent only to the
MSC8102 device with CHIP_ID = 3. The contents of this file are shown in Figure 6 on page 7.
;--------------------------------------------
; Initialize the Tx buffer
;--------------------------------------------
org p:$10000
Address
0x10000
0x11000
0x12000
0x13000
move.l #$00011000,r0
move.l #$00050000,r1
move.l #$0,d0
move.l #$0,d1
jsr set_block
bsc 1000,$2211
include "boot_broadcast.iasm"
include "boot_send_chipid_3.iasm"
bsc
move.2l d0:d1,(r0)+
cmpeqa r0,r1
bf set_block
rts
Freescale Semiconductor, Inc.
For More Information On This Product,
Example 4. Initialize the Tx Buffer Channel 0
Example 3. Set up the Tx and Rx Buffers
Transmit buffer channel 0
Transmit buffer channel 1
Transmit buffer channel 2
Transmit buffer channel 3
4096,$00
Go to: www.freescale.com
Channel
Table 4. Buffer Addresses
Address
0x20000
0x21000
0x22000
0x23000
Receive buffer channel 0
Receive buffer channel 1
Receive buffer channel 2
Receive buffer channel 3
Example Boot Master Code
Channel
13

Related parts for AN2442