Motorola MCF5281 사용자 설명서

다운로드
페이지 816
29-34
MCF5282 User’s Manual
MOTOROLA
 
Background Debug Mode (BDM)  
As an example, any BDM read of an accumulator register (ACCn) must be preceded by two
commands accessing the MAC status register. Specifically, the following BDM sequence
is required:
BdmReadACCn (
    rcreg    macsr;            // read macsr contents & save
    wcreg    #0,macsr;         // disable all rounding modes 
    rcreg    accn;             // read the desired accumulator 
    wcreg    #saved_data,macsr;// restore the original macsr
)
Likewise, the following BDM sequence is needed to write an accumulator register:
BdmWriteACCn (
    rcreg    macsr;            // read macsr contents & save
    wcreg    #0,macsr;         // disable all rounding modes
    wcreg    #data,accn;       // write the desired accumulator
    wcreg    #saved_data,macsr;// restore the original macsr
)
Additionally, it is required that writes to the accumulator extension registers be performed
after the corresponding accumulators are updated. This is needed since a write to any
accumulator alters the contents of the corresponding extension register.
For more information on saving and restoring the complete EMAC programming model,
see appropriate section of the EMAC specification.
29.5.3.3.10  Write Control Register (
WCREG
)
The operand (longword) data is written to the specified control register. The write alters all
32 register bits. 
Command/Result Formats:
15
12
11
8
7
4
3
0
Command
0x2
0x8
0x8
0x0
0x0
0x0
0x0
0x0
0x0
Rc
Result
D[31:16]
D[15:0]
Figure 29-35. 
WCREG
 Command/Result Formats