Problem with loading code to Flash w/P&E MULTILINK

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

Problem with loading code to Flash w/P&E MULTILINK

5,002 次查看
kji
Contributor II
I use CW12V3.1 w/P&E MULTILINK on 9S12E64 (4MHZ oscillator). Code is not able to be loaded to the Flash. (Memory model is selected as banked). Please anyone help this out..
Memory Map information on command window:

in>mem
-------------------------------------------------------
Memory Map for MC9S12E64 derivative, MCUID=3E3
Internal Registers 00000000..0000027F
-------------------------------------------------------
Memory Addresses
-------------------------------------------------------

REGISTERS 00000000..000003FF (enabled)
RAM 00005800..000077FF (enabled)
FLASH 00004000..00007FFF (disabled)
FLASH 0000C000..0000FFFF (disabled)
FLASH 00008000..0000BFFF (disabled)
FLASH 00388000..0038BFFF (disabled)
FLASH 00398000..0039BFFF (disabled)
FLASH 003A8000..003ABFFF (disabled)
FLASH 003B8000..003BBFFF (disabled)
FLASH 003C8000..003CBFFF (disabled)
FLASH 003D8000..003DBFFF (disabled)
FLASH 003E8000..003EBFFF (disabled)
FLASH 003F8000..003FBFFF (disabled)
-------------------------------------------------------
.PRM file shows:     
...
      RAM  =  READ_WRITE                0x00002000 TO 0x00003FFF;
      ROM_C000  =  READ_ONLY            0x0000C000 TO 0x0000FF7F;
      ROM_4000  =  READ_ONLY            0x00004000 TO 0x00007FFF;
      ROM_PAGE3C  =  READ_ONLY          0x003C8000 TO 0x003CBFFF;
      ROM_PAGE3D  =  READ_ONLY          0x003D8000 TO 0x003DBFFF;
      ROM_PAGE3E  =  READ_WRITE         0x003E8000 TO 0x003EBFFF;
      ROM_PAGE3F  =  READ_WRITE         0x003F8000 TO 0x003FBFFF;
...
标签 (1)
0 项奖励
回复
5 回复数

1,217 次查看
mke_et
Contributor IV
When I got some new 9S12DG128 chips in, I found that I had errors that didn't make sense sometimes, and I had to manually tell CW to erase everything. Evidently the security bit or something got set.

And just for a reference, I just took a look at my project.ini file, and in the ICD12 section I show the bank at 3F (for C000) is Unbanked. Now I didn't set that up, it was done automatically for me. In the real time debugger, in the ICD-12 pulldown, I show that C000 is listed as 'physical' from C000 to FFFF for the debugging maps.
0 项奖励
回复

1,217 次查看
kji
Contributor II

Thank you for your information. "NON_BANKED 24 R 0xC06D 0xC084 ROM_C000" is file P&E_ICD.map. So i guess I don't have to reset up on my case.

I also changed 8000-BFFF to C000-FFFF on the ICD-12 pulldown. unfortunately problem is still unsolved.

I guess I have to manually tell CW to erase everything but how to do it?

Thanks again.

 

 

0 项奖励
回复

1,217 次查看
CompilerGuru
NXP Employee
NXP Employee
Usually you should not have to change the factory setting in the icd12.

What I dont understand in this prm file snippet:

> ROM_C000 = READ_ONLY 0x0000C000 TO 0x0000FF7F;
> ROM_PAGE3F = READ_WRITE 0x003F8000 TO 0x003FBFFF;

Well, this is the same flash memory used twice as far as I know. Once as READ_ONLY and once even as READ_WRITE.
Why do you specify the ROM_PAGE3F page at all?

Same thing for those two:
ROM_4000 = READ_ONLY 0x00004000 TO 0x00007FFF;
ROM_PAGE3E = READ_WRITE 0x003E8000 TO 0x003EBFFF;

Can you flash a normal, unmodified application generated by the project wizard?
0 项奖励
回复

1,217 次查看
kji
Contributor II
I have two different MCUs - 9S12E128 and 9S12E64.
I have created two simple projects by PE on CW3.1 for both MCUs (same function) . BTW, I seleted memory model as Banked.
The 9S12E128(on an evaluate board) works great but 9S12E64 (a PCB) has same problem.
Here is PE auto-created flash information in .PRM file.
SECTIONS
      /* List of all sections specified on the "Build options" tab */
      RAM  =  READ_WRITE                0x00002000 TO 0x00003FFF;
      ROM_C000  =  READ_ONLY            0x0000C000 TO 0x0000FF7F;
      ROM_PAGE3C  =  READ_ONLY          0x003C8000 TO 0x003CBFFF;
      ROM_PAGE3D  =  READ_ONLY          0x003D8000 TO 0x003DBFFF;
      ROM_PAGE3E  =  READ_WRITE         0x003E8000 TO 0x003EBFFF;
      ROM_PAGE3F  =  READ_WRITE         0x003F8000 TO 0x003FBFFF;
I also tried to disable ROM_PAGE3E-F.still same issue
Thanks.
0 项奖励
回复

1,217 次查看
kji
Contributor II
 
I found out a design issue on the custom board. Code is still not written to flash completely but improved after the hardware was fixed. The issue now is that flash 00004000-00007FFF only is disabled (see below). Since the same BDM pad and code have been used on an evaluation board never had problems. Does the board still have other issues? Please advice.
 
in>mem
-------------------------------------------------------
 Memory Map for MC9S12E64 derivative, MCUID=3E3
 Internal Registers   00000000..0000027F        
-------------------------------------------------------
 Memory               Addresses
-------------------------------------------------------
 REGISTERS            0000FF00..000102FF  (enabled)
 RAM                  0000F800..000117FF  (enabled)
 FLASH                00004000..00007FFF (disabled)
 FLASH                0000C000..0000FFFF  (enabled)
 FLASH                00008000..0000BFFF  (enabled)
 FLASH                00388000..0038BFFF  (enabled)
 FLASH                00398000..0039BFFF  (enabled)
 FLASH                003A8000..003ABFFF  (enabled)
 FLASH                003B8000..003BBFFF  (enabled)
 FLASH                003C8000..003CBFFF  (enabled)
 FLASH                003D8000..003DBFFF  (enabled)
 FLASH                003E8000..003EBFFF  (enabled)
 FLASH                003F8000..003FBFFF  (enabled)
------------------------------------------------------
 
0 项奖励
回复