mc9s12dg128 1l59w rewrite flash data

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

mc9s12dg128 1l59w rewrite flash data

9,839件の閲覧回数
Jimmy_1
Contributor I

Hi to all, This is my first post, I'm from Italy and Im a Student. At the moment I'm trying to work with an mc9s12dg128 1l59w. I need to write flash data on it. At the moment I'm trying with an debugger but its not full compatible. I can write eeprom sector and flash but when I read it again the flash data is still the same. To do that I used pin 23 bkgd, 36 clks, 40 vss, 41 vdd 42 reset and 46 extal.  Anyone can kindly tell me how can I solve my problem? 

Thank you. 

0 件の賞賛
返信
10 返答(返信)

9,718件の閲覧回数
Jimmy_1
Contributor I

I can't mention my debugger. Now my debugger is broken. I download the your .zip but I'm unable to do anything with it. Codewarrier is to much expensive for me. Do you kindly tell me if there's any other solutions to use my usbdm  to read this mcu? Any other software free or not expensive.

0 件の賞賛
返信

9,808件の閲覧回数
Jimmy_1
Contributor I

Hi @Danielmartynec and thank you for you interesting. Sorry but I think I can't mention my debugger name. Please look this image (web source) if I change any value and write it on the mcu when I read it again it's still same as before. No error flag when I write.

Is there any other solutions with less expensive hardware. Seeger j-Link V9 can work with this mcu? 

Regards,

Jimmy

0 件の賞賛
返信

9,800件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Jimmy_1,

I understand this is an issue of the debugger that you use.

Segger J-link does not support S12 MCUs, all supported devices are listed there:

https://www.segger.com/downloads/supported-devices.php?m=NXP

 

Please refer to this thread:

https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-you-recommend-to-me-which-programmer-sh...

 

BR, Daniel

 

0 件の賞賛
返信

9,762件の閲覧回数
Jimmy_1
Contributor I

I bought this tool on Amazon https://www.amazon.it/supporto-versione-supporta-lemulatore-velocit%C3%A0/dp/B07KSD2SFF/ref=mp_s_a_1...

Do you think I became able to read and write my MCU even it's protected?

@danielmartynek 

0 件の賞賛
返信

9,737件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Jimmy_1,

When the MCU is secured (FSEC_SEC != 0b10), the debugger can't read the internal memory.

It should be able to erase it though.

I don't have any experience with this probe, unfortunately.

 

Regards,

Daniel

0 件の賞賛
返信

9,717件の閲覧回数
Jimmy_1
Contributor I

"...It should be able to erase it though...."  this is nice . But just now I see codewarrior 5.2 licence is almost 1000 $. Do you Know any other solutions less expensive? 

0 件の賞賛
返信

9,715件の閲覧回数
kef2
Senior Contributor V

Hi,

CW special edition is still available. Up to 32k of compiled C code , unlimited asm code.

CodeWarrior® Development Tools Suite - Special | NXP Semiconductors

Edward

9,682件の閲覧回数
Jimmy_1
Contributor I

Hi Kef2 and thank you for your contribute. 

I downloaded CodeWarrior from your link and after opened it I look around but I didn't see any option to connect it with usbdm. By the way, I tried to read the mcu with  usbdm "HCS12 PROGRAMMER" but no success. When connected the target power source is 3.3V The picture show pinout of usbdm .   

My mcu is lqfp-112 and I use pin 23 bkgd, 40-41 power, 42 reset.

Can you kindly tell me what I'm doing wrong?

Have a nice day

Jimmy

0 件の賞賛
返信

9,677件の閲覧回数
kef2
Senior Contributor V

My comment was only about expensiveness of CW. If I recall, USBDM was supported by some older version of CW, perhaps 5.1 or 5.0. P&E Multilink adapter is supported by all CW versions. But if you are reverse engineering student, then I doubt CW will help you in your task. Forums here are for creating your own FW and writing it to MCU, reading MCUs with unknown FW inside, perhaps reading secured MCUs as well, I think is offtopic here. Good luck

BTW, if you are familiar with some other MCU's, you can do your own reader/programmer. BDM protocol and flash/EEPROM controllers are well documented, you may use some PIC/AVR/etc to read/write over BDM. Since as you said you control target MCU clock, and perhaps make it lower, this greatly eases BDM communications from slow programmer MCU... 

0 件の賞賛
返信

9,815件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Jimmy_1,

Can you please specify the debugger?

Or is it your own custom debugger that you are working on?

 

What do you mean by " the flash data is still the same"?

Becasue the flash sector must be erased (all 1s) before it can be re-programmed.

 

Do you follow the 4.1.2 Program and Erase Sequences in User Mode description in the FTS256K Block User Guide V03.00.

Do you see any error flags when the programming sequence is complete?

 

You can refer to the attached example.

Function Flash_Write_Word(ULONG addr,UWORD data) in flash.c, 

 

Regards,

Daniel