Mass Erase MC9S12DP512...for the Freescalers

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

Mass Erase MC9S12DP512...for the Freescalers

3,155 次查看
Franky_TJ_
Contributor I
hi  to all ..
 OK so know i cant unlock the the flashon the MC9S12DP512, there was no problem when the squence  thats on page 1237 chapter 30 ran completly  everything was OK but. when i interrupted the sequence after only doing the MASS_ERASE, the 0xFF0F byte remained at 0xFF (the secured state). and now even if i run the complete sequence. It remains locked.. HELP!!
 
I'm using a custom made DBM.. with the 9se64 as host conected to the MC9S12DP512 BKGD pin
标签 (1)
0 项奖励
回复
4 回复数

1,032 次查看
Alban
Senior Contributor II
Yep Franky,

It's normal. You secured it, now you need to unsecure it.
Run the routine called unsecure available for ICD12.
If you don't have it, either look on the Forum or just do what the datasheet says.

I don't know what a 9SE64 is, but it's not cable dependant. You need to respect the unsecure procedure.

Alban.
0 项奖励
回复

1,032 次查看
Franky_TJ_
Contributor I
o sorry its another micro correct number MC9S12E64.. i'm doing a fixture to program boards that have the MC9S12DP512... I am using  the procedure in the DataSheet.. but still no luck ...i can unlockit with the HiWave Software but I need to know that my fixture can do the same....
0 项奖励
回复

1,032 次查看
Franky_TJ_
Contributor I
HI its working now here is at least the secuence  that i used based on the Data sheets
you might notice a litle ASM{ ..} Block well i did that because the CodeWarrior wasnt executing does rutines.. when i use the DISASSEMBLE tool it was jumping them so for any one that this coul be helpful
 
thanks ALBAN
void FlashUnLock()
{  
 
 Reset_Target();
 Send_BDM_Byte(ACKEN);
 //MASS ERASE EEPROM
 Delay();
 WriteData(WRITB, 0x0110,0x3200);//eclk
 WriteData(WRITB, 0x0114,0xFF00);//eprot
 WriteData(WRITB, 0x0115,0x0030);//estat reg
 WriteData(WRITW, 0x0118,0x0000);
 WriteData(WRITW, 0x011A,0x0000);
 WriteData(WRITB, 0x0116,0x4100);
 WriteData(WRITB, 0x0115,0x0080);
 Delay();
 //MASS ERASE FLASH
 WriteData(WRITB, 0x0100,0x3200); //clk
 WriteData(WRITB, 0x0103,0x0000); //cnfg
 WriteData(WRITB, 0x0102,0x1000);  //mod
 WriteData(WRITB, 0x0104,0xFF00); //fprot
 WriteData(WRITB, 0x0105,0x0030); //fstat
 WriteData(WRITW, 0x0108,0x0000);//faddr
 WriteData(WRITW, 0x010A,0x0000);//fadata
 WriteData(WRITB, 0x0106,0x4100);
 WriteData(WRITB, 0x0105,0x0080);
 Delay();
 asm
 {
  
 JSR Reset_Target
 JSR Delay
 JSR Delay //WATING FOR THE BDM FIRMWARE TO FINISH THE BLANK CHECK
 }
 Send_BDM_Byte(ACKEN);
 //REPROGRAM THE SECURITY BYTE 
 WriteData(WRITB, 0x0100,0x3200);//clk
 WriteData(WRITB, 0x0103,0x0000);//cnfg
 WriteData(WRITB, 0x0104,0xff00);//fprot
 WriteData(WRITW, 0xFF0E,0xFFBE); //flash
 WriteData(WRITB, 0x0106,0x2000); //cmd
 WriteData(WRITB, 0x0105,0x0080); //stat
 Delay();
 Reset_Target();
 Delay();
 Send_BDM_Byte(ACKEN); 
 
}

Message Edited by Franky_TJ_ on 2006-10-1808:56 PM

0 项奖励
回复

1,032 次查看
Alban
Senior Contributor II
Hi Franky,

Delighted it works for you now.
Thanks for posting the Un-Secure procedure !

Alban.
0 项奖励
回复