PEMicro Multilink Universal on MC9S08 will debug, but not program...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PEMicro Multilink Universal on MC9S08 will debug, but not program...

3,831 Views
matthewreed
Contributor I

We have recently got some new P&E Micro Multilink Universal debuggers.  We used to use the P&E Micro HCS08 Multilink.

 

With the old units (and this still works), we could use the 'Flash Programmer' tool to place the bootloader in the device in preparation for Internal Test.

 

Although we go through the exact same steps, the blue P&E Micro Multilink Universal does not work.  Although it does not give any errors.

 

I have contacted P&E Micro, they believe the problem is with the CodeWarrior Flash utility (mainly because the debugger works just fine).

 

CodeWarrior version 10.6 Build 140329

 

Flash Programmer for HSC09 - V 10.6.0.FSL_b8382

 

Processor:  MC9S08DZ60

 

On XP

 

-Matt

Labels (1)
0 Kudos
Reply
7 Replies

2,454 Views
stanish
NXP Employee
NXP Employee

Hi Matt,

I assume the flash verification check is OK since you do not observe any error when programming via Flash Programmer.

Perhaps the problem is related to the internal oscillator (if you use it in your case?).

Debugger launches P&E flash programmer which trims the internal oscillator by default. Whereas Flash Programmer (Target Task) doesn't perform trimming.

The bus clock difference may cause the differences e.g. in UART baudrate.

I'd suggest to check trim flash value at 0xFFAE  and Bus frequency for both interfaces after flash programming with the Flash Programmer vs. debugger.

hope it helps.

Stan

0 Kudos
Reply

2,454 Views
matthewreed
Contributor I

>I assume the flash verification check is OK since you do not observe any error when programming via Flash Programmer.

Yes.

>Perhaps the problem is related to the internal oscillator

1) we are using an external 4MHz xstal and 2) it works with no problems with the older (red) HCS08 Multilink

Since we are using an external xstal, the trim values shouldn't make a difference.

Our company has used this board design several times on many different products, so we are not working with an untested hardware design (I know, that does not mean there is not a problem - I have seen problems before that were in products for years).

-Matt

0 Kudos
Reply

2,454 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Matt,

please remove .metadata folder then restart CW to test the problem again. How does it work?

are your P&E Micro Multilink Universal firmware for HCS08? please download firmware update and utility tool to check it.

P&E Microcomputer Systems

if the problem is still the same, please test:

1. is this problem a common issue for all project or only in one specific project?

2. if the problem is only in one specific project, can you please upload the project in zip? I will it on my side. thanks!


Have a great day,
Zhang Jun

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

0 Kudos
Reply

2,454 Views
matthewreed
Contributor I

Zhang Jan,

Thanks for your reply.  I can't find any .metadata folder in the Freescale directory.  I've found a .manager and a .mainData.51 but no .metadata.

P&E had me download and update the Multilink Universal (in fact I did it several times, just to be sure).  I also EMailed them the screen-shot of the update so they could verify that I used the correct firmware.

P&E also had me create a default project with a simple loop - everything was default, none of our makefiles or anything.  That also did not work.

So if you could tell me where I could find the .metadata folder I'll get right on that.

-Matt

0 Kudos
Reply

2,454 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Matt.

.metadata folder is not under your CW10 install folder but your project workspace. Please take a look at it.


Have a great day,
Zhang Jun

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

0 Kudos
Reply

2,454 Views
matthewreed
Contributor I

Thanks for the clarification Zhang Jun.  I went to the project folder and deleted the .metadata folder.  Loaded the project back in, still no good.

Hardware just brought me 10 units to program for env testing, I captured the logs from both units:

Older Red unit (USB-ML-12 Rev C (PE5016707)) Default trim reference frequency is: 31250.0 Default angorithm:

fl::target -lc "LC for Simple Flash"

fl::target -b 0x80 0x1000

fl::target -v off -l off

cmdwin::fl::device -d "MC9S08DZ60_FLASH_EEPROM" -o "60kx16x1" -a 0x1080 0xffff

