![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_59.png)
11-2
MemoryPower Management
Programmer’s Manual
are driven by the system clock, power saving on the CPU core can be achieved
without sacrificing peripheral response time.
11.2
Power Modes
Figure 11-1 shows the state diagram for the power modes. There are six modmanagement tools provided by the compiler are disabled. PPSM provides a set of
defined in PPSM.
System Internal Modes:
Initialization mode
System mode
Wake-up mode
Application Modes:
Normal mode
Doze mode
Sleep mode
11.3
System Internal Modes
Initialization, System and Wake-up modes are only used internally by PPSM.
Doze
Sleep
Wake-up
Power On / Reset
Normal
System
Initialization
Figure 11-1 PPSM Power Modes
Application Modes
System Internal Modes
Personal Portable System Manager
Programmer’s Manual
10-1
In order for PPSM to manage system memory usage, the standard memory
its own memory tools that allow the application programmers to dynamically
allocate memory from the system. The size of this dynamic memory available to
PPSM is specified in the Linker Specification File (Refer to Chapter 34 - Linker
Specification File).
Note:
For allocating memory to panning screen, a special memory
allocation function called GetScreenMem() in Chapter 6 - Using
Graphics Tools is used.
10.1
Allocating Memory
void *
Lmalloc
(U32 size)
void *
Lcalloc
(U32 size)
Memory can be allocated to the application at run time. PPSM returns to the caller
a pointer to a block of available memory of the specified size. The memory
returned to the caller is not initialized if Lmalloc() is called, or is initialized to zero if
Lcalloc() is used. No automatic boundary checking is performed on the memory
when used by the caller. The size of the largest block of memory can be allocated
through Lmalloc() can be found by calling Lmalloc( LARGEST_MALLOC_SIZE ).
If no memory is left in the system, these routines return a NULL.
The actual size of memory allocated by the system is larger than the size
requested by user. A header is embedded in the allocated memory block for
memory management. Nevertheless, it is transparent to user. User can directly
use the required size of memory block start at the returned address if the returned
value is not NULL.
10.2
Freeing Memory
void
Lfree
(void *ptr)
When an application finishes with a block of dynamically allocated memory, the
memory can be recycled by using the Lfree() tool. It puts the memory block back
into the system heap and the memory is ready for allocation again.
The pointer passed into this routine must be a valid pointer returned from
Lmalloc() ,Lcalloc() or Lrealloc().
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.