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.
解決済! 解決策の投稿を見る。
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.
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.
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.
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.
Thanks a lot sir!
this is working!
cleared all doubts
thanks once again.