Memory mapping of XGATE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory mapping of XGATE

742 Views
everkimage
Contributor IV

My MCU is S12XEQ.

In the official project "Simple SCI" from AN3144,i get functions address in the map file:

main : 0xFE8016

SCI_Thread : 0xFB12C4

Accordding to the datasheet,Flash paged window range from 0x8000~0xBFFF,so the paged address should look like 0xXX8000~0xXXBFFF,just like the address of function main().

why does the address of function SCI_Thread() get be 0xFB12C4,although it's a XGATE Thread.

Labels (1)
6 Replies

526 Views
everkimage
Contributor IV

The vector value is 0xB2C4 and the actuall execution address is 0xB2C4 too.

But why does it get be 0xFB12C4 in the map file.

0 Kudos

526 Views
everkimage
Contributor IV

ok~,XGATE_CODE segment is putted into RAM page FB,FC,and RAM window ranges from 0x1000~0x1FFF(4KB),so 0xFB12C4 is right.

But in the simulator,PC value of XGATE is 0xB2C4(so with vector value) while execute the function SCI_Thread() ,why?

0 Kudos

526 Views
kef2
Senior Contributor IV

XGATE sees memory little different than S12X. Up to 32kB of RAM is available at 0x8000..0xFFFF (from XGATE point of view), peripherals registers the same like S12X 0x0..0x7FF, flash page 0xE0 at 0x800..0x3FFF, flash page 0xE1 at 0x4000..0x7FFF. XGATE memory is not paged, RPAGE, PPAGE don't affect in any way what XGATE sees at given address. XGATE RAM addresses 0x8000..0xFFFF correspond to global address 0xF_8000..0xF_FFFF. XGATE RAM addresses 0x8000..0x8FFF corresponds to S12X RPAGE=0xF8, 0x9000..0x9FFF - RPAGE=0xF9, 0xA000..0xAFFF - RPAGE=0xFA and so on.

526 Views
everkimage
Contributor IV

Thank you very much.

As you said,0xFB12C4 means RPAGE = 0xFB,and the offset is 0x12C4,minus the RAM window range start address 0x1000,the offset is 0x02C4.So in the XGATE,the address of SCI_Thread is 0xB2C4.Is it right?

If XGETE thread is put into a paged flash,whileit is executed,there is no affect to PPAGE.Is it right?

And which pdf file can i find the knowledge about XGATE memory map?

0 Kudos

526 Views
kef2
Senior Contributor IV

right.

right.

See S12XE RM Figure 1-3. XGATE Global Address Mapping

0 Kudos

526 Views
RadekS
NXP Employee
NXP Employee

Hi Everk,

you may also use the attached S12XE memory map in excel file for your reference.

I hope it helps you.

Best regards

Radek