What are the differences between S12G and S12DG memory mapping?

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

What are the differences between S12G and S12DG memory mapping?

546 Views
ganeshvijayakum
Contributor I

Hi,

 

I am facing problem while porting a project from S12DG to S12G micro and not able to correlate the address used between the projects linker .prm files.

 

In S12G linker prm file I have a section PAGE 8 defined as mentioned below,

ROM_PAGE08 = READ_ONLY 0x00088000 TO 0x0008BFFF;

But in S12DG linker prm file the same PAGE 0x8 is defined as section mentioned below,

PAGE38 = READ_ONLY 0x388000 TO 0x38BFFF;

 

So, I am not able to understand why it is mentioned PAGE 0x38 instead of PAGE 0x8?

 

I want to know how the local address is resolved from the Global address or alternative addressing in S12DG micro.

 

Thanks in advance,

 

Regards,

Ganesh Vijaya Kumar P

Labels (1)
Tags (1)
0 Kudos
1 Reply

417 Views
RadekS
NXP Employee
NXP Employee

Hi Ganesh,

S12D and S12G do not share the same memory mapping scheme.

The S12G is at least two generation newer family than S12D family (S12D->S12XD->S12XE->S12P/S12G).

The S12G also don’t have external bus and therefore it do not need such flexible mapping mechanism as old S12D family. All mapping at S12G is pretty straightforward (The memory map if almost fix, cannot be configured as in the case of S12D).

S12G memory map:

S12G memory map.png

S12G PPAGE register:

S12G PPAGE.png

S12D memory map:

S12D memory map.png

S12D PPAGE register:

S12D PPAGE.png

So, the main point is that we have to refer pages according to the last page. From that point of view, the S12D 0x3F page refers to S12G 0x0F page.

Note: The significant change for S12G is in range 0x4000~0x7FFF which refers now to page 0x0D (the last page-2) in order to the ability to create linear unbanked address space in range 0x4000~0xFFFF.

The global (physical) addresses at S12G family are used mainly for Flash programming routines.

S12G global address.png

The S12G examples (The flash example contains local to global address routine):

https://community.nxp.com/docs/DOC-93792

Some more details about S12D mapping scheme could be found for example here:

http://www.nxp.com/files/microcontrollers/doc/eng_bulletin/EB386.pdf

I hope it helps you.

Have a great day,

Radek

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos