Simple Read/Write Examples; Table 9-5 Read/Write Examples - Motorola DragonBall MC9328MX1 Reference Manual

Integrated portable system processor
Table of Contents

Advertisement

B-Record Number
5
Note that all b-records start at the same address, 0x00000004, which is the starting address of the
instruction buffer. B-records 1, 2, and 3 are very similar and can be used as prototype b-records for
general-purpose register initialization.
Therefore, the resulting b-record file will be as follows:
00000004 08E3A04F40E1A0F004
0000000400
00000004 08E3A019C4E1A0F004
0000000400
00000004 08E3A02F40E1A0F004
0000000400
00000004 0CE59F3000E1A0F00412345678
0000000400
00000004 0FE7813002E25220041AFFFFFCE1A0F004
0000000400

9.4 Simple Read/Write Examples

Table 9-5 provides examples demonstrating how to perform memory and register reads/writes of various
data sizes. Code Example 9-4 shows an example of the code used for Vector Tables
NOP
NOP
NOP
IRQ_Addr
DCD
FIQ_Addr
DCD
NOP
LDR
LDR
DCD
Example Type
Read 3 bytes starting
from location
0x00310000
Read 3 half-words
starting from location
0x00310000
MOTOROLA
Table 9-4. Resulting B-Records (Continued)
00000004 0FE7813002E25220041AFFFFFCE1A0F004
0000000400
Code Example 9-3. Bootloader B-Record
initialize r4 to 0x00000100 (bootloader start)
execute and return to bootloader
initialize r1 to 0x00310000 (start)
execute and return to bootloader
initialize r2 to 0x100 (length)
execute and return to bootloader
initialize r3 to 0x12345678 (content)
execute and return to bootloader
execute and return to bootloader
Code Example 9-4.
C_IRQ_Handler
C_FIQ_Handler
PC, IRQ_Addr
PC, FIQ_Addr
0
Table 9-5. Read/Write Examples
B-Record
0031000023
0031000066
(6 bytes = 3 half-words)
Bootstrap Mode Operation
Simple Read/Write Examples
B-Record
memory fill
; 0x00
; 0x04 (programmable buffer)
; 0x08 (programmable buffer)
; 0x0C (programmable buffer)
; 0x10 (programmable buffer)
; 0x14 (programmable buffer)
; 0x18 (programmable buffer)
; 0x1C (programmable buffer)
; 0x20 (programmable buffer)
Return Value
0031000003XXYYZZ/
(where XX, YY, and ZZ are data in byte)
0031000066XXXXYYYYZZZZ/
(where XXXX, YYYY, and ZZZZ are data in
half-word)
9-5

Advertisement

Table of Contents
loading

Table of Contents