cmdwin::fl::image -f "C:\\git\\Software_Releases\\Caterpillar_ibutton\\combined\\CAT_Combined_Production_Application_and_Bootloader.bin" -t "Auto Detect" -re on -r 0x1080 0xffff -oe on -o 0x1900

cmdwin::fl::erase image

Beginning Operation ...  

-------------------------

Auto-detection is successful. 

  File is of type Binary/Raw Format. 

Performing target initialization ...  

Device MC9S08DZ60_FLASH_EEPROM  

Detect frequence ... 

Frequence 7257.13 Khz 

Erasing .............

Erase Command Succeeded. 

Device MC9S08DZ60_FLASH_EEPROM  

cmdwin::fl::write

-------------------------

Flash Operation.  ...

Auto-detection is successful. 

  File is of type Binary/Raw Format. 

Device MC9S08DZ60_FLASH_EEPROM  

Programming ..................

Device MC9S08DZ60_FLASH_EEPROM  

Program Command Succeeded  

Flash Operation. done 

** do a power-cycle and unit operates properly **

New Blue unit (Multilink Universal Rev C (PEM0249A9)) Default trim reference frequency is:  31250.0 default Algorithm.:

fl::target -lc "LC for Simple Flash"

fl::target -b 0x80 0x1000

fl::target -v off -l off

cmdwin::fl::device -d "MC9S08DZ60_FLASH_EEPROM" -o "60kx16x1" -a 0x1080 0xffff

cmdwin::fl::image -f "C:\\git\\Software_Releases\\Caterpillar_ibutton\\combined\\CAT_Combined_Production_Application_and_Bootloader.bin" -t "Auto Detect" -re on -r 0x1080 0xffff -oe on -o 0x1900

cmdwin::fl::erase image

Beginning Operation ...  

-------------------------

Auto-detection is successful. 

  File is of type Binary/Raw Format. 

Performing target initialization ...  

Device MC9S08DZ60_FLASH_EEPROM  

Erasing .............

Erase Command Succeeded. 

Device MC9S08DZ60_FLASH_EEPROM  

cmdwin::fl::write

-------------------------

Flash Operation.  ...

Auto-detection is successful. 

  File is of type Binary/Raw Format. 

Device MC9S08DZ60_FLASH_EEPROM  

Programming ..................

Device MC9S08DZ60_FLASH_EEPROM  

Program Command Succeeded  

Flash Operation. done 

** Power-cycle, unit dead **

/// Put red unit back on and try to re-program.  Gets an error:

fl::target -lc "LC for Simple Flash"

fl::target -b 0x80 0x1000

fl::target -v off -l off

cmdwin::fl::device -d "MC9S08DZ60_FLASH_EEPROM" -o "60kx16x1" -a 0x1080 0xffff

cmdwin::fl::image -f "C:\\git\\Software_Releases\\Caterpillar_ibutton\\combined\\CAT_Combined_Production_Application_and_Bootloader.bin" -t "Auto Detect" -re on -r 0x1080 0xffff -oe off

cmdwin::fl::erase image

Beginning Operation ...  

-------------------------

Auto-detection is successful. 

  File is of type Binary/Raw Format. 

Performing target initialization ...  

Device MC9S08DZ60_FLASH_EEPROM  

Erasing ....

Error:  Erase Command Failed.  Operation timeout.

Device MC9S08DZ60_FLASH_EEPROM  

An invalid preference was passed to the GDI protocol plugin(HC/RS/S12Z GDI Protocol Adapter)

Error: Erase Command Failed.Operation timeout.

** Details:

Error executing task MC9S08DZ60.

Error:  Erase Command Failed.  Operation timeout.Device MC9S08DZ60_FLASH_EEPROM  

<s>thread exit: Stopped, 0x0, 0x0, cpuHC08, Unknown (state, tid, pid, cpu, target)</s>

An invalid preference was passed to the GDI protocol plugin(HC/RS/S12Z GDI Protocol Adapter)

