Hi,
I am using AM335x processor and Code Composer Studio for coding.
In the starterware examples, there is some codes for MMU.
/*
** Function to setup MMU. This function Maps three regions ( 1. DDR
) and enables MMU.
*/
void MMUConfigAndEnable(void)
{
/*
** Define DDR memory region of AM335x. DDR can be configured as Normal
** memory with R/W access in user/privileged modes. The cache attributes
** specified here are,
** Inner - Write through, No Write Allocate
** Outer - Write Back, Write Allocate
*/
REGION regionDdr = {
MMU_PGTYPE_SECTION, START_ADDR_DDR, NUM_SECTIONS_DDR,
MMU_MEMTYPE_NORMAL_NON_SHAREABLE(MMU_CACHE_WT_NOWA,
MMU_CACHE_WB_WA),
MMU_REGION_NON_SECURE, MMU_AP_PRV_RW_USR_RW,
(unsigned int*)pageTable
};
/* Initialize the page table and MMU */
MMUInit((unsigned int*)pageTable);
/* Map the defined regions */
MMUMemRegionMap(®ionDdr);
/* Now Safe to enable MMU */
MMUEnable((unsigned int*)pageTable);
}
In the above code, they have mention like, they are configuring DDR through MMU functions. Also i have seperate header file for DDR2 register settings. I am not able to figure it out. What i have to do actually for configuring DDR? I am ready with the appropriate register settings. What i have to do further?
Guide with some ideas. Thank You.