![Freescale Semiconductor ColdFire MCF5211 Скачать руководство пользователя страница 104](http://html1.mh-extra.com/html/freescale-semiconductor/coldfire-mcf5211/coldfire-mcf5211_reference-manual_2330619104.webp)
Static RAM (SRAM)
MCF5213 ColdFire® Integrated Microcontroller Reference Manual, Rev. 3
5-4
Freescale Semiconductor
2. Read the source data and write it to the SRAM. Various instructions support this function,
including memory-to-memory move instructions, or the MOVEM opcode. The MOVEM
instruction is optimized to generate line-sized burst fetches on 0-modulo-16 addresses, so this
opcode generally provides maximum performance.
3. After the data loads into the SRAM, it may be appropriate to load a revised value into the
RAMBAR with a new set of attributes. These attributes consist of the write-protect and address
space mask fields.
The ColdFire processor or an external debugger using the debug module can perform these initialization
functions.
5.3.1
SRAM Initialization Code
The following code segment describes how to initialize the SRAM. The code sets the base address of the
SRAM at 0x2000_0000 and initializes the SRAM to zeros.
RAMBASE
EQU 0x20000000
;set this variable to 0x20000000
RAMVALID EQU
0x00000001
move.l
#RAMVALID,D0
;load R valid bit into D0.
movec.l
D0, RAMBAR
;load RAMBAR and enable SRAM
The following loop initializes the entire SRAM to zero:
lea.l
RAMBASE,A0
;load pointer to SRAM
move.l
#8192,D0
;load loop counter into D0 (SRAM size/4)
SRAM_INIT_LOOP:
clr.l
(A0)+
;clear 4 bytes of SRAM
clr.l
(A0)+
;clear 4 bytes of SRAM
clr.l
(A0)+
;clear 4 bytes of SRAM
clr.l
(A0)+
;clear 4 bytes of SRAM
subq.l
#4,D0
;decrement loop counter
bne.b
SRAM_INIT_LOOP
;if done, then exit; else continue looping
5.3.2
Power Management
If the SRAM is used only for data operands, setting the AS
n
bits associated with instruction fetches can
decrease power dissipation. Additionally, if the SRAM contains only instructions, masking operand
accesses can reduce power dissipation.
shows examples of typical RAMBAR settings.
Table 5-3. Typical RAMBAR Setting Examples
Data Contained in SRAM
RAMBAR[7:0]
Instruction Only
0x2B
Data Only
0x35
Instructions and Data
0x21
Содержание ColdFire MCF5211
Страница 48: ...Overview MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 1 14 Freescale Semiconductor...
Страница 158: ...Reset Controller Module MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 9 10 Freescale Semiconductor...
Страница 218: ...Edge Port Module EPORT MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 13 8 Freescale Semiconductor...
Страница 234: ...DMA Controller Module MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 14 16 Freescale Semiconductor...
Страница 378: ...I2 C Interface MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 22 16 Freescale Semiconductor...
Страница 468: ...FlexCAN MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 25 30 Freescale Semiconductor...