mcf51jf128 Freescale Semiconductor, Inc, mcf51jf128 Datasheet - Page 284

no-image

mcf51jf128

Manufacturer Part Number
mcf51jf128
Description
Mcf51jf128 Reference Manual
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mcf51jf128VLH
Manufacturer:
MITSUBISHI
Quantity:
321
Part Number:
mcf51jf128VLH
Manufacturer:
FREESCALE
Quantity:
5 097
Part Number:
mcf51jf128VLH
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mcf51jf128VLH
Manufacturer:
FREESCALE
Quantity:
5 097
Functional Description
12.3.1.2 Saving and Restoring the EMAC Programming Model
The presence of rounding logic in the EMAC output datapath requires special care during
the EMAC's save/restore process. In particular, any result rounding modes must be
disabled during the save/restore process so the exact bit-wise contents of the EMAC
registers are accessed. Consider the memory structure containing the EMAC
programming model:
struct
} macState;
The following assembly language routine shows the proper sequence for a correct EMAC
state save. This code assumes all Dn and An registers are available for use, and the
memory location of the state save is defined by A7.
EMAC_state_save:
This code performs the EMAC state restore:
EMAC_state_restore:
284
move.l
clr.l
move.l
move.l
move.l
move.l
move.l
move.l
move.l
move.l
movem.l #0x00ff,(a7)
movem.l (a7),#0x00ff
move.l
move.l
move.l
move.l
move.l
move.l
move.l
move.l
move.l
macState {
int acc0;
int acc1;
int acc2;
int acc3;
int accext01;
int accext02;
int mask;
int macsr;
macsr,d7
d0
d0,macsr
acc0,d0
acc1,d1
acc2,d2
acc3,d3
accext01,d4
accext23,d5
mask,d6
d5,acc
d0,acc0
d1,acc1
d2,acc2
d3,acc3
d4,accext01
d5,accext23
d6,mask
d7,macsr
MCF51JF128 Reference Manual, Rev. 2, 03/2011
Preliminary
; save the macsr
; zero the register to ...
; disable rounding in the macsr
; save the accumulators
; save the accumulator extensions
; save the address mask
; move the state to memory
; restore the state from memory
; restore the accumulator
; restore the accumulators
; restore the accumulator extensions
; restore the address mask
; restore the macsr
Freescale Semiconductor, Inc.

Related parts for mcf51jf128