confuse in memory map of mc9s12p128.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

confuse in memory map of mc9s12p128.

ソリューションへジャンプ
1,612件の閲覧回数
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.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,209件の閲覧回数
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.


元の投稿で解決策を見る

4 返答(返信)
1,208件の閲覧回数
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.

1,208件の閲覧回数
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 件の賞賛
返信
1,210件の閲覧回数
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.


1,209件の閲覧回数
prashanterande
Contributor I

Thanks a lot sir!

this is working!

cleared all doubts

thanks once again.

0 件の賞賛
返信