![Analog Devices ADuCM355 Hardware Reference Manual Download Page 206](http://html1.mh-extra.com/html/analog-devices/aducm355/aducm355_hardware-reference-manual_2939808206.webp)
UG-1262
Rev. B | Page 206 of 312
When the cache controller is enabled, 4 kB of the instruction SRAM is reserved for cache data. Those 4 kB of cache data are not
retained in hibernate mode.
Parity bit error detection (optional) is available on all SRAM memories. Two parity bits are associated with each 32-bit word. Parity
check can be configured to be enabled or disabled in different memory regions. Parity is on by default.
Byte, half word, and word accesses are supported.
INSTRUCTION vs. DATA SRAM
If SRAM_CTL, Bit 31 is asserted, 32 kB of SRAM is mapped at Start Address 0x10000000 as two 16 kB instruction SRAMs (see Mode 0
and Mode 1 in Figure 54). 32 kB of data SRAM is mapped in two sections, the first starting at 0x20000000 and the second starting at
0x20040000. If the cache memory feature is used, only 28 kB are available for instruction SRAM (see Mode 1 in Figure 54).
If SRAM_CTL, Bit 31 is 0 and cache is disabled, the 64 kB of SRAM is mapped as data SRAM. The memory is arranged in two sections.
The first (32 kB) is mapped at Start Address 0x20000000 and the second (32 kB) at 0x20040000 (see Mode 2 in Figure 54). If cache
memory feature is used, the second section only maps 28 kB. Therefore, the total data SRAM available is 60 kB (see Mode 3 in Figure 54).
By default, at power-up and hardware reset, the 32 kB of SRAM is made available as instruction SRAM. If the user must use a total of
64 kB data SRAM, SRAM_CTL, Bit 31 must be programmed to 0 at the start of the user code. When the cache controller is enabled,
SRAM Bank 5 is not accessible. A bus error (unmapped address) is generated if an access is attempted.
SRAM RETENTION IN HIBERNATE MODE
The amount of SRAM retained during the hibernate mode varies based on user configuration. The content of the first 8 kB (Bank 0) of
data SRAM is mapped at 0x20000000 and is always retained. The SRAM mapped from 0x20040000 onwards (Bank 3, Bank 4, and
Bank 5) cannot be retained in the hibernate mode. If SRAM_CTL, Bit 1 is enabled, 8 kB of data SRAM mapped from 0x20002000 to
0x20003FFF (Bank 1) is retained in the hibernate mode. If SRAM_CTL, Bit 31 = 1 and SRAM_CTL, Bit 2 is enabled, 16 kB of instruction
SRAM mapped from 0x10000000 to 0x10003FFF (Bank 2) is retained. If SRAM_CTL, Bit 31 = 0, 16 kB of data SRAM mapped from
0x20004000 to 0x20007FFF is retained.
SRAM Programming Model, Stack
The SRAM start address is set to 0x20000000 and the stack pointer is set at 0x20002000. The stack is written from 0x20001FFF
downward. The covered memory region is always retained. To reserve a given size for the stack area, the user can declare a data array of
that desired size ending at Position 0x20001FFF so that the stack is not overwritten by the compiler when allocating new variables.
SRAM Parity
For robustness, parity check can be enabled on all or a user selected group of SRAM banks. Parity check can detect up to two errors per
word. The parity check feature can be enabled by asserting SRAM_CTL, Bits[5:0] for each SRAM bank. The kernel enables these bits by default.
Parity is checked when data is read and when byte or half word data is written. Parity is not checked when a word write (32 bits) is
performed. If a parity error is detected, a bus error is generated. Even if parity error is detected when writing a byte or half word, the
write operation is completed and parity bits are updated according to the new data. The user must manage the parity error in the bus
fault interrupt routine.
SRAM INITIALIZATION
If parity check is enabled, SRAM contents must be initialized to avoid false parity errors. A dedicated hardware feature can automatically
initialize the selected SRAM banks. This process takes 1024 HCLK cycles to complete. This hardware is fully programmable by the user,
and as such, initialization can be started automatically or manually.
Initialization overwrites the contents of the selected SRAM banks. Therefore, initialization must be performed before writing to those
SRAM blocks. If, during the initialization sequence, a write or read access to a SRAM bank being initialized is detected, the access is
pending until the initialization sequence is completed. SRAM banks that are not selected to be initialized can be accessed as usual during
the initialization process of the rest of the banks.
The initialization for a particular SRAM bank can be monitored for its completion by polling the appropriate SRAM_INITSTAT,
Bits[5:0] in the SRAM_INITSTAT read only register. Every time a particular SRAM bank is initialized, its associated SRAM_INITSTAT,
Bits[5:0] are cleared and remain low until initialization is completed.
After power-up, SRAM Bank 0 (8 kB) is automatically initialized. This memory is always retained and contains the stack pointer and
critical information. Bank 0 contents do not have to be overwritten in the future, because initialization has already been performed.
Avoid initializing SRAM banks that are already initialized, because they may already contain user information.