confuse in memory map of mc9s12p128.

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

confuse in memory map of mc9s12p128.

Jump to solution
1,276 Views
prashanterande
Contributor I

HI all,

I prashant, need your precious guidance in memory map of s12p family.

first time use this derivative. I worked on gt16,gt32,qe16,qe32, and many more.. also uses flash as eeprom. but in s12p i am not cleared.

i am using s12p128, i want to write Dflash(4K), as my data flash.

but problem in address.

 

main issue..

"global vs local?"

 

in local $400 is dflash start but in global i seen [$4400,$10400,etc] are address of dflash.

please help me!

I have seen flash and eeprom drivers example.

Labels (1)
0 Kudos
1 Solution
873 Views
RadekS
NXP Employee
NXP Employee

S12P has flash (P-flash, D-flash) based on 180nm technology, therefore you need global addresses for programming. However S12P didn’t contain GPAGE (only S12X MCUs has GPAGE), therefore core cannot understand to global addresses (for reading you have to use local addresses).

In attachment you can find simple example codes for D-Flash and P-Flash programming.

Note: Example codes are in C language.


View solution in original post

4 Replies
872 Views
kef
Specialist I

Yes, you need to use global addresses when programming P- and D-flash. Since whole D-flash on S12P fits nonbanked CPU  address space, it is the easiest to add 0x4000 to nonbanked address of data in D-flash to get global address used in flash programming. So that nonbanked address 0x400 gets converted to 0x4400, 0x401 to 0x4401 and so on.

872 Views
prashanterande
Contributor I

thanks for reply!

ya but in my program,  i have start Rom from $8000, so my program will be fit in $8000 to $fffe.

I have to use our Dflash to store my variables permanently. which is starting from $400 to $13ff.

please explain with example.

IMP:- we are using assembly language programming.

0 Kudos
874 Views
RadekS
NXP Employee
NXP Employee

S12P has flash (P-flash, D-flash) based on 180nm technology, therefore you need global addresses for programming. However S12P didn’t contain GPAGE (only S12X MCUs has GPAGE), therefore core cannot understand to global addresses (for reading you have to use local addresses).

In attachment you can find simple example codes for D-Flash and P-Flash programming.

Note: Example codes are in C language.


873 Views
prashanterande
Contributor I

Thanks a lot sir!

this is working!

cleared all doubts

thanks once again.

0 Kudos