![]() |
![]() |
Functions | |
| CSL_Status | MEM_init (void) |
| CSL_Status | MEM_enableRetentionMode (CSL_MemType memType) |
| CSL_Status | MEM_disableRetentionMode (CSL_MemType memType) |
| CSL_Status | MEM_enablePartialRetentionMode (CSL_MemType memType, Uint16 bankNumber, Uint32 bankMask) |
| CSL_Status | MEM_disablePartialRetentionMode (CSL_MemType memType, Uint16 bankNum, Uint32 bankMask) |
| CSL_Status | MEM_setmSDRAMClock (CSL_MEMmSDRAMClock clockSwitch) |
| Bool | MEM_getmSDRAMClock (void) |
| CSL_Status MEM_disablePartialRetentionMode | ( | CSL_MemType | memType, |
| Uint16 | bankNumber, | ||
| Uint32 | bankMask | ||
| ) |
===========================================================================
MEM_disablePartialRetentionMode
Description
This function disables retention mode for single or group of banks in DARAM or SARAM. Memory retention mode is disabled by configuring the RAM Sleep Mode Control Register. Any memory bank of DARAM or SARAM can be independently configured for disabling memory retention mode using this API.
Usage of parameters 'bankNumber' and 'bankMask' This API provides two parameters to select a single block of memory or a group of memory banks to disable retention mode
bankNumber: Used to select a single block of memory. This number will be from 0 to 7 for DARAM and 0 to 31 for SARAM. This input is provided for to make bank number selection easy.
bankMask: This is a 32 bit number each bit represents one memory bank. For DARAM only 8 bits are valid. To disable memory retention mode for a memory bank set corresponding bit of 'bankMask' to '1'. For example to disable memory retention mode for SARAM banks 0, 5 and 12, value of 'bankMask' should be 0x1021. Use the macro CSL_MEM_MAKE_BANKMASK to make the bankMask.
Set 'bankMask' to '0' while using 'bankNumber' for selecting a single bank. Set 'bankNumber' to '0' while using 'bankMask' for selecting a group of banks.
NOTE: PARTIAL MEMORY RETENTION MODE IS NOT SUPPORTED ON THE CHIP C5505
memType Type of the CPU memory - DARAM/SARAM
bankNumber Bank number - To select a single memory bank.
bankMask Bank mask - To select a group of memory banks.
@end verbatim
*
* <b> Return Value </b>
* @li CSL_SOK - Returned for success
* @li CSL_ESYS_INVPARAMS - Invalid input parameters
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Disables memory retention mode for the memory specified
*
* @b Modifies
* @n RAM Sleep Mode Control Register
*
* @b Example
* @verbatim
CSL_Status status;
Uint32 bankMask;
bankMask = 0
//Disable memory retention mode for SARAM bank 5
status = MEM_disablePartialRetentionMode (CSL_MEM_SARAM, 5, 0);
//Disable memory retention mode for SARAM banks 6, 25, 30.
bankMask = CSL_MEM_MAKE_BANKMASK(6);
bankMask |= CSL_MEM_MAKE_BANKMASK(25);
bankMask |= CSL_MEM_MAKE_BANKMASK(30);
status = MEM_disablePartialRetentionMode (CSL_MEM_SARAM, 0,
bankMask);
===========================================================================
References CSL_DARAM_BANK_COUNT, CSL_DARAM_BANK_NUM_MAX, CSL_MEM_DARAM_BANKMASK, CSL_MEM_DISABLE_BANK_SLEEP, CSL_SARAM_BANK_COUNT, and CSL_SARAM_BANK_NUM_MAX.
| CSL_Status MEM_disableRetentionMode | ( | CSL_MemType | memType | ) |
===========================================================================
MEM_disableRetentionMode
Description
This function disables the memory retention mode for DARAM or SARAM. Memory retention mode is disabled by configuring the RAM Sleep Mode Control Register. Memory retention mode for DARAM or SARAM can be independently disabled using this API.
NOTE: This function disables memory retention mode for the entire DARAM or SARAM. This function can be used on both chips C5505 and C5515.
memType Type of the CPU memory - DARAM/SARAM
Return Value
Pre Condition
None
Post Condition
Disables memory retention mode for the memory specified
Modifies
RAM Sleep Mode Control Register
Example
CSL_Status status;
status = MEM_disableRetentionMode (CSL_MEM_DARAM);
===========================================================================
===========================================================================
MEM_disableRetentionMode
Description
This function disables the memory retention mode for DARAM or SARAM. Memory retention mode is disabled by configuring the RAM Sleep Mode Control Register. Memory retention mode for DARAM or SARAM can be independently disabled using this API.
memType Type of the CPU memory - DARAM/SARAM
Return Value
Pre Condition
None
Post Condition
Disables memory retention mode for the memory specified
Modifies
RAM Sleep Mode Control Register
Example
CSL_Status status;
status = MEM_disableRetentionMode (CSL_MEM_DARAM);
===========================================================================
References CSL_MEM_DISABLE_ALL_SLEEP.
| CSL_Status MEM_enablePartialRetentionMode | ( | CSL_MemType | memType, |
| Uint16 | bankNumber, | ||
| Uint32 | bankMask | ||
| ) |
===========================================================================
MEM_enablePartialRetentionMode
Description
This function enables retention mode for single or group of banks in DARAM or SARAM. In the memory retention mode memory goes to low power mode while maintaining its contents. When the memory is placed in retention mode, no accesses is allowed. Memory retention mode is enabled by configuring the RAM Sleep Mode Control Register. Any memory bank of DARAM or SARAM can be independently configured for the memory retention mode using this API. Enabling memory retention mode for a particular bank will effect that memory bank only and rest of the memory works normally.
Usage of parameters 'bankNumber' and 'bankMask' This API provides two parameters to select a single block of memory or a group of memory banks to enable retention mode
bankNumber: Used to select a single block of memory. This number will be from 0 to 7 for DARAM and 0 to 31 for SARAM. This input is provided for to make bank number selection easy.
bankMask: This is a 32 bit number each bit represents one memory bank. For DARAM only 8 bits are valid. To enable memory retention mode for a memory bank set corresponding bit of 'bankMask' to '1'. For example to enable memory retention mode for SARAM banks 0, 5 and 12, value of 'bankMask' should be 0x1021. Use the macro CSL_MEM_MAKE_BANKMASK to make the bankMask.
Set 'bankMask' to '0' while using 'bankNumber' for selecting a single bank. Set 'bankNumber' to '0' while using 'bankMask' for selecting a group of banks.
NOTE: PARTIAL MEMORY RETENTION MODE IS NOT SUPPORTED ON THE CHIP C5505
memType Type of the CPU memory - DARAM/SARAM
bankNumber Bank number - To select a single memory bank.
bankMask Bank mask - To select a group of memory banks.
Return Value
Pre Condition
None
Post Condition
Enables memory retention mode for the memory specified
Modifies
RAM Sleep Mode Control Register
Example
CSL_Status status;
Uint32 bankMask;
bankMask = 0
//Enable memory retention mode for SARAM bank 5
status = MEM_enablePartialRetentionMode (CSL_MEM_SARAM, 5, 0);
//Enable memory retention mode for SARAM banks 6, 25, 30.
bankMask = CSL_MEM_MAKE_BANKMASK(6);
bankMask |= CSL_MEM_MAKE_BANKMASK(25);
bankMask |= CSL_MEM_MAKE_BANKMASK(30);
status = MEM_enablePartialRetentionMode (CSL_MEM_SARAM, 0,
bankMask);
===========================================================================
References CSL_DARAM_BANK_COUNT, CSL_DARAM_BANK_NUM_MAX, CSL_MEM_DARAM_BANKMASK, CSL_MEM_ENABLE_BANK_SLEEP, CSL_MEM_SLEEPMODE_BIT_MASK, CSL_SARAM_BANK_COUNT, and CSL_SARAM_BANK_NUM_MAX.
| CSL_Status MEM_enableRetentionMode | ( | CSL_MemType | memType | ) |
===========================================================================
MEM_enableRetentionMode
Description
This function enables the retention mode for whole DARAM or SARAM. In the memory retention mode memory goes to low power mode while maintaining its contents. When the memory is placed in retention mode, no accesses is allowed. Memory retention mode is enabled by configuring the RAM Sleep Mode Control Register. DARAM or SARAM can be independently configured for the memory retention mode using this API.
NOTE: This function enables memory retention mode for the entire DARAM or SARAM. This function can be used on both chips C5505 and C5515.
memType Type of the CPU memory - DARAM/SARAM
Return Value
Pre Condition
None
Post Condition
Enables memory retention mode for the memory specified
Modifies
RAM Sleep Mode Control Register
Example
CSL_Status status;
status = MEM_enableRetentionMode (CSL_MEM_DARAM);
===========================================================================
===========================================================================
MEM_enableRetentionMode
Description
This function enables the retention mode for DARAM or SARAM. In the memory retention mode memory goes to low power mode while maintaining its contents. When the memory is placed in retention mode, no accesses is allowed. Memory retention mode is enabled by configuring the RAM Sleep Mode Control Register. DARAM or SARAM can be independently configured for the memory retention mode using this API. Enabling partial memory retention mode for SARAM or DARAM is not possible.
memType Type of the CPU memory - DARAM/SARAM
Return Value
Pre Condition
None
Post Condition
Enables memory retention mode for the memory specified
Modifies
RAM Sleep Mode Control Register
Example
CSL_Status status;
status = MEM_enableRetentionMode (CSL_MEM_DARAM);
===========================================================================
References CSL_MEM_ENABLE_ALL_SLEEP.
| Bool MEM_getmSDRAMClock | ( | void | ) |
===========================================================================
MEM_getmSDRAMClock
Description
This function is used to get the value mSDRAM Clock output switch.
None
@end verbatim
*
* <b> Return Value </b> Bool
* @li TRUE - mSDRAM Clock output switch is OFF
* @li FALSE - mSDRAM Clock output switch ON
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Bool clkStatus;
clkStatus = MEM_getmSDRAMClock();
===========================================================================
| CSL_Status MEM_init | ( | void | ) |
===========================================================================
MEM_init
Description
This is the initialization function for the memory CSL module. No functionality is added for this API. This function always returns success. This function is provided for the future use.
Arguments
None
Return Value
Pre Condition
None
Post Condition
None
Modifies
None
Example
CSL_Status status;
status = MEM_init();
===========================================================================
| CSL_Status MEM_setmSDRAMClock | ( | CSL_MEMmSDRAMClock | clockSwitch | ) |
===========================================================================
MEM_setmSDRAMClock
Description
This function is used to make the mSDRAM Clock output switch ON and OFF
clockSwitch Value to switch the clock
@end verbatim
*
* <b> Return Value </b>
* @li CSL_SOK - Returned for success
* @li CSL_ESYS_INVPARAMS - Invalid input parameters
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Configures the mSDRAM output clock state
*
* @b Modifies
* @n SDRAM clock control register
*
* @b Example
* @verbatim
CSL_Status status;
// Turn the mSDRAM output clock ON
status = MEM_setmSDRAMClock (CSL_MEM_MSDARAM_CLOCK_ON);
===========================================================================
1.7.4