s12z how to erase?

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

s12z how to erase?

1,601件の閲覧回数
kef2
Senior Contributor V

Hi

How to erase S912ZVC from CodeWarrior? I hate eclipse very much! It's impossible among those bells and whistles to find such simple thing like erase command!

The problem is, while debugging bootloader, probably I overwritten already programmed address. Now, when debugger starts it stucks at 99% downloading. If I enable Enable Flash Programming Dialog, it doesn't give any more choices, but at least I see that it stucks verifying CRC-16 for 00FFDE5C-00FFEEDE. I think that ECC failure makes debugger unable to complete flash readout for CRC. Checksum verify is of course fine for saving flash erase cycles, but it shouldn't brick development boards!

Thanks for ideas.

Edward

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

1,235件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Edward,

I defined RAMCODE in prm file, but there is no change.

I also tested it on another s12z board S12ZVH128, can't reproduce your problem either.

see attached.

Did you test this on another S12Z board?

Jennie Zhang

0 件の賞賛
返信

1,235件の閲覧回数
kef2
Senior Contributor V

BTW, forums web interface got broken, just blank window when I enter full discussion page. IE and Edge shows blank windows and stops. Firefox shows blank windows and shows in bottom corner „Read assets.adobetm.com“. Could NXP pleaase fix it?

Thanks,

Edward

0 件の賞賛
返信

1,235件の閲覧回数
kef2
Senior Contributor V

Hi Jennie,

Our own PCB is not yet done and no, I don‘t have different board. But I tried it with P&E Multilink rev B. It‘s the same using external Multilink and onboard USB-BDM, no difference.

Did you verify flash programming routine is working? Any changes in string in flash?

For me the problem is solved. It‘s clear that crc check fails when ECC double bit fault is triggered. It‘s clear how to avoid it, also it‘s clear how to recover and make CW flash programming working again. I did my best to make you able to reproduce it on DEVKIT-S12ZVC(A) and CW11.0.

Edward

0 件の賞賛
返信

1,235件の閲覧回数
kef2
Senior Contributor V

Just tried to link program to different address and that unbricked my dev.kit. I hope CW team will fix this problem.

Regards

Edward

0 件の賞賛
返信

1,235件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Edward,

I am not sure if I understand your questions.

Do you mean you can't download your code to flash (stuck when 99% finished)?

Could you please specify how I can reproduce your problem step by step?

Best Regards

Jennie Zhang

0 件の賞賛
返信

1,235件の閲覧回数
kef2
Senior Contributor V

Hi Jennie,

OK, I created new project which demonstrates the problem. You need to load and run it and you won't be able to reload it again. See comments in the code. What happens as I see it

You overwrite already programmed part of flash (by mistake), so that ECC of affected flash phrase is wrong, then when CW tries to reprogram any application including flash phrase with broken ECC, it gets stuck forever checking CRC of flash.

To recover one needs to program any program, which doesn't use flash with wrong ECC. Or, go to debug configurations, click on Connect radio button (by default it is set to Download), then debug. Once connected go to programmer and run whole erase and program procedure, which (hooray) doesn't check any CRCs!

Regards

Edward

0 件の賞賛
返信

1,235件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Edward.

I don't have mc9s12zvca192 board to test this project.

I tested your project with my S12ZVFP64  board, I didn't reproduced your problem.

 I copy your main file to a new created S12ZVFP64 project. also can't reproduce. See my video attached.
Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,235件の閲覧回数
kef2
Senior Contributor V

Hi Jennie,

Putting main.c to new project is not enough. For proper flash operation you need to define RAMCODE placement in PRM.

Did you verify flash programming is working? Garbage in reprogrammed string? If it worked and still no problem on second run , then perhaps S12ZVFP and S12ZVCA are handled by CW differently.

Here's my screenshot from 2nd run. See where programming stops in console window.

Below is full contents of console, I'm not sure but looks like two runs are there, first with successful VC command and one with VC which sticks.

Regards

Edward

screenshot.png

Starting 3rd party flash programming...

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_ERR_NONFATAL

INF: Copyright 2012 P&E Microcomputer Systems,Inc.

INF: Command Line :"C:\Freescale\CW MCU v11.0\eclipse\..\MCU\bin\de.exe" -noni -language en -ORBendPoint giop:tcp:127.0.0.1: -ORBtraceLevel 0

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : IS_GDB_CONFIG, Value : 0, R) => DI_ERR_NONFATAL

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

INF: CMD>CM C:\Freescale\CW MCU v11.0\MCU\bin\Plugins\support\s12z\gdi\P&E\freescale_9s12zvca192_1x16x96k_all.s12zp

INF: Initializing.

INF: (Bus Freq = 12487KHz)

INF: Initialized.

INF: ;version 1.03, 6/27/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [freescale_9s12zvc192_pflash]

INF: ;device freescale, 9s12zvca192, 1x16x96k, desc=all

INF: ;begin_cs device=$00100000, length=$00030000, ram=$00001000

INF: Loading programming algorithm ...

INF: Done.

INF: CMD>VC

INF: Verifying object file CRC-16 to device ranges ...

INF: block 00FD0000-00FD015C ...

INF: Calculated CRC-16 does not match block. (File = $F353, Device = $026D)

INF: CMD>EM

INF: Erasing.

INF: Module has been erased.

INF: Reloading programming algorithm ...

INF: done.

INF: CMD>PM

INF: Programming and Verifying.

INF: Processing Object File Data ...

INF: .

INF: Programmed.

INF: CMD>VC

INF: Verifying object file CRC-16 to device ranges ...

INF: block 00FD0000-00FD015C ...

INF: Ok.

INF: block 00FFFFFD-00FFFFFF ...

INF: Ok.

INF: Checksum Verification Successful. (Cumulative CRC-16=$DF72)

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

Starting 3rd party flash programming...

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_ERR_NONFATAL

INF: Copyright 2012 P&E Microcomputer Systems,Inc.

INF: Command Line :"C:\Freescale\CW MCU v11.0\eclipse\..\MCU\bin\de.exe" -noni -language en -ORBendPoint giop:tcp:127.0.0.1: -ORBtraceLevel 0

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : IS_GDB_CONFIG, Value : 0, R) => DI_ERR_NONFATAL

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

INF: CMD>CM C:\Freescale\CW MCU v11.0\MCU\bin\Plugins\support\s12z\gdi\P&E\freescale_9s12zvca192_1x16x96k_all.s12zp

INF: Initializing.

INF: (Bus Freq = 12487KHz)

INF: Initialized.

INF: ;version 1.03, 6/27/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [freescale_9s12zvc192_pflash]

INF: ;device freescale, 9s12zvca192, 1x16x96k, desc=all

INF: ;begin_cs device=$00100000, length=$00030000, ram=$00001000

INF: Loading programming algorithm ...

INF: Done.

INF: CMD>VC

INF: Verifying object file CRC-16 to device ranges ...

INF: block 00FD0000-00FD015C ...

0 件の賞賛
返信