Error: Erase Command Failed.Operation timeout.

* I will attach diag file* - Dropbox - 201501300948_DiagnosticInfo.zip

* Reset and repeat programming, everything works properly *

0 Kudos
Reply

2,454 Views
matthewreed
Contributor I

I have found something that works!

Open the Flash Programmer, Run this task:

-----------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<TargetTaskFramework GroupFullPath="Root">

<Element Type="TargetTask">

<TargetTask ContextIndex="3" ExecutionContextName="CAT_iButton" ProviderIndex="4" TaskName="CombinedBinary" TaskProvider="Flash Programmer for HCS08/RS08/ColdFire V1">

<TaskConfiguration Action_Chip_Erase_0="true" Action_Description_0="NONE" Action_Flash_Count_0="1" Action_Flash_Name_0_0="MC9S08DZ60_FLASH_EEPROM" Action_Full_Diag_0="false" Action_Protect_Device_0="false" Action_Sectors_To_Erase_0="" Action_Secure_Device_0="false" Action_Secure_Device_Password_0="" Action_Secure_Device_Password_Format_0="" Action_Selected_0="true" Action_Type_0="2" Actions_Count="1" Add_Device_Dialog_Default_Platform="0" Address_Offset_0="6400" Apply_Address_Offset_0="true" Buffer_Address="128" Buffer_Size="4096" Checksum_Over_0="0" Erase_First_0="true" File_Path_0="C:\git\CAT_iButton\Software\CAT_iButton_Combined_Application_and_Bootloader.bin" File_Type_0="0" Flash_Base_Address_0="4224" Flash_Device_Name_0="MC9S08DZ60_FLASH_EEPROM" Flash_Device_Organization_0="60kx16x1" Flash_Devices_Count="1" Flash_Top_Address_0="65535" Restrict_Address_End_0="65535" Restrict_Address_Range_0="false" Restrict_Adress_Start_0="4224" Use_File_From_LC_0="false" Verify_After_0="false" Verify_Memory_Writes="false"/>

</TargetTask>

</Element>

</TargetTaskFramework>

-----------------------------------------------------------------------

And it works.

Here is the log:

-----------------------------------------------------------------------

Starting 3rd party flash programming...

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

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

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

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

INF: CMD>CM C:\Freescale\CW_MCU_v10.6\MCU\bin\Plugins\support\hc08\gdi\P&E\9s08dz60.s8p

INF: Initializing.

INF: (Recommended TRIM=$00A3,FTRIM=0)

INF: (Bus Freq = 15990KHz)

INF: Initialized.

INF: ;version 1.06, 07/19/2011, Copyright P&E Microcomputer Systems, www.pemicro.com [9s08dz60]

INF: ;device Freescale, 9S08DZ60, All, 8 Byte EEProm Sectors

INF: ;begin_cs

INF: Loading programming algorithm ...

INF: Done.(FCDIV=$CB)

INF: CMD>EM

INF: Erasing.

INF: Module has been erased.

INF: CMD>PM

INF: Programming and Verifying.

INF: Processing Object File Data ...

INF: .

INF: Programmed.

INF: CMD>VC

INF: Verifying object file Checksum16+CRC8 to device ranges ...

INF:    block 00001900-0000190D ...

INF: Ok.

INF:    block 00001910-0000406B ...

INF: Ok.

INF:    block 0000D300-0000D300 ...

INF: Ok.

INF:    block 0000FFC0-0000FFFF ...

INF: Ok.

INF:    Checksum Verification Successful. (Cumulative Checksum16+CRC8=$216742)

INF: CMD>PT

INF: Programming Trim value $A3 to location $   

INF:  Success.

INF: Programming FTrim value $00 to location $   

INF:  Success.

INF: CMD>RE

INF: Initializing.

INF: Target has been RESET and is active.

-----------------------------------------------------------------------

This will work for me, I can program units for the test people.  But you still may want to check into why the other method does not work.

-Matt

0 Kudos
Reply