confuse in memory map of mc9s12p128.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

confuse in memory map of mc9s12p128.

跳至解决方案
1,684 次查看
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,281 次查看
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,280 次查看
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,280 次查看
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,282 次查看
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,281 次查看
prashanterande
Contributor I

Thanks a lot sir!

this is working!

cleared all doubts

thanks once again.

0 项奖励
回复