UG-1926
Rev. 0 | Page 16 of 20
SRAM MODE SETTINGS
Configuration settings are available on the Keil and IAR
software tool environments. To properly set up and test the
static random access memory (SRAM) modes, go to the
example projects located in the
M420_SramMode
installer.
IAR SRAM Mode
Three file settings must be completed to configure the
corresponding SRAM mode:
main.c
,
startup_ADuCM420.s
,
and
ADuCM420flash_SramMode.icf
.
1.
After the example program is opened from the IAR IDE,
ensure that the macros shown in Figure 30 are set up and
commented in to select the SRAM mode the linker file is
operating in. The
M420_SramMode
example code (see
Figure 31) uses a linker file, the
ADuCM420flash_
SramMode.icf
file (see Figure 32) placed in the
IAR
folder
within the
SramMode
example program.
25844
-016
Figure 30. IAR SRAM Setup
main.c
2.
Configure the macros shown in Figure 30, Figure 31, and
Figure 32 to run the SRAM modes. Ensure the
main.c
,
startup_ADuCM420.s
, and
ADuCM420flash_SramMode.icf
macros are selected with
the correct SRAM mode.
3.
Users can select the desired
USER_SRAM_MODE
macro
as shown in Figure 31 and Figure 32. Users can also select
the
TEST_SRAM_MODE
macro as shown in Figure 30.
By default, the example program is running in
TEST_SRAM_
MODE 0
. Ensure the
main.c
macro, which runs the debug
mode, shows that the instruction SRAM (ISRAM) is placed
in debug mode. If the ISRAM is in debug mode, the
Disassembly
window from the
View
menu bar displays the
isramTestFunc
with the 0x10000000 address (see Figure 33).
2584
4-
01
7
Figure 31. IAR SRAM Setup
startup_ADuCM420.s
SRAM Modes
25
84
4-
01
8
Figure 32. IAR SRAM Setup
ADuCM420flash_SramMode.icf
Macros