Part Number: TMDXIDK437X
Hello.
I apologize for repeated questions, I have already raised a similar topic here.
https://e2e.ti.com/support/processors/f/791/t/881329
Unfortunately for me the question has not been completely closed. I read the documents that Frank advised me. Understanding how MMU works has become better but not quite.
I could not answer the question for myself on what principle the addresses of peripheral modules are assigned. In different examples, it looks different.
For example, let take UART_BasicExample_idkAM437x_armExampleProject. In cfg file we see:
/* ================ Cache and MMU configuration ================ */
var Cache = xdc.useModule('ti.sysbios.family.arm.a9.Cache');
Cache.enableCache = true;
Cache.configureL2Sram = false;//DDR build
var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
Mmu.enableMMU = true;
/* Force peripheral section to be NON cacheable strongly-ordered memory */
var peripheralAttrs = {
type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
tex: 0,
bufferable : false, // bufferable
cacheable : false, // cacheable
shareable : false, // shareable
noexecute : true, // not executable
};
/* Define the base address of the 1 Meg page the peripheral resides in. */
var peripheralBaseAddr = 0x44DF2800; <------------------------------------------------- CM_WKUP 0x44DF_2800 0x44DF_3FFF Clock Module Wakeup Registers from Table 2-2. L4_WKUP Memory Map
/* Configure the corresponding MMU page descriptor accordingly */
Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
peripheralBaseAddr,
peripheralAttrs);
Now for an example let take NIMU_ICSS_BasicExample_idkAM437x_wSoCLib_armExampleproject, and in cfg file we see:
var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
Mmu.enableMMU = true;
/* Force peripheral section to be NON cacheable sssh://git@bitbucket.itg.ti.com/processor-sdk/processor-pdk-packages.gittrongly-ordered memory */
var peripheralAttrs = {
type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
tex: 0,
bufferable : false, // bufferable
cacheable : false, // cacheable
shareable : false, // shareable
noexecute : true, // not executable
};
/* Define the base address of the 1 Meg page the peripheral resides in. */
var peripheralBaseAddr = 0x40300000; <------------------------------- OCMCRAM 0x4030_0000 0x4033_FFFF 256KB 32-bit Ex/R/W [2] – L3 OCMC SRAM Table 2-1. L3 Memory Map
/* Configure the corresponding MMU page descriptor accordingly */
Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
peripheralBaseAddr,
peripheralAttrs);
/* Define the base address of the 1 Meg page the peripheral resides in. */
var peripheralBaseAddr = 0x44D00000; <------------------------------- Reserved 0x44D0_0000 0x44D0_3FFF 16KB Table 2-2. L4_WKUP Memory Map
/* Configure the corresponding MMU page descriptor accordingly */
Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
peripheralBaseAddr,
peripheralAttrs);
/* Define the base address of the 1 Meg page the peripheral resides in. */
var peripheralBaseAddr = 0x54400000; <------------------------------ PRU_ICSS1 0x5440_0000 0x547F_FFFF 4MB PRU-ICSS1 Instruction/Data/Control Space [4] Table 2-1. L3 Memory Map (continued)
/* Configure the corresponding MMU page descriptor accordingly */
Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
peripheralBaseAddr,
peripheralAttrs);
By what principle are values assigned to a variable peripheralBaseAddr? Why in some examples there are three, in some one? And why in example UART_BasicExample_idkAM437x var peripheralBaseAddr = 0x44DF2800? If I write var peripheralBaseAddr = 0x44DF0000 (PRCM 0x44DF_0000 0x44DF_FFFF 64KB Module Table 2-2. L4_WKUP Memory Map), the example work too.
What should be guided when it is necessary to assign an address?