Motorola ColdFire MCF5281 User Manual page 706

Motorola microcontroller user's manual
Table of Contents

Advertisement

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;
wcreg
#0,macsr;
rcreg
accn;
wcreg
#saved_data,macsr;// restore the original macsr
)
Likewise, the following BDM sequence is needed to write an accumulator register:
BdmWriteACCn (
rcreg
macsr;
wcreg
#0,macsr;
wcreg
#data,accn;
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 (
The operand (longword) data is written to the specified control register. The write alters all
32 register bits.
Command/Result Formats:
15
Command
0x2
0x0
0x0
Result
29-34
// read macsr contents & save
// disable all rounding modes
// read the desired accumulator
// read macsr contents & save
// disable all rounding modes
// write the desired accumulator
WCREG
12
11
0x8
0x0
Figure 29-35.
WCREG
MCF5282 User's Manual
)
8
7
0x8
0x0
Rc
D[31:16]
D[15:0]
Command/Result Formats
4
3
0
0x0
0x0
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfire mcf5282

Table of Contents