AN2442 Freescale Semiconductor / Motorola, AN2442 Datasheet - Page 14

no-image

AN2442

Manufacturer Part Number
AN2442
Description
Booting the MSC8102 Device Through TDM
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Example Boot Master Code
5.4 Configure the Buffer Descriptors
14
The buffer descriptors contain the control and status information for the buffers, buffer location, and
buffer data length. The code to configure the buffer descriptors is shown in Example 5. This code sets the
receive buffers as empty and sets the transmit buffers as ready for transmission. It also writes the buffer
length of 0x1000 bytes and memory locations of each buffer into the buffer descriptors.
; -------------------------------------------
; Configure Rx Buffer Descriptors
; Rx Buffer Channel 0 = 0x02020000
; Rx Buffer Channel 1 = 0x02021000
; Rx Buffer Channel 2 = 0x02022000
; Rx Buffer Channel 3 = 0x02023000
; -------------------------------------------
_loop_rbd
; Set Empty, Wrap bits in RxBD
; -------------------------------------------
; Configure Tx Buffer Descriptors
; Tx Buffer 0 = 0x02010000
; Tx Buffer 1 = 0x02011000
; Tx Buffer 2 = 0x02012000
; Tx Buffer 3 = 0x02013000
; -------------------------------------------
_loop_tbd
; Set Ready, Wrap bits in TxBD
move.l#$0,r0
move.l#RNUM_CH,d0
move.l #RBUFF_DL,d1
move.l #RBUFF_BASE_ADD,d2
move.l #$b000,d3
move.w d3,(r0)+
; Set data length
move.w d1,(r0)+
; Set Rx buffer base address
move.l d2,(r0)+
; Repeat for other channels
add d1,d2,d2
deceq d0
bf _loop_rbd
move.l #TNUM_CH,d0
move.l #TBUFF_DL,d1
move.l #TBUFF_BASE_ADD,d2
move.w d3,(r0)+
; Set data length
move.w d1,(r0)+
; Set Tx buffer base address
move.l d2,(r0)+
; Repeat for other channels
add d1,d2,d2
deceq d0
bf
Freescale Semiconductor, Inc.
Example 5. Configure the Buffer Descriptors
For More Information On This Product,
_loop_tbd
Go to: www.freescale.com

Related parts for AN2442