Page 1 of 3
Need Help on UnSecure MCU
Posted: Tue May 15, 2012 8:16 pm
by Kennybug
TBDML hooked up.
P&E startup is alright.
But the P&E unsecure cmd just not work.
I have tried several osc speed.
only 40MHz talks for my board.
My TBDML had a 12MHz osc.
12 and 16 does not work at all. any clue?
Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 8:46 pm
by Kennybug
here is part of the log.
Very funny that the log said the unsecure cmd correctly executed.
but the window pop out said the bit was secured.
Code: Select all
END WAITING
!
!reset
GDI: DiExecResetChild()
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_DISPLAYLINE)
CANNOT CONNECT. RESETING TARGET.
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_DISPLAYLINE)
TARGET SECURED?
==> DI_OK
!
!undef CLKDIV // undefine variable
!
done C:\Program Files\Freescale\CWS12v5.1\(CodeWarrior_Examples)\HCS12X\BankedData\cmd\P&E_ICD_Erase_unsecure_hcs12.cmd
Unsecure command file correctly executed.
GDI: Reading From Memory Address: 0x0FF0F, count: 1
GDI: DiMemoryRead()==> DI_OK
GDI: 00
GDI: DiGdiClose(TRUE)
Communication settings:
SETCOMM DRIVER PROTOCOL NOPERIODICAL
Loading Communication DLL
==> C:\Program Files\Freescale\CWS12v5.1\Prog\gdi\tbdml_gdi12.dll
GDI: DiGdiOpen()==> DI_OK
GDI: DiGdiVersion()==> DI_ERR_NOTSUPPORTED
GDI: DiGdiAddCallBack(8192)==> DI_OK
GDI: DiGdiAddCallBack(16384)==> DI_OK
GDI: DiCommGetAcceptableSettings()==> 5
GDI: DiCommGetAcceptableSettings()==> 0
GDI: DiCommGetAcceptableSettings()==> 5
Communication settings:
SETCOMM COMPORT LPT "TBDML #1"
Initializing STARTUP command file:
CMDFILE STARTUP ON "C:\Program Files\Freescale\CWS12v5.1\(CodeWarrior_Examples)\HCS12X\BankedData\cmd\P&E_ICD_Startup.cmd"
Initializing RESET command file:
CMDFILE RESET ON "C:\Program Files\Freescale\CWS12v5.1\(CodeWarrior_Examples)\HCS12X\BankedData\cmd\P&E_ICD_Reset.cmd"
Initializing PRELOAD command file:
CMDFILE PRELOAD ON "C:\Program Files\Freescale\CWS12v5.1\(CodeWarrior_Examples)\HCS12X\BankedData\cmd\Simulator_Preload.cmd"
Initializing POSTLOAD command file:
CMDFILE POSTLOAD ON "C:\Program Files\Freescale\CWS12v5.1\(CodeWarrior_Examples)\HCS12X\BankedData\cmd\Simulator_Postload.cmd"
GDI: DiDirectAddMenuItem()==> DI_OK
GDI: DiGdiInitIO()
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_DISPLAYLINE)
CANNOT CONNECT. RESETING TARGET.
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_DISPLAYLINE)
TARGET SECURED?
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_PROJECTACCESS)
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_HC12AUTOCONFIG)
IO registers loaded for MC9S12XDP512 from C:\Program Files\Freescale\CWS12v5.1\Prog\REG\MCU03F0.REG
Micro Name: MC9S12XDP512
GDI: DiDirectCommand(GETNVMFREQUENCY)==> DI_OK
GDI: DiDirectReadNoWait()==> DI_OK
FP: Bus speed detection skipped. Now using predefined frequency of 20000000 Hz
Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 9:03 pm
by DeuceEFI
Kennybug:
See
https://github.com/DeuceEFI/FreeEMS_Workstation_Setup for how to unsecure the MCU...
hint: see Chapter 1, Step 3 and Step 6 (pages 3 and 4 of the .pdf file)
Hope that helps

Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 9:18 pm
by Fred
Weird, how did that happen? I didn't have to unsecure mine loading from Linux.
Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 9:23 pm
by Kennybug
Andy,
basically, i had followed you procedure from the pdf file.
hiwave works and the P&E cmd are running.
but it just pop out an error message as my screen capture.
a few questions:
1. what speed you are using in hiwave?
2. do your have the "not connect secured"on the status bar?
3. do i need to put the load/run jumper closed?
Fred,
My debian cannot regonize my TBDML, will try later tomrrow.

Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 9:31 pm
by Fred
Can you get hold of, or build the USBDM unit? That's what I have and it works great.
Re: Need Help on UnSecure MCU
Posted: Tue May 15, 2012 9:41 pm
by DeuceEFI
I will look at my Hiwave configuration when I get home in a couple of hours, but I think this may tell us there might be a problem with the driver or with the MCU configuration file:
==> C:\Program Files\Freescale\CWS12v5.1\Prog\gdi\tbdml_gdi12.dll
GDI: DiGdiOpen()==> DI_OK
GDI: DiGdiVersion()==> DI_ERR_NOTSUPPORTED
I'll post again once I verify the operation of my TBDML at home...
p.s. I have had better luck with my USBDM as well
Re: Need Help on UnSecure MCU
Posted: Wed May 16, 2012 4:09 am
by Kennybug
It's likely my MCU not sync the bus speed with the TBDML.
I have to manual set the speed, otherwise the MCU not found.
I guess the capactor c10, c11 values do matter.
i may need other capacitance for my TXC crystal
another thought, may be my TBDML firmware cannot use CWv5.1, will downgrade to V4.7 and retry tonight.
Re: Need Help on UnSecure MCU
Posted: Wed May 16, 2012 10:07 am
by Fred
What about cw 10.x ?
What is TXC ?
Re: Need Help on UnSecure MCU
Posted: Wed May 16, 2012 10:17 am
by Kennybug
Fred,
TXC is the brand of the crystal i use, I bought them from element14.
I am now using 22pf per Andy's BOM. however, the crystal suggested 18pf.
The load capacitance is definately wrong on my board. osc amplitude may be too weak.
I think that is the reason why sometime Hiwave set cannot find MCU.
My TBDML labeled it is v1.3, and hiwave regonized it had v0.9?? firmware.
While i bought this toy, The seller emailed a link for download the CW4.7.
So i will try CW4.7 1st.
I may going ahead to buy latest version USBDM from china.
